Get Bandwidth statistics

Martin Boer martin.boer at netclever.nl
Tue Jul 13 08:32:00 CEST 2010


If you don't use munin it is very easy to write a do the following;

write a small script around the following command
varnishstat -1 -f s_bodybytes s_hdrbytes (and probably some other 
counters you like to see)
to get the amount of bytes at a given moment and schedule it in cron to 
run every 5 minutes or so.


Regards,
Martin Boer





Kristian Lyngstol wrote:
> On Mon, Jul 12, 2010 at 01:36:00PM +0200, Jaap van Arragon wrote:
>   
>> We are using Varnish 2.1.0-2 for about 4 weeks now and we like it!
>>     
>
> Glad you like it :)
>
>   
>> There is only one problem, how can we log the used bandwidth used by the
>> varnish daemon? Normally in Apache we can use the access logs but in varnish
>> there is only memory logging.
>>
>> Can anyone tell me how to get the bandwidth used by a specific daemon?
>>     
>
> There are a few different approaches. I'm sure there's some OS-method too,
> but a common way of doing it is reading it from varnishstat, as that only
> resets when Varnish restarts. The Munin plugin for Varnish does exactly
> that (among other things).
>
> Essentially executing varnishstat -1 on a regular interval. Could be read
> directly from the shmlog too, but that's a bit more complicated.
>
> - Kristian
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
>
>
>   





More information about the varnish-misc mailing list