Code

Imported upstream version 1.2.28.
[pkg-rrdtool.git] / doc / rrdgraph.html
index e7a9505f4dc15d9f694d3c4665f513588f5354e2..75539448c54de9b0b52a5b03e75fafcec232370f 100644 (file)
@@ -79,25 +79,20 @@ graph it (or print it).  This ends the <strong>rrdtool graph</strong> sequence.<
 <hr />
 <h1><a name="options">OPTIONS</a></h1>
 <dl>
-<dt><strong><a name="item_filename">filename</a></strong>
+<dt><strong><a name="item_filename">filename</a></strong></dt>
 
 <dd>
 <p>The name and path of the graph to generate. It is recommended to
 end this in <code>.png</code>, <code>.svg</code> or <code>.eps</code>, but <strong>RRDtool</strong> does not enforce this.</p>
-</dd>
-<dd>
 <p><em>filename</em> can be '<code>-</code>' to send the image to <code>stdout</code>. In
 this case, no other output is generated.</p>
 </dd>
-</li>
-<dt><strong><a name="item_time_range">Time range</a></strong>
+<dt><strong><a name="item_time_range">Time range</a></strong></dt>
 
 <dd>
 <p>[<strong>-s</strong>|<strong>--start</strong> <em>time</em>]
 [<strong>-e</strong>|<strong>--end</strong> <em>time</em>]
 [<strong>-S</strong>|<strong>--step</strong> <em>seconds</em>]</p>
-</dd>
-<dd>
 <p>The start and end of the time series you would like to display, and which
 <strong>RRA</strong> the data should come from.  Defaults are: 1 day ago until
 now, with the best possible resolution. <strong>Start</strong> and <strong>end</strong> can
@@ -110,55 +105,40 @@ If you want <strong>rrdtool graph</strong> to get data at a one-hour resolution
 from the <strong>RRD</strong>, set <strong>step</strong> to 3'600. Note: a step smaller than
 one pixel will silently be ignored.</p>
 </dd>
-</li>
-<dt><strong><a name="item_labels">Labels</a></strong>
+<dt><strong><a name="item_labels">Labels</a></strong></dt>
 
 <dd>
 <p>[<strong>-t</strong>|<strong>--title</strong> <em>string</em>]
 [<strong>-v</strong>|<strong>--vertical-label</strong> <em>string</em>]</p>
-</dd>
-<dd>
 <p>A horizontal string at the top of the graph and/or a vertically
 placed string at the left hand side of the graph.</p>
 </dd>
-</li>
-<dt><strong><a name="item_size">Size</a></strong>
+<dt><strong><a name="item_size">Size</a></strong></dt>
 
 <dd>
 <p>[<strong>-w</strong>|<strong>--width</strong> <em>pixels</em>]
 [<strong>-h</strong>|<strong>--height</strong> <em>pixels</em>]
 [<strong>-j</strong>|<strong>--only-graph</strong>]</p>
-</dd>
-<dd>
 <p>The width and height of the <strong>canvas</strong> (the part of the graph with
 the actual data and such). This defaults to 400 pixels by 100 pixels.</p>
-</dd>
-<dd>
 <p>If you specify the <strong>--only-graph</strong> option and set the height &lt; 32
 pixels you will get a tiny graph image (thumbnail) to use as an icon
 for use in an overview, for example. All labeling will be stripped off
 the graph.</p>
 </dd>
-</li>
-<dt><strong><a name="item_limits">Limits</a></strong>
+<dt><strong><a name="item_limits">Limits</a></strong></dt>
 
 <dd>
 <p>[<strong>-u</strong>|<strong>--upper-limit</strong> <em>value</em>]
 [<strong>-l</strong>|<strong>--lower-limit</strong> <em>value</em>]
 [<strong>-r</strong>|<strong>--rigid</strong>]</p>
-</dd>
-<dd>
 <p>By default the graph will be autoscaling so that it will adjust the
 y-axis to the range of the data. You can change this behaviour by
 explicitly setting the limits. The displayed y-axis will then range at
 least from <strong>lower-limit</strong> to <strong>upper-limit</strong>. Autoscaling will still
 permit those boundaries to be stretched unless the <strong>rigid</strong> option is
 set.</p>
-</dd>
-<dd>
 <p>[<strong>-A</strong>|<strong>--alt-autoscale</strong>]</p>
-</dd>
-<dd>
 <p>Sometimes the default algorithm for selecting the y-axis scale is not
 satisfactory. Normally the scale is selected from a predefined
 set of ranges and this fails miserably when you need to graph something
