Code

Imported upstream version 1.3rc9.
[pkg-rrdtool.git] / doc / rrdgraph.html
index ec76219cea760325096152b30517a98c5c428d4c..5415923f3cb7066c42d1214f2909834a959aaed1 100644 (file)
@@ -84,7 +84,7 @@ 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_graphv"><strong>graphv</strong></a></strong>
+<dt><strong><a name="item_graphv"><strong>graphv</strong></a></strong></dt>
 
 <dd>
 <p>This alternate version of <strong>graph</strong> takes the same arguments and performs the
@@ -92,26 +92,20 @@ same function. The <em>v</em> stands for <em>verbose</em>, which describes the o
 returned. <strong>graphv</strong> 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.</p>
 </dd>
-</li>
-<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
@@ -124,61 +118,44 @@ 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>]
 [<strong>-D</strong>|<strong>--full-size-mode</strong>]</p>
-</dd>
-<dd>
 <p>By default, the width and height of the <strong>canvas</strong> (the part with
 the actual data and such). This defaults to 400 pixels by 100 pixels.</p>
-</dd>
-<dd>
 <p>If you specify the <strong>--full-size-mode</strong> option, the width and height
 specify the final dimensions of the output image and the canvas
 is automatically resized to fit.</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
@@ -186,58 +163,37 @@ 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 blurring effects rrdtool snaps
 points to device resolution pixels, this results in a crisper
 aperance. If this is not to your liking, you can use this switch
 to turn this behaviour off.</p>
-</dd>
-<dd>
 <p>Gridfitting is turned off for PDF, EPS, SVG output by default.</p>
 </dd>
-</li>
-<dt><strong><a name="item_grid">Grid</a></strong>
+<dt><strong><a name="item_grid">Grid</a></strong></dt>
 
 <dl>
-<dt><strong><a name="item_x_2daxis">X-Axis</a></strong>
+<dt><strong><a name="item_x_2daxis">X-Axis</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
@@ -249,66 +205,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:86400:%A</pre>
-</dd>
-<dd>
 <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_2daxis">Y-Axis</a></strong>
+<dt><strong><a name="item_y_2daxis">Y-Axis</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
@@ -318,59 +247,37 @@ 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>
 </dl>
-<dt><strong><a name="item_miscellaneous">Miscellaneous</a></strong>
+</dd>
+<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
@@ -382,46 +289,24 @@ 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:Times</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:Courier</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>RRDtool uses Pango for its font handling. This means you can to use
 the full Pango syntax when selecting your font:</p>
-</dd>
-<dd>
 <p>The font name has the form ``[<em>FAMILY-LIST</em>] [<em>STYLE-OPTIONS</em>] [<em>SIZE</em>]'',
 where <em>FAMILY-LIST</em> is a comma separated list of families optionally
 terminated by a comma, <em>STYLE_OPTIONS</em> is a whitespace separated list of
@@ -429,163 +314,87 @@ words where each WORD describes one of style, variant, weight, stretch, or
 gravity, and <em>SIZE</em> is a decimal number (size in points) or optionally
 followed by the unit modifier ``px'' for absolute size. Any one of the options
 may be absent.</p>
-</dd>
-<dd>
 <p>[<strong>-R</strong>|<strong>--font-render-mode</strong> {<strong>normal</strong>,<strong>light</strong>,<strong>mono</strong>}]</p>
-</dd>
-<dd>
 <p>There are 3 font render modes:</p>
-</dd>
-<dd>
 <p><strong>normal</strong>: Full Hinting and Antialiasing (default)</p>
-</dd>
-<dd>
 <p><strong>light</strong>: Slight Hinting and Antialiasing</p>
-</dd>
-<dd>
 <p><strong>mono</strong>: Full Hinting and NO Antialiasing</p>
-</dd>
-<dd>
 <p>[<strong>-B</strong>|<strong>--font-smoothing-threshold</strong> <em>size</em>]</p>
-</dd>
-<dd>
 <p>(this gets ignored in 1.3 for now!)</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>-P</strong>|<strong>--pango-markup</strong>]</p>
+<p>All text in rrdtool is rendered using Pango. With the <strong>--pango-markup</strong> option, all
+text will be processed by pango markup. This allows to embed some simple html
+like markup tags using 
+</p>
+<pre>
+
+ &lt;span key=&quot;value&quot;&gt;text&lt;/span&gt;</pre>
+<p>Apart from the verbose syntax, there are also the following short tags available.</p>
+<pre>
+ b     Bold
+ big   Makes font relatively larger, equivalent to &lt;span size=&quot;larger&quot;&gt;
+ i     Italic
+ s     Strikethrough
+ sub   Subscript
+ sup   Superscript
+ small Makes font relatively smaller, equivalent to &lt;span size=&quot;smaller&quot;&gt;
+ tt    Monospace font
+ u     Underline 
+More details on L&lt;<a href="http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html&gt">http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html&gt</a>;.</pre>
 <p>[<strong>-G</strong>|<strong>--graph-render-mode</strong> {<strong>normal</strong>,<strong>mono</strong>}]</p>
-</dd>
-<dd>
 <p>There are 2 render modes:</p>
-</dd>
-<dd>
 <p><strong>normal</strong>: Graphs are fully Antialiased (default)</p>
-</dd>
-<dd>
 <p><strong>mono</strong>: No Antialiasing</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>(this gets ignored in 1.3 for now!)</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>
-<dt><strong><a name="item_markup">Markup</a></strong>
-
-<dd>
-<p>All text in rrdtool is rendered using Pango markup. This means text can contain embeded markup instructions.
-Simple html markup using 
-</p>
-</dd>
-<dd>
-<pre>
-
- &lt;span key=&quot;value&quot;&gt;text&lt;/span&gt;</pre>
-</dd>
-<dd>
-<p>can be used. Apart from the verbose syntax, there are also the following short tags available.</p>
-</dd>
-<dd>
-<pre>
- b     Bold
- big   Makes font relatively larger, equivalent to &lt;span size=&quot;larger&quot;&gt;
- i     Italic
- s     Strikethrough
- sub   Subscript
- sup   Superscript
- small Makes font relatively smaller, equivalent to &lt;span size=&quot;smaller&quot;&gt;
- tt    Monospace font
- u     Underline 
-More details on <a href="http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html">http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html</a>.</pre>
-</dd>
-</li>
 </dl>
 <p>
 </p>