NAME

rrdtool graph - Create a graph based on data from one or several RRD

PDF version.


SYNOPSIS

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]]]


DESCRIPTION

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.

filename
The name of the graph to generate. Since rrdtool outputs GIFs and PNGs, it's recommended that the filename end in either .gif or .png. rrdtool does not enforce this, however. If the filename is set to '-' the image file will be written to standard out. All other output will get suppressed.

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.

-s|--start seconds (default end-1day)
The time when the graph should begin. Time in seconds since epoch (1970-01-01) is required. Negative numbers are relative to the current time. By default one day worth of data will be graphed. See also AT-STYLE TIME SPECIFICATION section in the rrdfetch documentation for a detailed explanation on how to specify time.

-e|--end seconds (default now)
The time when the graph should end. Time in seconds since epoch. See also AT-STYLE TIME SPECIFICATION section in the rrdfetch documentation for a detailed explanation of ways to specify time.

-x|--x-grid x-axis grid and label (default autoconfigure)
The x-axis label is quite complex to configure. So if you don't have very special needs, you can rely on the autoconfiguration to get this right.

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.

-y|--y-grid grid step:label factor (default autoconfigure)
Makes vertical grid lines appear at grid step interval. Every label factor gridstep, a major grid line is printed, along with label showing the value of the grid line.

If you want no y-grid at all set specify the magic word none.

--alt-y-grid
Place Y grid dynamically based on graph Y range. Algorithm ensures that you always have grid, that there are enough but not too man