[rrd-users] Modifying results for GPRINT output

Piers Kittel mailing at biased.org
Sun Sep 2 13:19:27 CEST 2007


On 2 Sep 2007, at 09:42, Reinhard Scheck wrote:

> Piers Kittel wrote:
>> One flash from the meter represents 1/800th of a kW.  I
>> modified my y axis to show the correct value - multiply by 1250 to
>> give watts
> 1/800th of a kW is 1.25 Watts
> So, the math to convert a counter tick to Watts is COUNTER/1.25  
> instead of
> multiplying

I think I made a mistake in explaining what the flashes mean.  800  
flashes represents 1 kW, so if rrdtool records 800 flashes, it is  
actually 1kW, and to get 1kW from 800, I need to multiply by 1.25.   
Actually, I have to multiply by a further thousand to get rid of the  

> Please bear in mind, that rrdtool COUNTERS are always stored as a  
> rate. So the
> "step" (updating interval for rrd file) comes into account. You did  
> not show us
> the rrd file definitions (rrdtool info will show them).

It's attached to this email as it's slightly lengthy.  I'm recording  
data for a period of 1 day, 1 week, 1 month, 1 year and 5 years.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: meter.info
Type: application/octet-stream
Size: 2023 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20070902/86fbe4db/attachment.obj 
-------------- next part --------------

>> rrdtool graph -w 800 -h 250 --vertical-label "Watts" /home/piers/
>> software/rrdtool/leccyday.png DEF:usage=/home/piers/software/rrdtool/
>> meter.rrd:meter:MAX CDEF:realusage=usage,1250,\*
>> LINE1:realusage#0000FF VDEF:usagemax=usage,MAXIMUM
>> GPRINT:usagemax:"Max\: %lfw" > /dev/null
>> I tried inserting a snippet "CDEF:usagemax2=usagemax,1250,*" but  I
>> got "ERROR: rpn expressions without DEF or CDEF variables are not
>> supported"
> Refer to the DEF=usage instead

That fixed it - thanks!

Thanks so very much for your time - it is much appreciated!

Regards - Piers

More information about the rrd-users mailing list