Web Hosting Talk







View Full Version : Pondering about MRTG+95


Sprynex
12-14-2002, 01:15 PM
Hello,

I've been using MRTG + 95th percentile for a bit.. it works great. The question I have is this... I have a new customer who just got his box up.. he started uploading lots of files to get his system ready.. and only used incoming traffic for a couple hours..

Now.. I bill on outgoing only, I don't charge for incoming traffic at all.. but his chart is being charged for incoming.. :| I have never seen this on a customer's graph before.. :(

My theory is that 95th percentile (www.seanadams.com/95) is taking whichever is higher.. incoming or outgoing.. and basing it upon that.

Is this true?? or is it trying to combine both and bill (which would be bad for me..).

Either way I have to change a policy or two now.. but I just want to verify my theory here with somebody who would know for a fact.

Thanks for your time.

Tazzman
12-14-2002, 02:08 PM
DV2 uses this system too (I think), and it takes the largest of incoming or outgoing. It doesn't count both, only the largest value...

cperciva
12-14-2002, 02:40 PM
Sean's code measures the 95th percentile of max(in,out); ie, for each 5 minute period he takes the larger of the two.

Sprynex
12-14-2002, 02:41 PM
Thanks guys.. just making sure before I feed some people bad information.

cperciva
12-14-2002, 03:03 PM
FWIW, changing a few lines in 95.pl will give you the 95th percentile of outgoing traffic alone.

Sprynex
12-14-2002, 03:16 PM
That could prove most useful.. do you mind sharing that? :)

cperciva
12-14-2002, 03:22 PM
Close to the end of 95.pl, find the lines

if ($in>$out) {
$samples{$time}=$in; #filter identical times using a hash
} else {
$samples{$time}=$out;
}
}


and replace with

$samples{$time}=$out;


if you only want the 95th percentile of the output values.

That said, I personally recommend using rrdtool and 14all.cgi for improved performance.

Sprynex
12-14-2002, 03:44 PM
Thanks for the reply.

That annoys me, I quickly checked over the code and didn't even see that first time around.. too obvious I guess, was looking for something complicated... I am no perl expert by far, but I can code and read code easily.. Just got intimidated I guess :P


Thanks :)