[mrtg] Draw link load percentage

rihad rihad at mail.ru
Wed Jan 23 08:26:54 CET 2008


Steve Shipway wrote:
>> Is it possible to draw some link's load percentage, and not its actual
>> transfer rate?
> 
> If you are using RRDTool with the routers2 frontend, use
> 
> routers.cgi*Options[xxxx]: aspercent
> 
> and this will give you want you want.  You can also see something
> similar on the 'Compact summary' page using bar graphs for all the
> interfaces at once.
> 
> (end of self-promotion, yes I'm biased, etc etc :P )
> 
It actually turned out to me much easier with plain MRTG.

Target[foo]: link at 1.2.3.4 * 100 / link's maxbytes
# link / maxbytes * 100 won't work probably due to integer division

Probably this google finding works thanks to the very first line of 
*.log files, which "stores the traffic counters from the most recent run 
of mrtg."[*] So, link at 1.2.3.4 always gives the "cooked" current load 
value (which I could play arithmetic games with). even though it's now 
load percentages that are stored from line 2 down,

Thanks anyway.

[*] http://oss.oetiker.ch/mrtg/doc/mrtg-logfile.en.html



More information about the mrtg mailing list