Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Dec 1999 18:29:01 +1100 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Mike Nowlin <mike@argos.org>
Cc:        Aldrin Leal <aldrin@americasnet.com>, freebsd-net@FreeBSD.ORG
Subject:   Re: Math Help for IPFW :)
Message-ID:  <Pine.BSF.3.96.991217181552.19958A-100000@gaia.nimnet.asn.au>
In-Reply-To: <Pine.LNX.4.05.9912170204130.2534-100000@jason.argos.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 17 Dec 1999, Mike Nowlin wrote:

Sure you can use SNMP also, or instead, but if you want to do it from
your gathered IPFW data, why not just use the byte counters rather than
or as well as the packet counters, per rule?

(almost) works here .. we're starting to analyse `ipfw -t show >> file`
cronned every 5 minutes for 1.5 yrs (and running MRTG for the visuals). 

Cheers, Ian

 > >     How could i relate this count, the second one, for packets? For sure it
 > > means the number of packets processed. But how long is a packet? That's all
 > > i need to put the right number of kBPS/s they're doing. :)
 > 
 > The first problem is that packet size varies greatly -- it could be a
 > single byte (plus header/address information), or quite large, depending
 > on what the interface type/parameters are set for.
 > 
 > The best solution I found for this is SNMP, which is what most of the "big
 > boys" (PSI Net, for example) use.  I do something similar -- sample the 
 > "interfaces.ifTable.ifEntry.ifOutOctets" and
 > "interfaces.ifTable.ifEntry.ifInOctets" entries for each interface
 > periodically, and you can calculate the average bandwidth usage per
 > interface pretty easily:
 > 
 > (with two samples, taken x seconds apart)
 > 
 > Bandwidth = (sample1 - sample2) / x
 > 
 > Not perfect, but it works.  The closer in time the samples are, the more
 > accurate your result.  Using ucd-snmp, it's pretty easy to write a perl or
 > shell script that will do this for you on a routine basis, and send it to
 > some reporting method.
 > 
 > mike



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.991217181552.19958A-100000>