[mrtg] Re: 95th percentile
Alex van den Bogaerdt
alex at slot.hollandcasino.nl
Thu Nov 11 19:38:32 MET 1999
George D. Nincehelser wrote:
> Ummm....I thought it was described in pretty good detail a while back. What
> information is missing?
Didn't catch that and when I asked I got no reply.
If it is alright to work with five-minute averages to start with, the
following should be a good starting point:
Migrate to MRTG+RRDtool. Modify the RRA that keeps the "daily" archive
to be of size 10000 (8928 samples is 31 days; the remaining 1072 allows
you to run the report some time after the first of each month).
There is an option for RRDtool that should be able to do this, I haven't
used it lately; if it doesn't work anymore it is a bug that needs to be
fixed so please report that. Look in the docs for rrdresize. You can
look up which RRAs you need to modify by using rrdtool dump. IIRC the
normal size of these RRAs is 600 rows so you need to increase by 9400
and the commands would be something like:
rrdtool resize your.rrd 0 GROW 9400
mv resize.rrd your.rrd
rrdtoool resize your.rrd 2 GROW 9400
mv resize.rrd your.rrd
Remark: check the numbers as I'm not sure. Also note that rrdtool resize
creates a new database (resize.rrd) for safety; check it before doing the
rename. AFAIK it never failed but better safe than sorry.
Once this is done, the RRD will keep its data for 34 days. You can now
rrdtool fetch your.rrd AVERAGE \
--start '19991101 00:00' \
--end '19991130 23:59'
to retrieve the data for the month november 1999.
Store this in a file. Count the number of rows returned (using wc -l)
and you can determine what 95 percent would be using shell arithmetics.
I'm not sure if you have to sum in and out and cut off the top five
percent from that or that you should process in and out separately.
Depending on that, you can use either "cut -f" to get the correct
column from your file or use awk to sum and print two columns. Use
"sort -n" to sort numerically and collect the correct row to find out
what number you're looking for.
Perl gurus would be able to create a perl script that can do all this,
I can't help with that.
If this all sound like too complicated, don't be afraid. It is just
one big script that you can run. Once it is debugged etcetera, I think
it will be okay and ask Tobi to include it into rrdtool.
If someone is willing to cooperate and provide shell access + data,
let me know and we can create a workable solution together.
/ alex at slot.hollandcasino.nl alex at ergens.op.het.net \
| work private |
| My employer is capable of speaking therefore I speak only for myself |
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg