Shawn wrote:
> rrdtool graph count.png --end now --start end-180d
> DEF:count=doc_counter.rrd:count:AVERAGE CDEF:perday=count,86400,*
> LINE1:perday#0000FF:"docs per day\l"

Just a comment, but it's probably Bad Practice to make a CDEF with the name 
'count' since 'COUNT' is a special function in RRD RPN.  You get away with it 
here because the variable names are case sensitive (so RRDtool knows COUNT != 
count) but it makes for confusion.

Try prefixing a DS name with 'ds', a vdef with 'v' and a cdef with 'c' for 
clarity (I developed this idea when I started to get confused, but havent 
backported it to routers2 completely yet):

rrdtool graph count.png --end now --start end-180d
DEF:dscount=doc_counter.rrd:count:AVERAGE CDEF:cperday=dscount,86400,*
LINE1:cperday#0000FF:"docs per day\l"

Works the same but can help to make complex graph definitions more readable -- 
and will protect you from problems should any future verison of RRDTool make 
the RPN functions case-insensitive.

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
[email protected]
Ph: +64 9 373 7599 ext 86487


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

Reply via email to