[prev in list] [next in list] [prev in thread] [next in thread] 

List:       inet-access
Subject:    RE: 95th Percentile B/W stats
From:       Chris Davis <chris.davis () computerjobs ! com>
Date:       2001-01-29 14:54:41
[Download RAW message or body]

Jeff,

Pull your inoctets (i) and outoctets (o) and sysuptime (u) periodically.

bandwidth used =   (i2 + o2) - (i1 + o1)  /  (u2 - u1)

Meaning, bandwidth = [(the sum of your in & out octets at your current
measurement) minus (the sum of your in & out octets at your previous
measurement)] divided by [the current sysuptime minus the previous
sysuptime]

divide bandwidth used into your max bandwidth to get the percentage.
Compare to 95%

when your device counters reach their maximum values, they will start over.
your code will have to allow for this.
My cisco routers in/out octets range from -2147483648 to +2147483648

Here's a snippet of my code for when the counters cycle:

    If ifInOctets < Previous_ifInOctets Then Previous_ifInOctets =
Previous_ifInOctets - 4294967296#
    If ifOutOctets < Previous_ifOutOctets Then Previous_ifOutOctets =
Previous_ifOutOctets - 4294967296#

in & out octets are perpetually increasing counters, so you know if the
current measurement is less than the previous measurement, the counter has
cycled.    



Michael,
I'm sure you know MRTG uses SNMP, so you do use SNMP indirectly.  Pulling
MRTG logs is not a good solution, as MRTG changes the log files to keep the
size down. If you need to verify your bandwidth statistics a month later
when the bill comes, too bad, because that part of your logfile has whittled
itself down to just a couple of numbers to summarize the whole day.  A year
later, you've got a couple of number to summarize the whole month.  Useless
if you need long term details!







-----Original Message-----
From: Michael K. Smith [mailto:mike@wackypackets.com]
Sent: Friday, January 26, 2001 6:14 PM
To: list@inet-access.net
Subject: Re: 95th Percentile B/W stats


We don't use SNMP.  Instead, we pull the MRTG logs on a daily basis for
input and output (before it compresses) and then lop of the top
5%.  Pretty simple PERL hack really.

Mike

On Fri, 26 Jan 2001, Jeffrey Meltzer wrote:

> Anybody have any good pointers for some scripts that will generate stats
> for 95th Percentile Bandwidth via SNMP?  Hit freshmeat and found nothing,
> so i'm about to begin a weekend of hacking. Just checking to make sure i'm
> not re-inventing the wheel and there's something out there that I missed.
> Maybe some RRDTool scripts?
> 
> TIA,
> 
> Jeff
> -
> List archives can be found at: <http://www.moongroup.com/inet.php>
> Send 'unsubscribe' in the body to 'list-request@inet-access.net' to leave.
> Eat sushi frequently.   inet@inet-access.net is the human contact address.
> 

-------------------------------------------------------------------
Michael K. Smith 	mike@wackypackets.com

"I can no longer sit back and allow Communist infiltration, 
Communist indoctrination, Communist subvsersion and the 
International Communist Conspiracy to sap and impurify all 
of our precious bodily fluids." -- Jack D. Ripper

PGP Key: 92F3 3C34 34A2 6900 8F9C  9A35 6D2A D0A6 4846 3BE0
-------------------------------------------------------------------


-
List archives can be found at: <http://www.moongroup.com/inet.php>
Send 'unsubscribe' in the body to 'list-request@inet-access.net' to leave.
Eat sushi frequently.   inet@inet-access.net is the human contact address.
-
List archives can be found at: <http://www.moongroup.com/inet.php>
Send 'unsubscribe' in the body to 'list-request@inet-access.net' to leave.
Eat sushi frequently.   inet@inet-access.net is the human contact address.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic