Get Bandwidth statistics

Kristian Lyngstol kristian at
Mon Jul 12 13:43:56 CEST 2010

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

More information about the varnish-misc mailing list