started updating for 1.2 release
[rrdtool.git] / doc / rrdgraph.src
index 0f8489d..7f912be 100644 (file)
@@ -1,6 +1,6 @@
 =include name
 
-=head1 SYNOPSYS
+=head1 SYNOPSIS
 
 B<rrdtool graph> I<filename>
 [E<lt>B<L<option|rrdgraph/OPTIONS>>E<gt> ...]
@@ -12,7 +12,7 @@ E<lt>B<L<data definition|rrdgraph_data/DEF>>E<gt>[ ...]
 
 =head1 DESCRIPTION
 
-The B<graph> function of B<RRDtool> is used to represent the
+The B<graph> function of B<RRDtool> is used to present the
 data from an B<RRD> to a human viewer.  Its main purpose is to
 create a nice graphical representation but it can also generate
 a numerical report.
@@ -26,16 +26,15 @@ collect data from two or more databases (one per statement though).
 
 If you want to display averages, maxima, percentiles etcetera
 it is best to collect them now using the
-B<L<variable definition|rrdgraph_data/VDEF>> statement.  At this
-stage, this command works at the unprocessed data from the B<RRD>.
-I<(Note: this is not yet true; it works on consolidated information
-right now)>
+B<L<variable definition|rrdgraph_data/VDEF>> statement.
+Currently this makes no difference but in a future version
+of rrdtool you may want to collect these values before consolidation.
 
 The data fetched from the B<RRA> is then B<consolidated> so that
 there is exactly one datapoint per pixel in the graph. If you do
 not take care yourself, B<RRDtool> will expand the range slightly
-if necessary (in that case the first pixel may very well become
-unknown!).
+if necessary (in that case the first and/or last pixel may very
+well become unknown!).
 
 Sometimes data is not exactly as you would like to display it. For
 instance, you might be collecting B<bytes> per second but want to
@@ -43,24 +42,19 @@ display B<bits> per second. This is where the
 B<L<data calculation|rrdgraph_data/CDEF>> command is designed for.
 After B<consolidating> the data, a copy is made and this copy is
 modified using a rather flexible B<L<RPN|rrdgraph_rpn/>> command
-set.  If you use B<L<variable definition|rrdgraph_data/VDEF>>
-statements after this, they work on the consolidated data and may
-return other values for maximum, minimum etcetera!
+set.
 
 When you are done fetching and processing the data, it is time to
 graph it (or print it).  This ends the B<rrdtool graph> sequence.
 
 =head1 OPTIONS
 
-It is expected that most options will move to the graph definition
-statements (after all, most of them do define graph elements...).
-
 =over 4
 
 =item filename
 
 The name and path of the graph to generate. It is recommended to
-end this in C<.png>, C<.svg> or C<.eps> but B<rrdtool> does not enforce this.
+end this in C<.png>, C<.svg> or C<.eps> but B<RRDtool> does not enforce this.
 
 I<filename> can be 'C<->' to send the image to C<stdout>. In
 that case, no other output is generated.  
@@ -93,25 +87,27 @@ B<[-t|--title E<lt>stringE<gt>]>
 B<[-v|--vertical-label E<lt>stringE<gt>]>
 
 A horizontal string at the top of the graph and/or a vertically
-placed string at the left hand side of the graph. I<New: (not
-yet implemented)> The string can contain formatter options that
-are used to include variables (from B<VDEF>s) and newlines.
+placed string at the left hand side of the graph.
 
 Z<>
 
 =item Size
 
 B<[-w|--width E<lt>pixelsE<gt>]>
-B<[-h|--heigth E<lt>pixelsE<gt>]>
+B<[-h|--height E<lt>pixelsE<gt>]>
+B<[-j|--only-graph]>
 
 The width and height of the B<canvas> (the part of the graph with
 the actual lines and such). Defaults are 400 pixels by 100 pixels.
 
+If you specify the B<--only-graph> option and set the height E<lt> 32
+pixels you will get a tiny graph image to use as an icon in a potential
+overview. All labeling will be stripped off the graph.
+
 Z<>
 
 =item Limits
 
-I<Old behaviour, until the new options are implemented>
 B<[-u|--upper-limit E<lt>valueE<gt>]>
 B<[-l|--lower-limit E<lt>valueE<gt>]>
 B<[-r|--rigid]>
@@ -123,36 +119,6 @@ at least from B<lower-limit> to B<upper-limit>.  Autoscaling will
 still permit those boundaries to be stretched unless the B<rigid>
 option is set.
 
