Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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/downloadImage Added -- 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:

Panel

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

Panel

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 ;