
Is there a way to configure either Apache or Tomcat web servers so as for it to display how much data was transferred in a given session? This is what I mean; Suppose I have a file on localhost that can be downloaded by visiting http://localhost/service/file.zip. The file.zip is 123456 bytes long. If someone downloads it completely, then I expect that 123456 bytes to have been transferred. Suppose someone cancels mid-way, or an error occurs, then there is a log to show that file transfer was not complete. Any idea(s)?

On Tue, Sep 22, 2009 at 10:53 AM, Arthur Buliva <abuliva@mobileplanet.co.ke> wrote:
This is what I mean; Suppose I have a file on localhost that can be downloaded by visiting http://localhost/service/file.zip. The file.zip is 123456 bytes long. If someone downloads it completely, then I expect that 123456 bytes to have been transferred. Suppose someone cancels mid-way, or an error occurs, then there is a log to show that file transfer was not complete.
You probably need a script to proxy the downloads - channel all downloads through this proxy script. in the script you ll need to do something like this : 1 - get the size of the requested file 2 - read the file and write the contents of the file as binary into the output stream 3 - when the script completes compare the output no. of bytes with the original byte size (from step 1 ) 4 - write success / failure of the download to a log file depending on wether the comparison was equal or not in step 3

Hi, As far as i know.. nope. You'd probably have to - hack apache to report it or - write a php script to write out the downloads - write a simple pcap linked c program to monitor the downloads On Tue, Sep 22, 2009 at 7:53 AM, Arthur Buliva <abuliva@mobileplanet.co.ke>wrote:
Is there a way to configure either Apache or Tomcat web servers so as for it to display how much data was transferred in a given session?
This is what I mean; Suppose I have a file on localhost that can be downloaded by visiting http://localhost/service/file.zip. The file.zip is 123456 bytes long. If someone downloads it completely, then I expect that 123456 bytes to have been transferred. Suppose someone cancels mid-way, or an error occurs, then there is a log to show that file transfer was not complete.
Any idea(s)?
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general

Hi, Yes, it logs those requests, but you need to use mod_logio http://httpd.apache.org/docs/2.2/mod/mod_logio.html to know the actual bytes sent, else it will show the total amount of bytes of the file. And to know which have failed you'd have to either: 1. use the %X format modifier and use a custom log format 2. compare the actual bytes sent against the file' sizes On Tue, Sep 22, 2009 at 10:53 AM, Arthur Buliva <abuliva@mobileplanet.co.ke> wrote:
Is there a way to configure either Apache or Tomcat web servers so as for it to display how much data was transferred in a given session?
This is what I mean; Suppose I have a file on localhost that can be downloaded by visiting http://localhost/service/file.zip. The file.zip is 123456 bytes long. If someone downloads it completely, then I expect that 123456 bytes to have been transferred. Suppose someone cancels mid-way, or an error occurs, then there is a log to show that file transfer was not complete.
Any idea(s)?
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
-- Regards, Brian Ngure
participants (4)
-
Arthur Buliva
-
ashok+skunkworks@parliaments.info
-
Brian Ngure
-
Lmwangi