[rrd-users] Re: 95th percentile

Paul Wickman paulw at explosive.net
Wed Mar 14 19:01:20 MET 2001



Yes, sortof.  I compute 95th percentile for customer bandwidth.  Accuracy
will depend on the number of sample interval and number of samples.  I
don't use the default mrtg-like definitions.

If you use the Statistics::Descriptive perl module, it's pretty simple.  I
do a fetch of the interval I wan't to compute over (in my case, it's 5
minute samples for the last 30 days).  I can post the actual code if you
like, but essentially:

$stat = Statistics::Descriptive::Full->new();
($start,$step,$ds,$data) = RRDs::fetch .....;
foreach (@$data) {
	#
	# Substitute zero for missing samples
	if ($_->[0] eq "" || $_->[1] eq "") {
            $sam = 0;
            $drop++;
        } else {
            $sam = ($_->[0] * 8) + ($_->[1] * 8);
        }
	$stat->add_data($sam);
}
$perc = $stat->percentile(95);	



On Wed, 14 Mar 2001, Mike Bernhardt wrote:

> 
> This question has been asked several times before, but I haven't seen any
> answers- has anyone come up with a script to generate 95th percentile? And
> if so, would they be willing to share it?
> 
> Mike Bernhardt, CCIE #6079
> Networks & Systems Engineering
> Arsin Corporation
> Email: mbernhardt at arsin.com
> Phone: (415) 294-3006
> 
> 
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
> 

---
	We listen, and if it feels good, we shake...
	
					- Pilgrims, by Widespread Panic


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list