Code

Imported upstream SVN snapshot 1.4~rc2+20090928.
[pkg-rrdtool.git] / doc / rrdgraph.1
index d6459468617a28f5d75a0e72ab8b387edee62d82..5a9451a80ad7f61e8c42020b5ac4885635d5e099 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.08)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\" ========================================================================
 .\"
 .IX Title "RRDGRAPH 1"
-.TH RRDGRAPH 1 "2009-04-07" "1.3.8" "rrdtool"
+.TH RRDGRAPH 1 "2009-09-24" "1.3.999" "rrdtool"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -174,14 +174,12 @@ using a rather powerful \fB\s-1RPN\s0\fR command set.
 .PP
 When you are done fetching and processing the data, it is time to
 graph it (or print it).  This ends the \fBrrdtool graph\fR sequence.
+.PP
+Use \fBgraphv\fR instead of \fBgraph\fR to get detailed information about the
+graph geometry and data once it is drawn. See the bottom of the document for
+more information.
 .SH "OPTIONS"
 .IX Header "OPTIONS"
-.SS "\fBgraphv\fP"
-.IX Subsection "graphv"
-This alternate version of \fBgraph\fR takes the same arguments and performs the
-same function. The \fIv\fR stands for \fIverbose\fR, which describes the output
-returned. \fBgraphv\fR will return a lot of information about the graph using
-the same format as rrdtool info (key = value). See the bottom of the document for more information.
 .SS "\fIfilename\fP"
 .IX Subsection "filename"
 The name and path of the graph to generate. It is recommended to
@@ -213,20 +211,6 @@ one pixel will silently be ignored.
 .PP
 A horizontal string at the top of the graph and/or a vertically
 placed string at the left hand side of the graph.