@@ -166,31 +146,19 @@ like <code>260 + 0.001 * sin(x)</code>. This option calculates the minimum and
 maximum y-axis from the actual minimum and maximum data values. Our example
 would display slightly less than <code>260-0.001</code> to slightly more than
 <code>260+0.001</code> (this feature was contributed by Sasha Mikheev).</p>
-</dd>
-<dd>
 <p>[<strong>-J</strong>|<strong>--alt-autoscale-min</strong>]</p>
-</dd>
-<dd>
 <p>Where <code>--alt-autoscale</code> will modify both the absolute maximum AND minimum
 values, this option will only affect the minimum value. The maximum
 value, if not defined on the command line, will be 0. This option can
 be useful when graphing router traffic when the WAN line uses compression,
 and thus the throughput may be higher than the WAN line speed.</p>
-</dd>
-<dd>
 <p>[<strong>-M</strong>|<strong>--alt-autoscale-max</strong>]</p>
-</dd>
-<dd>
 <p>Where <code>--alt-autoscale</code> will modify both the absolute maximum AND minimum
 values, this option will only affect the maximum value. The minimum
 value, if not defined on the command line, will be 0. This option can
 be useful when graphing router traffic when the WAN line uses compression,
 and thus the throughput may be higher than the WAN line speed.</p>
-</dd>
-<dd>
 <p>[<strong>-N</strong>|<strong>--no-gridfit</strong>]</p>
-</dd>
-<dd>
 <p>In order to avoid anti-aliasing effects gridlines are placed on
 integer pixel values. This is by default done by extending
 the scale so that gridlines happens to be spaced using an
@@ -199,22 +167,15 @@ This might extend the scale too much for some logarithmic scales
 and for linear scales where <strong>--alt-autoscale</strong> is needed.
 Using <strong>--no-gridfit</strong> disables modification of the scale.</p>
 </dd>
-</li>
-<dt><strong><a name="item_x_2dgrid">X-Grid</a></strong>
+<dt><strong><a name="item_x_2dgrid">X-Grid</a></strong></dt>
 
 <dd>
 <p>[<strong>-x</strong>|<strong>--x-grid</strong> <em>GTM</em><strong>:</strong><em>GST</em><strong>:</strong><em>MTM</em><strong>:</strong><em>MST</em><strong>:</strong><em>LTM</em><strong>:</strong><em>LST</em><strong>:</strong><em>LPR</em><strong>:</strong><em>LFM</em>]</p>
-</dd>
-<dd>
 <p>[<strong>-x</strong>|<strong>--x-grid</strong> <strong>none</strong>]</p>
-</dd>
-<dd>
 <p>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 <code>none</code> to suppress the grid
 and labels altogether.</p>
-</dd>
-<dd>
 <p>The grid is defined by specifying a certain amount of time in the <em>?TM</em>
 positions. You can choose from <code>SECOND</code>, <code>MINUTE</code>, <code>HOUR</code>, <code>DAY</code>,
 <code>WEEK</code>, <code>MONTH</code> or <code>YEAR</code>. Then you define how many of these should
@@ -226,66 +187,39 @@ 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).</p>
-</dd>
-<dd>
 <pre>
  --x-grid MINUTE:10:HOUR:1:HOUR:4:0:%X</pre>
-</dd>
-<dd>
 <p>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.</p>
-</dd>
-<dd>
 <pre>
- --x-grid HOUR:8:DAY:1:DAY:1:0:%A</pre>
-</dd>
-<dd>
+ --x-grid HOUR:8:DAY:1:DAY:1:86400:%A</pre>
 <p>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.</p>
 </dd>
-</li>
-<dt><strong><a name="item_y_2dgrid">Y-Grid</a></strong>
+<dt><strong><a name="item_y_2dgrid">Y-Grid</a></strong></dt>
 
 <dd>
 <p>[<strong>-y</strong>|<strong>--y-grid</strong> <em>grid step</em><strong>:</strong><em>label factor</em>]</p>
-</dd>
-<dd>
 <p>[<strong>-y</strong>|<strong>--y-grid</strong> <strong>none</strong>]</p>
-</dd>
-<dd>
 <p>Y-axis grid lines appear at each <em>grid step</em> interval.  Labels are
 placed every <em>label factor</em> lines.  You can specify <code>-y none</code> to
 suppress the grid and labels altogether.  The default for this option is
 to automatically select sensible values.</p>
-</dd>
-<dd>
 <p>If you have set --y-grid to 'none' not only the labels get supressed, 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.</p>
-</dd>
-<dd>
 <p>[<strong>-Y</strong>|<strong>--alt-y-grid</strong>]</p>
-</dd>
-<dd>
 <p>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).</p>
