If no graph functions are called, the graph will not be created.
The x-axis label is configured, using the following format:
GTM:GST:MTM:MST:LTM:LST:LPR:LFM
You have to configure three elements making up the x-axis labels and grid. The base grid (G??), the major grid (M??) and the labels (L??). The configuration is based on the idea that you first specify a well known amount of time (?TM) and then say how many times it has to pass between each grid line or label (?ST). For the label you have to define two additional items: The precision of the label in seconds (LPR) and the strftime format used to generate the text of the label (LFM).
The ?TM elements must be one of the following keywords: SECOND, MINUTE, HOUR, DAY, WEEK, MONTH or YEAR.
If you wanted a graph with a base grid every 10 minutes and a major one every hour, with labels every hour you would use the following x-axis definition.
MINUTE:10:HOUR:1:HOUR:1:0:%X
The precision in this example is 0 because the %X format is
exact. If the label was the name of the day, we would have had a precision
of 24 hours, because when you say something like 'Monday' you mean the
whole day and not Monday morning 00:00. Thus the label should be positioned
at noon. By defining a precision of 24 hours or rather 86400 seconds, you
make sure that this happens.
If this is all a big load of incomprehensible words for you, maybe this example helps: The expression 5+3*2 becomes 5,3,2,*,+ in RPN. First the three numbers get pushed onto the stack, then the * operator pops two values from the stack multiplies them and pushes them back onto the stack. Then the + operator pops again two values from the stack, adds them and pushes the result back onto the stack. In the end there is only one value left on the stack: The result of the expression.
The rpn-expression in the CDEF function takes both, constant values as well as vname variables. The following operators can be used on these values:
printf the result to stdout using format.
Valid characters are: j for justified, l for left aligned, r for right aligned and c for centered. In the next section there is an example showing how to use centered formating.
A special case is COMMENT:\s this inserts some additional vertical space before placing the next row of legends.
rrdtool graph demo.gif --title="Demo Graph" \
DEF:cel=demo.rrd:exhaust:AVERAGE \
"CDEF:far=temp,32,-,0.55555,*" \
LINE2:cel#00a000:"D. Celsius" \
LINE2:far#ff0000:"D. Fahrenheit\c"