You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Apache <ap...@mail.com.np> on 2004/04/21 11:19:29 UTC

[users@httpd] how to log the no. of bytes transferred

Dear all,
        
            I am using apache 2.0.40  and whenever a user downloads a mpeg file from our server, I would like to know only the successfully completed downloads. 

        I have password protected the site so that only the authenticated user can download it. But I have a problem that if some authenticated user downloads it partially, how do i log the actual no. of bytes he download.

          We are going to make a policy so that only for successful downloads, we are going to charge the user.

        Your suggestions and help are highly appreciated.


Sincerely Yours
Binaya
 
            
        

Re: [users@httpd] how to log the no. of bytes transferred

Posted by "John P. Dodge" <do...@cruciate.ca.boeing.com>.
On Thu, 22 Apr 2004, Apache wrote:

> Dear John,
>
>          Thanks for the reply . I have tested it out with it . But I have
> found that it actually logs the file size instead of the actual no. of bytes
> transferred.
>
>         In fact I like to log the actual no.of bytes transferred so that I
> would be able to know if the user completely downloaded the file or not.
>
> Any ideas ??
>
>
> Thanking You.
>
> Binaya
>
> > On Wed, 21 Apr 2004, Apache wrote:
> >
> > >             I am using apache 2.0.40 and whenever a user downloads a
> > > mpeg file from our server, I would like to know only the successfully
> > > completed downloads.
> > >
> > >         I have password protected the site so that only the
> > > authenticated user can download it. But I have a problem that if some
> > > authenticated user downloads it partially, how do i log the actual no.
> > > of bytes he download.
> > >
> > >
> > The bytes transferrer is the last number in the access log line. I do this
> > too, with a Perl script to post process the log file.
> >
> > See: http://httpd.apache.org/docs-2.0/mod/mod_log_config.html
> >
> >
If the number in the "bytes transferred" field is the sane as the file
size then that is how many bytes Apache sent to the O/S. For example if a
client hits the cancel during the transfer the byte count will be less.

As Joshua pointed out you may want to look at mod_logio.

http://httpd.apache.org/docs-2.0/mod/mod_logio.html


----------------------------------------
"Mon aéroglisseur est plein d'anguilles"
John P. Dodge
Boeing Shared Services


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to log the no. of bytes transferred

Posted by Apache <ap...@mail.com.np>.
Dear John,

         Thanks for the reply . I have tested it out with it . But I have
found that it actually logs the file size instead of the actual no. of bytes
transferred.

        In fact I like to log the actual no.of bytes transferred so that I
would be able to know if the user completely downloaded the file or not.

Any ideas ??


Thanking You.

Binaya

----- Original Message -----
From: "John P. Dodge" <do...@cruciate.ca.boeing.com>
To: <us...@httpd.apache.org>
Sent: Wednesday, April 21, 2004 6:58 PM
Subject: Re: [users@httpd] how to log the no. of bytes transferred


> On Wed, 21 Apr 2004, Apache wrote:
>
> > Dear all,
> >
> >             I am using apache 2.0.40 and whenever a user downloads a
> > mpeg file from our server, I would like to know only the successfully
> > completed downloads.
> >
> >         I have password protected the site so that only the
> > authenticated user can download it. But I have a problem that if some
> > authenticated user downloads it partially, how do i log the actual no.
> > of bytes he download.
> >
> >
> >         Your suggestions and help are highly appreciated.
> >
> >
> > Sincerely Yours
> > Binaya
> >
> >
> >
> >
> The bytes transferrer is the last number in the access log line. I do this
> too, with a Perl script to post process the log file.
>
> See: http://httpd.apache.org/docs-2.0/mod/mod_log_config.html
>
>
> ----------------------------------------
> "Mon aéroglisseur est plein d'anguilles"
> John P. Dodge
> Boeing Shared Services
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to log the no. of bytes transferred

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 21 Apr 2004, John P. Dodge wrote:

> On Wed, 21 Apr 2004, Apache wrote:
>
> > Dear all,
> >
> >             I am using apache 2.0.40 and whenever a user downloads a
> > mpeg file from our server, I would like to know only the successfully
> > completed downloads.
> >
> >         I have password protected the site so that only the
> > authenticated user can download it. But I have a problem that if some
> > authenticated user downloads it partially, how do i log the actual no.
> > of bytes he download.

> The bytes transferrer is the last number in the access log line. I do this
> too, with a Perl script to post process the log file.
>
> See: http://httpd.apache.org/docs-2.0/mod/mod_log_config.html

In 2.0 I've found that apache usually logs the full file size regardless
of what the client actually receives.  You may want to try mod_logio,
which may be more accurate in this regard, but I'm not sure.  Anyone else
have experience to share?

But do note that there is no perfectly accurate way for apache to tell how
many bytes the client received.  At best, it can tell how many bytes
apache passed to the OS.  Whether these then made it to the client or not
is unknown.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to log the no. of bytes transferred

Posted by "John P. Dodge" <do...@cruciate.ca.boeing.com>.
On Wed, 21 Apr 2004, Apache wrote:

> Dear all,
>
>             I am using apache 2.0.40 and whenever a user downloads a
> mpeg file from our server, I would like to know only the successfully
> completed downloads.
>
>         I have password protected the site so that only the
> authenticated user can download it. But I have a problem that if some
> authenticated user downloads it partially, how do i log the actual no.
> of bytes he download.
>
>
>         Your suggestions and help are highly appreciated.
>
>
> Sincerely Yours
> Binaya
>
>
>
>
The bytes transferrer is the last number in the access log line. I do this
too, with a Perl script to post process the log file.

See: http://httpd.apache.org/docs-2.0/mod/mod_log_config.html


----------------------------------------
"Mon aéroglisseur est plein d'anguilles"
John P. Dodge
Boeing Shared Services


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org