logging request time

Jorge Nerín jnerin+varnish at gmail.com
Wed Oct 31 22:05:52 CET 2012


Well, currently I use an indirect method, the ss utility & a quick'n'dirty
perl one liner:

ss -i -t 'sport = :80' |perl -e 'while (<>) { if (m/send (.*?)([M|K|]bps)
/){ ($s,$u)=($1,$2); $s=$s*1000000 if ("Mbps" eq "$u"); $s=$s*1000 if
("Kbps" eq "$u"); $t=$t+$s; $c=$c+1}} print "$t total bps, $c clients: ",
($t/$c) , " avg. bps\n" '

The "output" looks like:
1352182000 total bps, 539 clients: 2508686.45640074 avg. bps

I'm working on a munin plugin with this idea, as I'm testing different tcp
congestion avoidance algorithms and playing with initcwnd & initrwnd and I
like to keep track of the changes.

P.S. Remember to load the tcp_diag module in busy servers to speed up "ss"
so it doesn't have to resort to parsing /proc/net/tcp.


On Thu, Oct 25, 2012 at 5:01 PM, Vladimir Stavrinov <vstavrinov at gmail.com>wrote:

> On Wed, Oct 24, 2012 at 10:17:46AM +0200, Tollef Fog Heen wrote:
>
> > There's currently no support for the time for the full request.  You
> > can
>
> There are some times data in ReqStart & ReqEnd tags of shared memory
> log. May be there some variables exists to get those data?
>
>
> > use %{Varnish:time_firstbyte}x in the format string for the time to
> > first byte.
>
> It doesn't help as we need calculate download speed of clients.
>
> --
>
> ***************************
> ##  Vladimir Stavrinov
> ##  vstavrinov at gmail.com
> ***************************
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>



-- 
Jorge Nerín
<jnerin at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20121031/c33d4448/attachment.html>


More information about the varnish-misc mailing list