-.SS "Right Axis"
-.IX Subsection "Right Axis"
-[\fB\-\-right\-axis\fR \fIscale\fR\fB:\fR\fIshift\fR]
-[\fB\-\-right\-axis\-label\fR \fIlabel\fR]
-.PP
-A second axis will be drawn to the right of the graph. It is tied to the
-left axis via the scale and shift parameters. You can also define a label
-for the right axis.
-.PP
-[\fB\-\-right\-axis\-format\fR \fIformat-string\fR]
-.PP
-By default the format of the axis lables gets determined automatically. If
-you want todo this your self, use this option with the same \f(CW%lf\fR arguments
-you know from the \s-1PRING\s0 and \s-1GPRINT\s0 commands.
 .SS "Size"
 .IX Subsection "Size"
 [\fB\-w\fR|\fB\-\-width\fR \fIpixels\fR]
@@ -292,19 +276,17 @@ appearance. If this is not to your liking, you can use this switch
 to turn this behaviour off.
 .PP
 Gridfitting is turned off for \s-1PDF\s0, \s-1EPS\s0, \s-1SVG\s0 output by default.
-.SS "Grid"
-.IX Subsection "Grid"
-.IP "X\-Axis" 4
-.IX Item "X-Axis"
+.SS "X\-Axis"
+.IX Subsection "X-Axis"
 [\fB\-x\fR|\fB\-\-x\-grid\fR \fI\s-1GTM\s0\fR\fB:\fR\fI\s-1GST\s0\fR\fB:\fR\fI\s-1MTM\s0\fR\fB:\fR\fI\s-1MST\s0\fR\fB:\fR\fI\s-1LTM\s0\fR\fB:\fR\fI\s-1LST\s0\fR\fB:\fR\fI\s-1LPR\s0\fR\fB:\fR\fI\s-1LFM\s0\fR]
-.Sp
+.PP
 [\fB\-x\fR|\fB\-\-x\-grid\fR \fBnone\fR]
-.Sp
+.PP
 The x\-axis label is quite complex to configure. If you don't have
 very special needs it is probably best to rely on the autoconfiguration
 to get this right. You can specify the string \f(CW\*(C`none\*(C'\fR to suppress the grid
 and labels altogether.
-.Sp
+.PP
 The grid is defined by specifying a certain amount of time in the \fI?TM\fR
 positions. You can choose from \f(CW\*(C`SECOND\*(C'\fR, \f(CW\*(C`MINUTE\*(C'\fR, \f(CW\*(C`HOUR\*(C'\fR, \f(CW\*(C`DAY\*(C'\fR,
 \&\f(CW\*(C`WEEK\*(C'\fR, \f(CW\*(C`MONTH\*(C'\fR or \f(CW\*(C`YEAR\*(C'\fR. Then you define how many of these should
@@ -316,52 +298,52 @@ where each label will be placed. If it is zero, the label will be
 placed right under the corresponding line (useful for hours, dates
 etcetera).  If you specify a number of seconds here the label is
 centered on this interval (useful for Monday, January etcetera).
-.Sp
+.PP
 .Vb 1
 \& \-\-x\-grid MINUTE:10:HOUR:1:HOUR:4:0:%X
 .Ve
-.Sp
+.PP
 This places grid lines every 10 minutes, major grid lines every hour,
 and labels every 4 hours. The labels are placed under the major grid
 lines as they specify exactly that time.
-.Sp
+.PP
 .Vb 1
 \& \-\-x\-grid HOUR:8:DAY:1:DAY:1:86400:%A
 .Ve
-.Sp
+.PP
 This places grid lines every 8 hours, major grid lines and labels
 each day. The labels are placed exactly between two major grid lines
 as they specify the complete day and not just midnight.
-.IP "Y\-Axis" 4
-.IX Item "Y-Axis"
+.SS "Y\-Axis"
+.IX Subsection "Y-Axis"
 [\fB\-y\fR|\fB\-\-y\-grid\fR \fIgrid step\fR\fB:\fR\fIlabel factor\fR]
-.Sp
+.PP
 [\fB\-y\fR|\fB\-\-y\-grid\fR \fBnone\fR]
-.Sp
+.PP
 Y\-axis grid lines appear at each \fIgrid step\fR interval.  Labels are
 placed every \fIlabel factor\fR lines.  You can specify \f(CW\*(C`\-y none\*(C'\fR to
 suppress the grid and labels altogether.  The default for this option is
 to automatically select sensible values.
-.Sp
+.PP
 If you have set \-\-y\-grid to 'none' not only the labels get suppressed, also
 the space reserved for the labels is removed. You can still add space
 manually if you use the \-\-units\-length command to explicitly reserve space.
-.Sp
+.PP
 [\fB\-Y\fR|\fB\-\-alt\-y\-grid\fR]
-.Sp
+.PP
 Place the Y grid dynamically based on the graph's Y range. The algorithm
 ensures that you always have a grid, that there are enough but not too many
 grid lines, and that the grid is metric. That is the grid lines are placed
 every 1, 2, 5 or 10 units. This parameter will also ensure that you get
 enough decimals displayed even if your graph goes from 69.998 to 70.001. 
 (contributed by Sasha Mikheev).
-.Sp
+.PP
 [\fB\-o\fR|\fB\-\-logarithmic\fR]
-.Sp
+.PP
 Logarithmic y\-axis scaling.
-.Sp
+.PP
 [\fB\-X\fR|\fB\-\-units\-exponent\fR \fIvalue\fR]
-.Sp
+.PP
 This sets the 10**exponent scaling of the y\-axis values. Normally,
 values will be scaled to the appropriate units (k, M, etc.).  However,
 you may wish to display units always in k (Kilo, 10e3) even if the data
@@ -371,23 +353,59 @@ the exponent on the units you wish to use. For example, use 3 to
 display the y\-axis values in k (Kilo, 10e3, thousands), use \-6 to
 display the y\-axis values in u (Micro, 10e\-6, millionths).  Use a value
 of 0 to prevent any scaling of the y\-axis values.
-.Sp
+.PP
 This option is very effective at confusing the heck out of the default
 rrdtool autoscaler and grid painter. If rrdtool detects that it is not
 successful in labeling the graph under the given circumstances, it will switch
 to the more robust \fB\-\-alt\-y\-grid\fR mode.
-.Sp
+.PP
 [\fB\-L\fR|\fB\-\-units\-length\fR \fIvalue\fR]
-.Sp
+.PP
 How many digits should rrdtool assume the y\-axis labels to be? You
 may have to use this option to make enough space once you start
-fideling with the y\-axis labeling.
-.Sp
+fiddling with the y\-axis labeling.
+.PP
 [\fB\-\-units=si\fR]
-.Sp
+.PP
 With this option y\-axis values on logarithmic graphs will be scaled to 
 the appropriate units (k, M, etc.) instead of using exponential notation.
 Note that for linear graphs, \s-1SI\s0 notation is used by default.
+.SS "Right Y Axis"
+.IX Subsection "Right Y Axis"
+[\fB\-\-right\-axis\fR \fIscale\fR\fB:\fR\fIshift\fR]
+[\fB\-\-right\-axis\-label\fR \fIlabel\fR]
+.PP
+A second axis will be drawn to the right of the graph. It is tied to the
+left axis via the scale and shift parameters. You can also define a label
+for the right axis.
+.PP
+[\fB\-\-right\-axis\-format\fR \fIformat-string\fR]
+.PP
+By default the format of the axis lables gets determined automatically. If
+you want todo this your self, use this option with the same \f(CW%lf\fR arguments
+you know from the \s-1PRING\s0 and \s-1GPRINT\s0 commands.
+.SS "Legend"
+.IX Subsection "Legend"
+[\fB\-g\fR|\fB\-\-no\-legend\fR]
+.PP
+Suppress generation of the legend; only render the graph.
+.PP
+[\fB\-F\fR|\fB\-\-force\-rules\-legend\fR]
+.PP
+Force the generation of \s-1HRULE\s0 and \s-1VRULE\s0 legends even if those \s-1HRULE\s0 or
+\&\s-1VRULE\s0 will not be drawn because out of graph boundaries (mimics
+behaviour of pre 1.0.42 versions).
+.PP
+[\fB\-\-legend\-position\fR=(north|south|west|east)]
+.PP
+Place the legend at the given side of the graph. The default is south.
+In west or east position it is necessary to add line breaks manually.
+.PP
+[\fB\-\-legend\-direction\fR=(topdown|bottomup)]
+.PP
+Place the legend items in the given vertical order. The default is topdown.
+Using bottomup the legend items appear in the same vertical order as a
+stack of lines or areas.
 .SS "Miscellaneous"
 .IX Subsection "Miscellaneous"
 [\fB\-z\fR|\fB\-\-lazy\fR]
@@ -400,6 +418,17 @@ can realy rely on before rrdtool 1.3.7 is that lazy will not generate the
 graph when it is already there and up to date, and also that it will output
 the size of the graph.
 .PP
+[\fB\-\-daemon\fR \fIaddress\fR]
+.PP
+Address of the rrdcached daemon. If specified, a \f(CW\*(C`flush\*(C'\fR command is sent
+to the server before reading the \s-1RRD\s0 files. This allows the graph to contain
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
+.PP
+.Vb 1
+\& rrdtool graph [...] \-\-daemon unix:/var/run/rrdcached.sock [...]
+.Ve
+.PP
 [\fB\-f\fR|\fB\-\-imginfo\fR \fIprintfstr\fR]
 .PP
 After the image has been created, the graph function uses printf
@@ -429,6 +458,12 @@ multiple defaults.
 .PP
 A green arrow is made by: \f(CW\*(C`\-\-color ARROW#00FF00\*(C'\fR
 .PP
+[\fB\-\-border\fR \fIwidth\fR]]
+.PP
+Width in pixels for the 3d border drawn around the image. Default 2, 0
+disables the border. See \f(CW\*(C`SHADEA\*(C'\fR and \f(CW\*(C`SHADEB\*(C'\fR above for setting the border
+color.
+.PP
 [\fB\-\-zoom\fR \fIfactor\fR]
 .PP
 Zoom the graphics by the given amount. The factor must be > 0
@@ -443,6 +478,10 @@ edge of the graph.
 .PP
 Use Times for the title: \f(CW\*(C`\-\-font TITLE:13:Times\*(C'\fR
 .PP
+Note that you need to quote the argument to \fB\-\-font\fR if the font-name
+contains whitespace:
+\&\-\-font \*(L"TITLE:13:Some Font\*(R"
+.PP
 If you do not give a font string you can modify just the size of the default font:
 \&\f(CW\*(C`\-\-font TITLE:13:\*(C'\fR.
 .PP
@@ -536,16 +575,6 @@ Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.
 .PP
 If images are interlaced they become visible on browsers more quickly.
 .PP
-[\fB\-g\fR|\fB\-\-no\-legend\fR]
-.PP
-Suppress generation of the legend; only render the graph.
-.PP
-[\fB\-F\fR|\fB\-\-force\-rules\-legend\fR]
-.PP
-Force the generation of \s-1HRULE\s0 and \s-1VRULE\s0 legends even if those \s-1HRULE\s0 or
-\&\s-1VRULE\s0 will not be drawn because out of graph boundaries (mimics
-behaviour of pre 1.0.42 versions).
-.PP
 [\fB\-T\fR|\fB\-\-tabwidth\fR \fIvalue\fR]
 .PP
 By default the tab-width is 40 pixels, use this option to change it.
@@ -608,6 +637,15 @@ the output will look like this:
 There is more information returned than in the standard interface.
 Especially the 'graph_*' keys are new. They help applications that want to
 know what is where on the graph.
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ graph\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 rrdgraph gives an overview of how \fBrrdtool graph\fR works.