[rrd-users] Re: Graphing CPU values < 1 (wierd graphs)
Steve Smith
srsmith at mail.arc.nasa.gov
Thu Nov 6 20:47:16 MET 2003
Hi,
I posted the question below to the list and was helped with a solution
that I wanted to pass along to others. The change makes it possible
produce unscaled graphs on a per target basis, by passing the
--units-exponent=0 parameter to rrdgraph..
MRTG_lib.pm needs to have the new keyword added ("noscale"), and then
similar modifications are made to mrtg-rrd, 14all, or what ever you use
to produce the graphs. This assumes MRTG 2-10.5, and mrtg-rrd 0.7.
To invoke it , simply use the keyword 'noscale' on the Options line of
your mrtg.cfg, e.g.,
Title[r2-load-stat]: 1 Minute: Load Ave
PageTop[r2-load-stat]: <H1> Load Average</H1>
Options[r2-load-stat]: gauge,nopercent,noo,noscale
LegendI[r2-load-stat]: Load
LegendO[r2-load-stat]:
YLegend[r2-load-stat]: Load Ave
ShortLegend[r2-load-stat]:
Legend1[r2-load-stat]: One Minute Load Average
Legend2[r2-load-stat]:
Target[r2-load-stat]: OID:comm at target
Here are the diffs:
*** MRTG_lib.pm Wed Nov 5 14:56:39 2003
--- /usr/local/src/mrtg-2.10.5/lib/mrtg2/MRTG_lib.pm Fri Oct 3
05:21:27 2003
***************
*** 560,566 ****
my(@known_options) = qw(growright bits noinfo absolute gauge
nopercent avgpeak
integer perhour perminute transparent
dorelpercent
unknaszero withzeroes noborder noarrow noi noo
! nobanner nolegend pngdate printrouter noscale);
snmpmapOID('hrSystemUptime' => '1.3.6.1.2.1.25.1.1');
--- 560,566 ----
my(@known_options) = qw(growright bits noinfo absolute gauge
nopercent avgpeak
integer perhour perminute transparent
dorelpercent
unknaszero withzeroes noborder noarrow noi noo
! nobanner nolegend pngdate printrouter);
snmpmapOID('hrSystemUptime' => '1.3.6.1.2.1.25.1.1');
=======================================
And for mrtg-rrd:
*** /usr/local/src/mrtg-rrd-0.7/mrtg-rrd.cgi Thu Oct 9 22:09:11 2003
--- mrtg-rrd.cgi Thu Nov 6 11:27:02 2003
***************
*** 542,547 ****
--- 543,552 ----
'MGRID#000000', '-c', 'FRAME#000000',
'-g', '-l', '0';
+ if (defined $target->{options}{noscale}) {
+ push @args, "--units-exponent", 0;
+ }
+
$target->{background} = '#f5f5f5'
unless defined $target->{background};
Thanks to Serge Maandag who sent me in the right direction.
-Steve
Steve Smith wrote:
>
> Hi,
>
> I am trying to plot a fractional value (string) for the 1 minute CPU
> load of a host using the configuration below. However, the graph comes
> up with "200 m" and "400 m" for the Y-axis labels, when the value <
> 1. The values on LegendI are correct and compare with the snmpget
> values. So things are working, except for the Y-axis labels.
>
> Can someone tell me what I am doing wrong? I am using mrtg 2.10.5,
> rrdtool 1.0.45, and the mrtg-rrd and 14all cgi's.
>
> Title[r2-load2-stat]: Load Ave
> PageTop[r2-load2-stat]: <H1>Load Average</H1>
> Options[r2-load2-stat]: gauge,nopercent,noo,unknaszero
> LegendI[r2-load2-stat]: Load
> LegendO[r2-load2-stat]:
> YLegend[r2-load2-stat]: Load Ave
> ShortLegend[r2-load2-stat]:
> Legend1[r2-load2-stat]: One Minute Load Average
> Legend2[r2-load2-stat]:
> Target[r2-load2-stat]:.1.3.6.1.4.1.2021.10.1.3.1&.1.3.6.1.4.1.2021.10.1.3.1:commstr at host.domain
>
>
> Thanks,
> -Steve
>
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list