[rrd-users] Simple question about calculating

Simon Hobson linux at thehobsons.co.uk
Sun Feb 20 19:01:50 CET 2011


JoeSpam8 wrote:

>  > Will someone help me understand how I can divide by 1000 and show the full
>>  number in the graph? I want to see my real numbers as 1504 and 640 and not
>  > as 1.5k and 0.6k.


>   GPRINT:totalHour-last:"%7.4lf%Swatt" \
>   GPRINT:totalHour-min:"%8.4lf%Swatt" \
>   GPRINT:totalHour-avg:"%9.4lf%Swatt" \
>   GPRINT:totalHour-max:"%9.4lf%Swatt\l"

http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html

Try changing %7.4lf%S to %7.0lf

%7.4lf means use 7 characters (including the decimal point IIRC) and 
4 decimal places. %S means to scale the numbers and apply an SI 
multiplier. Hence (I think) 1504 becomes 1.5040k

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the rrd-users mailing list