rrdtool graph - Create a graph based on data from one or several RRD
rrdtool graph filename [-s|--start seconds] [-e|--end seconds] [-x|--x-grid x-axis grid and label] [-y|--y-grid y-axis grid and label] [--alt-y-grid] [--alt-autoscale] [--alt-autoscale-max] [--units-exponent] value]> [-v|--vertical-label text] [-w|--width pixels] [-h|--height pixels] [-i|--interlaced] [-f|--imginfo formatstring] [-a|--imgformat GIF|PNG] [-z|--lazy] [-o|--logarithmic] [-u|--upper-limit value] [-l|--lower-limit value] [-r|--rigid] [--step value] [-b|--base value] [-c|--color COLORTAG#rrggbb] [-t|--title title] [DEF:vname=rrd:ds-name:CF] [CDEF:vname=rpn-expression] [PRINT:vname:CF:format] [GPRINT:vname:CF:format] [COMMENT:text] [HRULE:value#rrggbb[:legend]] [VRULE:time#rrggbb[:legend]] [LINE{1|2|3}:vname[#rrggbb[:legend]]] [AREA:vname[#rrggbb[:legend]]] [STACK:vname[#rrggbb[:legend]]]
The graph functions main purpose is to create graphical representations of the data stored in one or several RRDs. Apart from generating graphs, it can also extract numerical reports.
PNG output is recommended, since it takes up to 40% less disk space and 20-30% less time to generate than a GIF file.
If no graph functions are called, the graph will not be created.
If you want no x-grid at all, use the magic setting none.
The x-axis label and grid can be 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 you want no y-grid at all set specify the magic word none.