Discussion:
[rrd-users] MIN AVG MAX LAST Values
(too old to reply)
Simon Pickard
2014-12-30 19:22:25 UTC
Permalink
Hello,

I am using rrdtool to graph reading from various temp sensors.

If a value goes between 0.00 & -0.99 the MIN AVG MAX or LAST values shown
on the graph read as 876m for example rather than the degree reading.

Here is the code to create the graph...

rrdtool graph $DIR/flue_temp_hourly_60.png \
--start -4h \
--end=now \
--title="$TITLE" \
--imgformat=PNG \
--width=800 \
--base=1000 \
--height=240 \
--rigid \
--interlaced \
--slope-mode \
--vertical-label "Temperature (C)" \
--right-axis-label "Temperature (C)" \
--right-axis 1:0 \
"DEF:flueTemp=$DIR/28.18667B050000.rrd:t:AVERAGE" \
"DEF:outsideTemp=$DIR/28.73367C050000.rrd:t:AVERAGE" \
"DEF:temp=$DIR/28.18667B050000.rrd:t:AVERAGE" \
LINE2:flueTemp$TEMP1_COLOR:"Flue Temp [deg $TEMP_SCALE]" \
VDEF:Flue_Temp_MIN=flueTemp,MINIMUM \
GPRINT:Flue_Temp_MIN:"Min\:%8.2lf%s" \
VDEF:Flue_Temp_AVERAGE=flueTemp,AVERAGE \
GPRINT:Flue_Temp_AVERAGE:"Avg\:%8.2lf%s" \
VDEF:Flue_Temp_MAX=flueTemp,MAXIMUM \
GPRINT:Flue_Temp_MAX:"Max\:%8.2lf%s" \
VDEF:Flue_Temp_LAST=flueTemp,LAST \
GPRINT:Flue_Temp_LAST:"LAST\:%8.2lf%s\n" \
\
LINE2:outsideTemp$OUTTEMP_COLOR:"Outside Temp [deg $TEMP_SCALE]" \
VDEF:Return_Temp_MIN=outsideTemp,MINIMUM \
GPRINT:Return_Temp_MIN:"Min\:%8.2lf%s" \
VDEF:Return_Temp_AVERAGE=outsideTemp,AVERAGE \
GPRINT:Return_Temp_AVERAGE:"Avg\:%8.2lf%s" \
VDEF:Return_Temp_MAX=outsideTemp,MAXIMUM \
GPRINT:Return_Temp_MAX:"Max\:%8.2lf%s" \
VDEF:Return_Temp_LAST=outsideTemp,LAST \
GPRINT:Return_Temp_LAST:"LAST\:%8.2lf%s\n"


Can anyone offer any suggestions as to why?
Petteri Matilainen
2014-12-30 19:32:16 UTC
Permalink
Post by Simon Pickard
Hello,
I am using rrdtool to graph reading from various temp sensors.
If a value goes between 0.00 & -0.99 the MIN AVG MAX or LAST values
shown on the graph read as 876m for example rather than the degree reading.
Here is the code to create the graph...
rrdtool graph $DIR/flue_temp_hourly_60.png \
--start -4h \
--end=now \
--title="$TITLE" \
--imgformat=PNG \
--width=800 \
--base=1000 \
--height=240 \
--rigid \
--interlaced \
--slope-mode \
--vertical-label "Temperature (C)" \
--right-axis-label "Temperature (C)" \
--right-axis 1:0 \
"DEF:flueTemp=$DIR/28.18667B050000.rrd:t:AVERAGE" \
"DEF:outsideTemp=$DIR/28.73367C050000.rrd:t:AVERAGE" \
"DEF:temp=$DIR/28.18667B050000.rrd:t:AVERAGE" \
LINE2:flueTemp$TEMP1_COLOR:"Flue Temp [deg $TEMP_SCALE]" \
VDEF:Flue_Temp_MIN=flueTemp,MINIMUM \
GPRINT:Flue_Temp_MIN:"Min\:%8.2lf%s" \
VDEF:Flue_Temp_AVERAGE=flueTemp,AVERAGE \
GPRINT:Flue_Temp_AVERAGE:"Avg\:%8.2lf%s" \
VDEF:Flue_Temp_MAX=flueTemp,MAXIMUM \
GPRINT:Flue_Temp_MAX:"Max\:%8.2lf%s" \
VDEF:Flue_Temp_LAST=flueTemp,LAST \
GPRINT:Flue_Temp_LAST:"LAST\:%8.2lf%s\n" \
\
LINE2:outsideTemp$OUTTEMP_COLOR:"Outside Temp [deg $TEMP_SCALE]" \
VDEF:Return_Temp_MIN=outsideTemp,MINIMUM \
GPRINT:Return_Temp_MIN:"Min\:%8.2lf%s" \
VDEF:Return_Temp_AVERAGE=outsideTemp,AVERAGE \
GPRINT:Return_Temp_AVERAGE:"Avg\:%8.2lf%s" \
VDEF:Return_Temp_MAX=outsideTemp,MAXIMUM \
GPRINT:Return_Temp_MAX:"Max\:%8.2lf%s" \
VDEF:Return_Temp_LAST=outsideTemp,LAST \
GPRINT:Return_Temp_LAST:"LAST\:%8.2lf%s\n"
Can anyone offer any suggestions as to why?
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Hi Simon,

Try -X 0 which disables the use of units (m=milli etc.) for y-grid. See
http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html

regards,

