[mrtg] Re: Percentage Utilisation ?

Grendel grendel at interq.ad.jp
Thu May 31 18:10:03 MEST 2001


Hi Chris,
	What happened when you divided by the total maxbytes and multiplied by 100? That should get you
what you need as a pure number.
	Also, another possibility is the Unscaled optional target parameter. Use it and the graph you see
is always relative to maxbytes. See the config reference for more details.

	At my job we use MRTG for monitoring both WAN links and access server modem usage. For the latter
group, we have graphs that group both by different services within individual access servers, and by
percentages of hunt groups even when spread across multiple access servers. MRTG allows simple math
with targets including addition, subtraction, multiplication, and division. In a single target you
can both pull data from external files and make multiple snmp queries to multiple targets.

	A word of caution on division, somewhat simplified:
	Before MRTG was made compatible with rrdtool, it would just drop the non-integer part of the result
of any target math. 99.7 % became 99 %. (Rrdtool, long story short, provides an advanced method of
handling log files, and that's a gross oversimplification.) Rrdtool can handle non-integers and
MRTG's traditional log file handler, rateup, cannot. So somewhere around the time MRTG was made
compatible with rrdtool, its data parsing was changed to preserve non-integer portions of numbers.
When rateup sees these non-integers in log files, it says 'huh?' and flatlines all graphs to zero. I
found this problem when upgrading from 2.8.9 to 2.9.4, tweaked mrtg itself, but didn't get around to
submitting a patch until 2.9.10. 2.9.11 and 2.9.12 were modified so that when rateup is used instead
of rrdtool, MRTG rounds numbers before putting them in log files. And that's the simple version of
the story.

Best regards,
James

"Hunt, Chris" wrote:
> 
> Hi,
> 
> I've recently looked at deployment of MRTG for coverage of our WAN links'
> throughput. I'm quite impressed so far but my management say that they would
> be happier with seeing a pair of graph lines in the chart that just show
> percentage utilisation.
> 
> I replied that they should look at the figures below the graph, but they
> want the graph to be in the form of a percentage of available bandwidth
> rather than the actual number of octets.
> 
> I have tried many different combinations of the target expressions and tried
> to get a situation where I can divide each throughput figure by the value of
> (100/MaxBytes) to get a percentage.
> 
> I have tried playing with the dorelpercent option, but that just seems to
> work with one value relative to the other.
> 
> Has anyone achieved this? I'd be very keen to know (and very grateful).
> 
> Chris Hunt,
> Network Systems
> Lehman Brothers
> 
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://www.ee.ethz.ch/~slist/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list