-</dd>
-<dd>
 <p>[<strong>-o</strong>|<strong>--logarithmic</strong>]</p>
-</dd>
-<dd>
 <p>Logarithmic y-axis scaling.</p>
-</dd>
-<dd>
 <p>[<strong>-X</strong>|<strong>--units-exponent</strong> <em>value</em>]</p>
-</dd>
-<dd>
 <p>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
@@ -295,58 +229,35 @@ 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.</p>
-</dd>
-<dd>
 <p>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 <strong>--alt-y-grid</strong> mode.</p>
-</dd>
-<dd>
 <p>[<strong>-L</strong>|<strong>--units-length</strong> <em>value</em>]</p>
-</dd>
-<dd>
 <p>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.</p>
-</dd>
-<dd>
 <p>[<strong>--units=si</strong>]</p>
-</dd>
-<dd>
 <p>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, SI notation is used by default.</p>
 </dd>
-</li>
-<dt><strong><a name="item_miscellaneous">Miscellaneous</a></strong>
+<dt><strong><a name="item_miscellaneous">Miscellaneous</a></strong></dt>
 
 <dd>
 <p>[<strong>-z</strong>|<strong>--lazy</strong>]</p>
-</dd>
-<dd>
 <p>Only generate the graph if the current graph is out of date or not
 existent.</p>
-</dd>
-<dd>
 <p>[<strong>-f</strong>|<strong>--imginfo</strong> <em>printfstr</em>]</p>
-</dd>
-<dd>
 <p>After the image has been created, the graph function uses printf
 together with this format string to create output similar to the PRINT
 function, only that the printf function is supplied with the parameters
 <em>filename</em>, <em>xsize</em> and <em>ysize</em>. In order to generate an <strong>IMG</strong> tag
 suitable for including the graph into a web page, the command line
 would look like this:</p>
-</dd>
-<dd>
 <pre>
  --imginfo '&lt;IMG SRC=&quot;/img/%s&quot; WIDTH=&quot;%lu&quot; HEIGHT=&quot;%lu&quot; ALT=&quot;Demo&quot;&gt;'</pre>
