thanks for your time
_______________________________________________
rrd-users mailing list
rrd-...@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
It is possible that you're using an old version that doesnt support it, or you're using the option incorrectly, or you're expecting something to happen which is not supposed to...
Steve
Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
s.sh...@auckland.ac.nz
Ph: +64 9 373 7599 ext 86487
________________________________________
From: rrd-users-bounces+s.shipway=aucklan...@lists.oetiker.ch [rrd-users-bounces+s.shipway=aucklan...@lists.oetiker.ch] on behalf of Matt Elias [m_e...@fastmail.fm]
Sent: Tuesday, 2 November 2010 4:48 a.m.
To: rrd-...@lists.oetiker.ch
Subject: [rrd-users] RRDs::graph right axis syntax
My main concern is that the documentation here,
http://www.mrtg.org/rrdtool/doc/rrdgraph.en.html does not specify how to
use the 'Right Y Axis' option from within the RRDs Perl module. Most of
the other options for example, show [-t|--title string] where -t is used
within the Perl module and --title string is used from the command line,
at least that's been my experience so far.
As I said earlier, when I use the '--right-axis-label "Relative
Humidity"' option with 'rrdtool graph' from the command line, I get the
expected results. But I can not find any reference in any documentation
for how to implement that same option from within the RRDs Perl module.
The following code works from within Perl. How do I add the
right-axis-label option to it?
RRDs::graph "test.png",
"-s 24hr",
"-t Outdoor Temperature/Humidity: 24hr",
"-h 120", "-w 830",
"-a", "PNG",
"-v deg C",
"DEF:OutTemp=$rrd/Weather.rrd:OutTemp:AVERAGE",
"DEF:OutHum=$rrd/Weather.rrd:OutHum:AVERAGE",
"CDEF:nan=OutTemp,UN,INF,UNKN,IF",
"AREA:nan#FF000070",
"LINE1:OutTempM#32CD32:Temperature C",
"GPRINT:OutTemp:MAX:Max\\: %5.1lf %s",
"GPRINT:OutTemp:AVERAGE:Avg\\: %5.1lf %s",
"GPRINT:OutTemp:MIN:Min\\: %5.1lf %s",
"GPRINT:OutTemp:LAST:Last\\: %5.1lf %s\\l",
"LINE1:OutHum#4169E1:Humidity % ",
"GPRINT:OutHum:MAX:Max\\: %5.1lf %s",
"GPRINT:OutHum:AVERAGE:Avg\\: %5.1lf %s",
"GPRINT:OutHum:MIN:Min\\: %5.1lf %s",
"GPRINT:OutHum:LAST:Last\\: %5.1lf %s\\l";
Matt
perl -e 'use RRDs; print $RRDs::VERSION;'
It should be the same as your binary (1.4.3 in your case). Depending on where the module is installed you may need to push the path into @INC for the above scriptlet to work.
The Routers2 program uses the second-axis code in RRDTool. You need to set the axis label (--right-axis-label label), and the scaleshift for the second axis (--right-axis scale:shift). These parameters can be passed in the same way as any other parameters. I think (but am not sure) that the second axis label will not display unless you have a scaleshift option set.
--right-axis-label "My second axis" --right-axis 10:0
In this example, the new axis is scaled by a factor of 10, and shifted by 0.
--right-axis-label "Farenheit" --right-axis 1.8:32
This example allows you to have a graph in Celsius show a second axis for Farenheit (I believe Americans are still using this :)
If you just want a second axis label with no scale shift, use '--right-axis 1:0'
Steve
Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
s.sh...@auckland.ac.nz
Ph: +64 9 373 7599 ext 86487
_______________________________________________