Pete
Alex van den Bogaerdt
2014-12-30 19:34:20 UTC
Permalink
----- Original Message -----
From: "Simon Pickard" <***@gmail.com>
To: <rrd-***@lists.oetiker.ch>
Sent: Tuesday, December 30, 2014 8:22 PM
Subject: [rrd-users] MIN AVG MAX LAST Values
Post by Simon Pickard
Hello,
I am using rrdtool to graph reading from various temp sensors.
If a value goes between 0.00 & -0.99 the MIN AVG MAX or LAST values shown
on the graph read as 876m for example rather than the degree reading.
You want 0.876 instead of 876m ?

Perhaps --units-exponent 0 can help. See
http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html

HTH
Alex
Alex van den Bogaerdt
2014-12-30 21:19:59 UTC
Permalink
Sorry, I misread your initial post. units-exponent is about the axis, not
the legend.

You want to remove the %s from your GPRINT statements.
By including those you ask to get "m" (in this case)


----- Original Message -----
From: "Simon Pickard" <***@gmail.com>
To: "Alex van den Bogaerdt" <***@vandenbogaerdt.nl>
Cc: <rrd-***@lists.oetiker.ch>
Sent: Tuesday, December 30, 2014 9:45 PM
Subject: Re: [rrd-users] MIN AVG MAX LAST Values
Post by Simon Pickard
Hello,
Thanks for the help...I have added --units-exponent 0 \ but still the
same.
The values don't normally show any units only m when between 0.00
and -0.99.
I have attached an example.
On 30 December 2014 at 19:34, Alex van den Bogaerdt
Post by Alex van den Bogaerdt
Sent: Tuesday, December 30, 2014 8:22 PM
Subject: [rrd-users] MIN AVG MAX LAST Values
Hello,
Post by Simon Pickard
I am using rrdtool to graph reading from various temp sensors.
If a value goes between 0.00 & -0.99 the MIN AVG MAX or LAST values
shown
on the graph read as 876m for example rather than the degree reading.
You want 0.876 instead of 876m ?
Perhaps --units-exponent 0 can help. See http://oss.oetiker.ch/rrdtool/
doc/rrdgraph.en.html
HTH
Alex
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Simon Pickard
2014-12-30 21:50:42 UTC
Permalink
Excellent, works a treat. Can you point me in the direction of the man page
for the GPRINT statments?

Thank you.
Post by Alex van den Bogaerdt
Sorry, I misread your initial post. units-exponent is about the axis, not
the legend.
You want to remove the %s from your GPRINT statements.
By including those you ask to get "m" (in this case)
Sent: Tuesday, December 30, 2014 9:45 PM
Subject: Re: [rrd-users] MIN AVG MAX LAST Values
Hello,
Post by Simon Pickard
Thanks for the help...I have added --units-exponent 0 \ but still the
same.
The values don't normally show any units only m when between 0.00 and
-0.99.
I have attached an example.
On 30 December 2014 at 19:34, Alex van den Bogaerdt <
Post by Alex van den Bogaerdt
Sent: Tuesday, December 30, 2014 8:22 PM
Subject: [rrd-users] MIN AVG MAX LAST Values
Hello,
Post by Simon Pickard
I am using rrdtool to graph reading from various temp sensors.
If a value goes between 0.00 & -0.99 the MIN AVG MAX or LAST values
shown
on the graph read as 876m for example rather than the degree reading.
You want 0.876 instead of 876m ?
Perhaps --units-exponent 0 can help. See http://oss.oetiker.ch/rrdtool/
doc/rrdgraph.en.html
HTH
Alex
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Alex van den Bogaerdt
2014-12-30 22:44:38 UTC
Permalink
that would be http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html
----- Original Message -----
From: "Simon Pickard" <***@gmail.com>
To: "Alex van den Bogaerdt" <***@vandenbogaerdt.nl>
Cc: <rrd-***@lists.oetiker.ch>
Sent: Tuesday, December 30, 2014 10:50 PM
Subject: Re: [rrd-users] MIN AVG MAX LAST Values
Post by Simon Pickard
Excellent, works a treat. Can you point me in the direction of the man
page
for the GPRINT statments?
Thank you.
On 30 December 2014 at 21:19, Alex van den Bogaerdt
Post by Alex van den Bogaerdt
Sorry, I misread your initial post. units-exponent is about the axis,
not
the legend.
You want to remove the %s from your GPRINT statements.
By including those you ask to get "m" (in this case)
Sent: Tuesday, December 30, 2014 9:45 PM
Subject: Re: [rrd-users] MIN AVG MAX LAST Values
Hello,
Post by Simon Pickard
Thanks for the help...I have added --units-exponent 0 \ but still the
same.
The values don't normally show any units only m when between 0.00 and
-0.99.
I have attached an example.
On 30 December 2014 at 19:34, Alex van den Bogaerdt <
Post by Alex van den Bogaerdt
Sent: Tuesday, December 30, 2014 8:22 PM
Subject: [rrd-users] MIN AVG MAX LAST Values
Hello,
Post by Simon Pickard
I am using rrdtool to graph reading from various temp sensors.
If a value goes between 0.00 & -0.99 the MIN AVG MAX or LAST values
shown
on the graph read as 876m for example rather than the degree reading.
You want 0.876 instead of 876m ?
Perhaps --units-exponent 0 can help. See http://oss.oetiker.ch/rrdtool/
doc/rrdgraph.en.html
HTH
Alex
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Loading...