-I<New behaviour, after the new options are implemented>
-B<[--maximum-upper-limit E<lt>valueE<gt>]>
-B<[--minimum-upper-limit E<lt>valueE<gt>]>
-B<[--maximum-lower-limit E<lt>valueE<gt>]>
-B<[--minimum-lower-limit E<lt>valueE<gt>]>
-
-By default the graph will be autoscaling so that it displays the
-portion of the y-axis that is actually used. You can change this
-behaviour by setting the limits.  The displayed y-axis will show
-at most B<maximum-upper-limit> and at least B<minimum-upper-limit>
-at the top, and similarily at least B<maximum-lower-limit> and
-at most B<minimum-lower-limit> at the bottom.  The default is to
-display at most B<infinity> (so: no limit) and at least
-B<negative infinity> (no minimal value) at the top. The bottom of
-the graph has similar defaults. Note that the minimum lower limit
-is the lowest one so you should compare this with maximum upper
-limit when you try to figure out what you should set.
-
-To make sure the graph shows the range of I<-1000> to I<2000>,
-optionally expanding to no more than I<-3000> to I<4000>,
-set the following options:
-
---maximum-upper-limit 4000 --minimum-upper-limit 2000
---maximum-lower-limit -1000 --minimum-lower-limit -3000
-
-To mimic the old B<rigid> option, you can do:
-
---maximum-upper-limit 4000 --minimum-upper-limit 4000
---maximum-lower-limit -3000 --minimum-lower-limit -3000
-
 B<[-A|--alt-autoscale]>
 
 Sometimes the default algorithm for selecting the y-axis scale is not
@@ -173,9 +139,9 @@ and thus the throughput may be higher than the WAN line speed.
 
 B<[-N|--no-gridfit]>
 
-To avoid antialiasing effects gridlines are placed on 
+To avoid anti-aliasing effects gridlines are placed on 
 integer pixel values. This is by default done by extending 
-the scale so gridlines happends to be spaced using an 
+the scale so gridlines happens to be spaced using an 
 integer number of pixels, and starts on integer pixel value.
 This might extend the scale too much for some logarithmic scales
 and for linear scales where --alt-autoscale is needed.
@@ -210,7 +176,7 @@ in I<LPR> and a I<strftime> format string in I<LFM>.  I<LPR> defines
 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 in this interval (useful for monday, januari etcetera).
+centered in this interval (useful for Monday, January etcetera).
 
 Example: C<--x-grid MINUTE:10:HOUR:1:HOUR:4:0:%X>
 
@@ -286,15 +252,16 @@ would look like this:
 
 B<[-c|--color I<COLORTAG>#I<rrggbb>[I<aa>]]>
 
-Override the default colors for the standard elements of the graph.
-The I<COLORTAG> is one of C<BACK> ground, C<CANVAS>, C<SHADEA> for the
-left and top border, C<SHADEB> for the right and bottom border, C<GRID>,
-C<MGRID> for the major grid, C<FONT>, C<FRAME> and axis, C<ARROW>.
-Each color is composed out of three hexadecimal numbers specifying
-its color component (00 is off, FF is maximum) of red, green and blue.
-Optionally you may add another hexademimal number specifying the
-transparency (FF is solid).
-You may set this option several times to alter multiple defaults.
+Override the default colors for the standard elements of the graph. The
+I<COLORTAG> is one of C<BACK> background, C<CANVAS> for the background of
+the actual graph, C<SHADEA> for the left and top border, C<SHADEB> for the
+right and bottom border, C<GRID>, C<MGRID> for the major grid, C<FONT> for
+the color of the font, C<AXIS> for the axis of the graph and finaly C<ARROW>
+for the arrow head pointing to the future. Each color is composed out of
+three hexadecimal numbers specifying its color component (00 is off, FF is
+maximum) of red, green and blue. Optionally you may add another hexadecimal
+number specifying the transparency (FF is solid). You may set this option
+several times to alter multiple defaults.
 
 A green arrow is made by: C<--color ARROW:00FF00>
 
@@ -305,12 +272,15 @@ Zoom the graphics by the given amount ... The factor must be E<gt> 0
 B<[-n|--font I<FONTTAG>B<:>I<size>B<:>I<font>]>
 
 Lets you customize which font to use for the various text elements on the
-rrd graphs. C<DEFAULT> sets the default value for all elements C<TITLE>,
+RRD graphs. C<DEFAULT> sets the default value for all elements C<TITLE>,
 C<AXIS> for the axis labels, C<UNIT> for the vertical unit label, C<LEGEND>
 for the graph legend.
 
 Use Times for the title: C<--font TITLE:13:/usr/lib/fonts/times.ttf>
 
+RRDtool comes with a preset default font. You can set the environment
+variable C<RRD_DEFAULT_FONT> if you want to change this.
+
 B<[-a|--imgformat C<PNG>|C<SVG>|C<EPS>|C<PDF>]>
 
 Image format for the generated graph.
@@ -323,6 +293,14 @@ B<[-g|--no-legend]>
 
 Suppress generation of legend; only render the graph.
 
+B<[-F|--force-rules-legend]>
+
+Force the generation of HRULE and VRULE legend even if those HRULE or VRULE will not be drawn because out of graph boundaries (mimics behaviour of pre 1.0.42 versions).
+
+B<[-T|--tabwidth E<lt>valueE<gt>]>
+
+By default the tab-width is 40 pixels, use this option to change it.
+
 B<[-b|--base E<lt>valueE<gt>]>
 
 If you are graphing memory (and NOT network traffic) this switch