Well, currently I use an indirect method, the ss utility & a quick'n'dirty perl one liner:<div><br></div><div>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" '<br>
</div><div><br></div><div>The "output" looks like:<br></div><div>1352182000 total bps, 539 clients: 2508686.45640074 avg. bps<br></div><div><br></div><div>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.</div>
<div><br></div><div>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.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Oct 25, 2012 at 5:01 PM, Vladimir Stavrinov <span dir="ltr"><<a href="mailto:vstavrinov@gmail.com" target="_blank">vstavrinov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Oct 24, 2012 at 10:17:46AM +0200, Tollef Fog Heen wrote:<br>
<br>
> There's currently no support for the time for the full request. You<br>
> can<br>
<br>
</div>There are some times data in ReqStart & ReqEnd tags of shared memory<br>
log. May be there some variables exists to get those data?<br>
<div class="im"><br>
<br>
> use %{Varnish:time_firstbyte}x in the format string for the time to<br>
> first byte.<br>
<br>
</div>It doesn't help as we need calculate download speed of clients.<br>
<div class="im HOEnZb"><br>
--<br>
<br>
***************************<br>
## Vladimir Stavrinov<br>
## <a href="mailto:vstavrinov@gmail.com">vstavrinov@gmail.com</a><br>
***************************<br>
<br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jorge Nerín<br><<a href="mailto:jnerin@gmail.com">jnerin@gmail.com</a>><br>
</div>