how to calculate 95 percentile for bandwidth

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
Roke
Posts: 20
Joined: Thu Jun 24, 2010 1:14 pm

how to calculate 95 percentile for bandwidth

Post by Roke »

Im trying to calculate the 95 percentile of the bandwidth, the same that this template "Interface - Traffic (bits/sec, 95th Percentile)"

I fetch the rrd of the graph and i have all values on a array like this:

For incoming traffic:
Array ( [0] => 506592.951 [1] => 457935.219 [2] => 401245.496 [3] => 291396.302 [4] => 281777.791 [5] => 248980.016 [6] => 239287.475 [7] => 233520.832 [8] => 231141.793 [9] => 199963.971 [10] => 145164.434 [11] => 0 )

For Outgoing traffic:
Array ( [0] => 157479.028 [1] => 147111.252 [2] => 138907.156 [3] => 136944.028 [4] => 93690.039 [5] => 80048.282 [6] => 56325.037 [7] => 48963.503 [8] => 48754.16 [9] => 44342.024 [10] => 27487.774 [11] => 0 )

How can i calculate the 95 percentile? In the graph show that is "4.05 mb in+out"

Thanks for the help.
Roke
Posts: 20
Joined: Thu Jun 24, 2010 1:14 pm

Re: how to calculate 95 percentile for bandwidth

Post by Roke »

Hi,

I read that for calculate the 95% percentile you have to sort in descending mode the data source, then take the 95% of the samples whitout the bigger samples.

Then take the biggest sample and you get the 95%, someone can confirm this formula??
Roke
Posts: 20
Joined: Thu Jun 24, 2010 1:14 pm

Re: how to calculate 95 percentile for bandwidth

Post by Roke »

I have the solutions so i posted here. I use the "nth_percentile" function of cacti so i get no problem :)

Best Regards.
mitio
Posts: 2
Joined: Mon Dec 27, 2010 2:45 am

Re: how to calculate 95 percentile for bandwidth

Post by mitio »

I have same request. I and luckely found:

http://www.cacti.net/downloads/docs/html/variables.html

So, you can use:
|95:bits:6:aggregate:3| in text or value field
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests