RRDs::graph right axis syntax

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RRDs::graph right axis syntax

m_elias
I'm quite new at using rrdtool and the RRDs perl module, I have also
read through a lot of documentation and searched the interwebs but I can
not find how to specify the right axis scale and label from within the
RRDs module. '--right-axis-label' does not work, only works when using
'rrdtool graph' from the command line. The documentation doesn't seem to
specify a single letter argument for this feature.

thanks for your time

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: RRDs::graph right axis syntax

S Shipway
In order to help you, it would be good if you could post --
1. which version of RRDTool you are using, and are you using it from command line or from C, Perl, Python, etc etc
2. What is the exact command you are giving that is not working, and
3. how it s not working -- for example, attaching the image, or saying 'everything as expected but second y axis missing'.

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
[hidden email]
Ph: +64 9 373 7599 ext 86487


________________________________________
From: rrd-users-bounces+s.shipway=[hidden email] [rrd-users-bounces+s.shipway=[hidden email]] on behalf of Matt Elias [[hidden email]]
Sent: Tuesday, 2 November 2010 4:48 a.m.
To: [hidden email]
Subject: [rrd-users] RRDs::graph right axis syntax

I'm quite new at using rrdtool and the RRDs perl module, I have also
read through a lot of documentation and searched the interwebs but I can
not find how to specify the right axis scale and label from within the
RRDs module. '--right-axis-label' does not work, only works when using
'rrdtool graph' from the command line. The documentation doesn't seem to
specify a single letter argument for this feature.

thanks for your time

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: RRDs::graph right axis syntax

m_elias
1.
Ubuntu Server 10.10
Perl v5.10.1 for x86_64-linux-gnu-thread-multi
RRDtool 1.4.3
RRDs module - I don't know if it has a separate version number but as
far as I know it is a Perl only module. So my RRDs::graph commands are
all in Perl. http://www.mrtg.org/rrdtool/prog/RRDs.en.html

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

On 11/1/2010 1:48 PM, Steve Shipway wrote:

> In order to help you, it would be good if you could post --
> 1. which version of RRDTool you are using, and are you using it from command line or from C, Perl, Python, etc etc
> 2. What is the exact command you are giving that is not working, and
> 3. how it s not working -- for example, attaching the image, or saying 'everything as expected but second y axis missing'.
>
> 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
> [hidden email]
> Ph: +64 9 373 7599 ext 86487
>
>
> ________________________________________
> From: rrd-users-bounces+s.shipway=[hidden email] [rrd-users-bounces+s.shipway=[hidden email]] on behalf of Matt Elias [[hidden email]]
> Sent: Tuesday, 2 November 2010 4:48 a.m.
> To: [hidden email]
> Subject: [rrd-users] RRDs::graph right axis syntax
>
> I'm quite new at using rrdtool and the RRDs perl module, I have also
> read through a lot of documentation and searched the interwebs but I can
> not find how to specify the right axis scale and label from within the
> RRDs module. '--right-axis-label' does not work, only works when using
> 'rrdtool graph' from the command line. The documentation doesn't seem to
> specify a single letter argument for this feature.
>
> thanks for your time
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: RRDs::graph right axis syntax

S Shipway
You can verify which version of the RRDs libraries you are using with:  

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
[hidden email]
Ph: +64 9 373 7599 ext 86487

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users