Date: Mon, 27 Sep 1999 04:06:22 GMT From: mike@sentex.net (Mike Tancsa) To: matthias@mteege.de (Matthias Teege) Cc: questions@freebsd.org Subject: Re: ipfw and accounting Message-ID: <37eeec7e.956630381@mail.sentex.net> In-Reply-To: <MAIL199909241304.PAA17177@moon.mteege.de> References: <MAIL199909241304.PAA17177@moon.mteege.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24 Sep 1999 10:34:52 -0400, in sentex.lists.freebsd.questions you wrote: >Moin, > >I wish to count how many bytes I transfer over my isp0 device. So I >setup two ipfw rules: netstat -ni will also give you this information. >ipfw add 64080 count ip from any to any out via isp0 >ipfw add 64090 count ip from any to any in via isp0 > >I open the interface for a short http connection and after i4b close >the line i make a 'ipfw show' > >64080 1042 97442 count ip from any to any out xmit isp0 >64090 924 160482 count ip from any to any in recv isp0 From the man page, The ipfw code works by going through the rule-list for each packet until a match is found. All rules have two associated counters, a packet count and a byte count. These counters are updated when a packet matches the rule. So, if you have any rules before the above two, it will not be counted. You might get what you need simply by looking at netstat -ni ---Mike Mike Tancsa (mdtancsa@sentex.net) Sentex Communications Corp, Waterloo, Ontario, Canada "Given enough time, 100 monkeys on 100 routers could setup a national IP network." (KDW2) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37eeec7e.956630381>