Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jan 2002 11:59:30 -0800
From:      rick norman <rick.norman@lmco.com>
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        ipfw@freebsd.org
Subject:   Re: dummynet byte counters
Message-ID:  <3C472D22.A1BECD0D@lmco.com>
References:  <20020117093911.C98289@iguana.icir.org>

next in thread | previous in thread | raw e-mail | index | archive | help

For what it's worth, I currently use a pipe with an ipfw 'in' rule to
monitor the bw fanning in to a pipe from several variable sources.  In this
case I'm
interested in the total delivered from several external nodes.  I like the
ability to drop a pipe into any data stream I choose in a potentially
complex test bed and monitor it without perturbing it significantly.

It would seem that there might be occasions where one would want to
monitor the data stream both coming to the queue and leaving depending on
your test setup.

Rick

Luigi Rizzo wrote:

> Hi,
> i got request from some people on how can i know how many
> bytes were used by a dummynet pipe -- essentially i guess
> for accounting reasons, or to export these values with
> mrtg as some people do, etc.
>
> For this to work you would need to count packets and bytes
> coming out of the queue. But at the moment, dummynet pipes
> only count packets and bytes _in_, plus packet drops.
>
> There are two ways to implement this feature (which i
> think is useful):
>
>  + add to struct dn_flow_queue a counter for bytes dropped (and while we
>    are at it, extend the packet drop counter to 64 bits).
>    This has the problem of requiring a reinstallation of /sbin/ipfw
>    because the size of structures passed with getsockopt changes;
>
>  + use the tot_pkts/tot_bytes field to count traffic _out_
>    of the pipe instead of traffic going in.
>    This way the size of dn_flow_queue does not change, but the
>    meaning of these two fields changes; on the other hand, some
>    people who wrote me already thought these field counted data
>    out. For what is worth, the wording in /sbin/ipfw's output is
>    sufficiently vague not to require any change in that program.
>
> Obviously I am not thinking of changing before 4.5 is released,
> but right after that it is definitely something to do.
> Any preference on the solution to use ?
> I see some good in both of them, and the second one is to some
> degree a bit more transparet than the first one.
>
>         cheers
>         luigi
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-ipfw" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ipfw" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C472D22.A1BECD0D>