You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

2010-06-28:

Reporting on software downloads

There are two kinds of software downloads currently tracked in very different ways.

"Simple Downloads"

Running this url -- http://wserv.mit.edu/sc/download -- forces an output file with the current counter value for each file.  This is the counter value at the moment of the report.  So you have to be careful to run it at specific times if you want a certain date range to be represented.  The counter is an accumulator so you have to calculate the difference between now and the last time you ran the report to see how many downloads there were.

Complex Downloads

Downloads.mit.edu is accessible only through VPN using SecureCRT/FX.

The downloads database is only accessible through mysql while logged on to that server. 

It is possible to formulate relatively simple sql scripts that extract useful fields from the download_log table and excerpt them into a file.  That file can then be ftp'd with SecureFX (launched from SecureCRT) out of downloads.mit.edu over to your own PC.

The following query gets all the columns out of the database for all transactions between two dates, and streams it into a file for transferring elsewhere:

TEE downloads-2010-06.txt
;
SELECT download_date, download_uri, user_id, user_class, user_affiliation, ip_address, user_agent
FROM download_log
WHERE download_date BETWEEN
'2010-06-01' AND '2010-06-30'
;
NOTEE ;

This one will summarize the download counts per filename:with a within-the-month date stamp

TEE temp/downloads-summary-2010-06.txt
;
select download_uri, count(*), download_date from download_log
WHERE download_date BETWEEN
'2010-06-01' AND '2010-06-30'
group by download_uri
;
notee ;

  • No labels