-</dd>
-<dd>
 <p>[<strong>-c</strong>|<strong>--color</strong> <em>COLORTAG</em>#<em>rrggbb</em>[<em>aa</em>]]</p>
-</dd>
-<dd>
 <p>Override the default colors for the standard elements of the graph. The
 <em>COLORTAG</em> is one of <code>BACK</code> background, <code>CANVAS</code> for the background of
 the actual graph, <code>SHADEA</code> for the left and top border, <code>SHADEB</code> for the
@@ -358,145 +269,76 @@ specifying its rgb 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.</p>
-</dd>
-<dd>
 <p>A green arrow is made by: <code>--color ARROW#00FF00</code></p>
-</dd>
-<dd>
 <p>[<strong>--zoom</strong> <em>factor</em>]</p>
-</dd>
-<dd>
 <p>Zoom the graphics by the given amount. The factor must be &gt; 0</p>
-</dd>
-<dd>
 <p>[<strong>-n</strong>|<strong>--font</strong> <em>FONTTAG</em><strong>:</strong><em>size</em><strong>:</strong>[<em>font</em>]]</p>
-</dd>
-<dd>
 <p>This lets you customize which font to use for the various text
 elements on the RRD graphs. <code>DEFAULT</code> sets the default value for all
 elements, <code>TITLE</code> for the title, <code>AXIS</code> for the axis labels, <code>UNIT</code>
 for the vertical unit label, <code>LEGEND</code> for the graph legend.</p>
-</dd>
-<dd>
 <p>Use Times for the title: <code>--font TITLE:13:/usr/lib/fonts/times.ttf</code></p>
-</dd>
-<dd>
 <p>If you do not give a font string you can modify just the sice of the default font:
 <code>--font TITLE:13:</code>.</p>
-</dd>
-<dd>
 <p>If you specify the size 0 then you can modify just the font without touching
 the size. This is especially usefull for altering the default font without
 resetting the default fontsizes: <code>--font DEFAULT:0:/usr/lib/fonts/times.ttf</code>.</p>
-</dd>
-<dd>
 <p>RRDtool comes with a preset default font. You can set the environment
 variable <code>RRD_DEFAULT_FONT</code> if you want to change this.</p>
-</dd>
-<dd>
 <p>Truetype fonts are only supported for PNG output. See below.</p>
-</dd>
-<dd>
 <p>[<strong>-R</strong>|<strong>--font-render-mode</strong> {<em>normal</em>,<em>light</em>,<em>mono</em>}]</p>
-</dd>
-<dd>
 <p>This lets you customize the strength of the font smoothing,
 or disable it entirely using <em>mono</em>. By default, <em>normal</em>
 font smoothing is used.</p>
-</dd>
-<dd>
 <p>[<strong>-B</strong>|<strong>--font-smoothing-threshold</strong> <em>size</em>]</p>
-</dd>
-<dd>
 <p>This specifies the largest font size which will be rendered
 bitmapped, that is, without any font smoothing. By default,
 no text is rendered bitmapped.</p>
-</dd>
-<dd>
 <p>[<strong>-E</strong>|<strong>--slope-mode</strong>]</p>
-</dd>
-<dd>
 <p>RRDtool graphs are composed of stair case curves by default. This is in line with
 the way RRDtool calculates its data. Some people favor a more 'organic' look
 for their graphs even though it is not all that true.</p>
-</dd>
-<dd>
 <p>[<strong>-a</strong>|<strong>--imgformat</strong> <strong>PNG</strong>|<strong>SVG</strong>|<strong>EPS</strong>|<strong>PDF</strong>]</p>
-</dd>
-<dd>
 <p>Image format for the generated graph. For the vector formats you can
 choose among the standard Postscript fonts Courier-Bold,
 Courier-BoldOblique, Courier-Oblique, Courier, Helvetica-Bold,
 Helvetica-BoldOblique, Helvetica-Oblique, Helvetica, Symbol,
 Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.</p>
-</dd>
-<dd>
 <p>[<strong>-i</strong>|<strong>--interlaced</strong>]</p>
-</dd>
-<dd>
 <p>If images are interlaced they become visible on browsers more quickly.</p>
-</dd>
-<dd>
 <p>[<strong>-g</strong>|<strong>--no-legend</strong>]</p>
-</dd>
-<dd>
 <p>Suppress generation of the legend; only render the graph.</p>
-</dd>
-<dd>
 <p>[<strong>-F</strong>|<strong>--force-rules-legend</strong>]</p>
-</dd>
-<dd>
 <p>Force the generation of HRULE and VRULE legends even if those HRULE or
 VRULE will not be drawn because out of graph boundaries (mimics
 behaviour of pre 1.0.42 versions).</p>
-</dd>
-<dd>
 <p>[<strong>-T</strong>|<strong>--tabwidth</strong> <em>value</em>]</p>
-</dd>
-<dd>
 <p>By default the tab-width is 40 pixels, use this option to change it.</p>
-</dd>
-<dd>
 <p>[<strong>-b</strong>|<strong>--base</strong> <em>value</em>]</p>
-</dd>
-<dd>
 <p>If you are graphing memory (and NOT network traffic) this switch
 should be set to 1024 so that one Kb is 1024 byte. For traffic
 measurement, 1 kb/s is 1000 b/s.</p>
-</dd>
-<dd>
 <p>[<strong>-W</strong>|<strong>--watermark</strong> <em>string</em>]</p>
-</dd>
-<dd>
 <p>Adds the given string as a watermark, horizontally centred, at the bottom 
 of the graph.</p>
 </dd>
-</li>
-<dt><strong><a name="item_data_and_variables">Data and variables</a></strong>
+<dt><strong><a name="item_data_and_variables">Data and variables</a></strong></dt>
 
 <dd>
 <p><strong>DEF:</strong><em>vname</em><strong>=</strong><em>rrdfile</em><strong>:</strong><em>ds-name</em><strong>:</strong><em>CF</em>[<strong>:step=</strong><em>step</em>][<strong>:start=</strong><em>time</em>][<strong>:end=</strong><em>time</em>]</p>
-</dd>
-<dd>
 <p><strong>CDEF:</strong><em>vname</em><strong>=</strong><em>RPN expression</em></p>
-</dd>
-<dd>
 <p><strong>VDEF:</strong><em>vname</em><strong>=</strong><em>RPN expression</em></p>
-</dd>
-<dd>
 <p>You need at least one <strong>DEF</strong> statement to generate anything. The
 other statements are useful but optional.
 See <a href="././rrdgraph_data.html">the rrdgraph_data manpage</a> and <a href="././rrdgraph_rpn.html">the rrdgraph_rpn manpage</a> for the exact format.</p>
 </dd>
-</li>
-<dt><strong><a name="item_graph_and_print_elements">Graph and print elements</a></strong>
+<dt><strong><a name="item_graph_and_print_elements">Graph and print elements</a></strong></dt>
 
 <dd>
 <p>You need at least one graph element to generate an image and/or
 at least one print statement to generate a report.
 See <a href="././rrdgraph_graph.html">the rrdgraph_graph manpage</a> for the exact format.</p>
 </dd>
-</li>
 </dl>
 <p>
 </p>