[Varnish] #187: Insufficient logging data - actual bytes transferred needed

Varnish varnish-bugs at projects.linpro.no
Fri Dec 7 18:52:10 CET 2007


#187: Insufficient logging data - actual bytes transferred needed
-------------------------+--------------------------------------------------
 Reporter:  rinogo       |       Owner:  phk  
     Type:  enhancement  |      Status:  new  
 Priority:  normal       |   Milestone:       
Component:  varnishlog   |     Version:  1.1.1
 Severity:  normal       |    Keywords:       
-------------------------+--------------------------------------------------
 "
 > varnishncsa seems to only log the size (in bytes) of the file being
 > transfered.  We deal a lot with large files (30MB-100MB), so many of our
 > file transfers are cut short.  We need to be able to log exactly how
 > many bytes were actually transfered.  Is this possible?

     I think you can't get this information for the moment.

 In your case, file transfer is made by RES_WriteObj() (cache_response.c)
 with a call to WRK_Sendfile() (cache_pool.c). If you look into thins
 function :

                 if (WRK_Flush(w) == 0 &&
                     sendfile(*w->wfd, fd, &off, len) != len)
                         w->werr++;

 The number of bytes copied (returned by sendfile) is not saved  :(

 With a little patch you can save this value and use it for statistics.

 Gwen"
 -From message to varnish-misc, 12/7/07

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/187>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list