Code

Imported upstream version 1.3.8.
[pkg-rrdtool.git] / doc / rrdgraph.html
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>rrdgraph</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:root@localhost" />
8 </head>
10 <body style="background-color: white">
13 <!-- INDEX BEGIN -->
14 <div name="index">
15 <p><a name="__index__"></a></p>
16 <!--
18 <ul>
20         <li><a href="#name">NAME</a></li>
21         <li><a href="#synopsis">SYNOPSIS</a></li>
22         <li><a href="#description">DESCRIPTION</a></li>
23         <li><a href="#overview">OVERVIEW</a></li>
24         <li><a href="#options">OPTIONS</a></li>
25         <ul>
27                 <li><a href="#graphv"><strong>graphv</strong></a></li>
28                 <li><a href="#filename"><em>filename</em></a></li>
29                 <li><a href="#time_range">Time range</a></li>
30                 <li><a href="#labels">Labels</a></li>
31                 <li><a href="#right_axis">Right Axis</a></li>
32                 <li><a href="#size">Size</a></li>
33                 <li><a href="#limits">Limits</a></li>
34                 <li><a href="#grid">Grid</a></li>
35                 <li><a href="#miscellaneous">Miscellaneous</a></li>
36                 <li><a href="#data_and_variables">Data and variables</a></li>
37                 <li><a href="#graphv">graphv</a></li>
38         </ul>
40         <li><a href="#see_also">SEE ALSO</a></li>
41         <li><a href="#author">AUTHOR</a></li>
42 </ul>
44 -->
47 </div>
48 <!-- INDEX END -->
50 <p>
51 </p>
52 <h1><a name="name">NAME</a></h1>
53 <p>rrdgraph - Round Robin Database tool grapher functions</p>
54 <p>
55 </p>
56 <hr />
57 <h1><a name="synopsis">SYNOPSIS</a></h1>
58 <p><strong>rrdtool graph|graphv</strong> <em>filename</em>
59 [<em><a href="././rrdgraph.html#options">option</a></em> ...]
60 [<em><a href="././rrdgraph_data.html#def">data definition</a></em> ...]
61 [<em><a href="././rrdgraph_data.html#cdef">data calculation</a></em> ...]
62 [<em><a href="././rrdgraph_data.html#vdef">variable definition</a></em> ...]
63 [<em><a href="././rrdgraph_graph.html#graph">graph element</a></em> ...]
64 [<em><a href="././rrdgraph_graph.html#print">print element</a></em> ...]</p>
65 <p>
66 </p>
67 <hr />
68 <h1><a name="description">DESCRIPTION</a></h1>
69 <p>The <strong>graph</strong> function of <strong>RRDtool</strong> is used to present the
70 data from an <strong>RRD</strong> to a human viewer.  Its main purpose is to
71 create a nice graphical representation, but it can also generate
72 a numerical report.</p>
73 <p>
74 </p>
75 <hr />
76 <h1><a name="overview">OVERVIEW</a></h1>
77 <p><strong>rrdtool graph</strong> needs data to work with, so you must use one or more
78 <strong><a href="././rrdgraph_data.html#def">data definition</a></strong> statements to collect this
79 data.  You are not limited to one database, it's perfectly legal to
80 collect data from two or more databases (one per statement, though).</p>
81 <p>If you want to display averages, maxima, percentiles, etcetera
82 it is best to collect them now using the
83 <strong><a href="././rrdgraph_data.html#vdef">variable definition</a></strong> statement.
84 Currently this makes no difference, but in a future version
85 of rrdtool you may want to collect these values before consolidation.</p>
86 <p>The data fetched from the <strong>RRA</strong> is then <strong>consolidated</strong> so that
87 there is exactly one datapoint per pixel in the graph. If you do
88 not take care yourself, <strong>RRDtool</strong> will expand the range slightly
89 if necessary. Note, in that case the first and/or last pixel may very
90 well become unknown!</p>
91 <p>Sometimes data is not exactly in the format you would like to display
92 it. For instance, you might be collecting <strong>bytes</strong> per second, but
93 want to display <strong>bits</strong> per second. This is what the <strong><a href="././rrdgraph_data.html#cdef">data calculation</a></strong> command is designed for. After
94 <strong>consolidating</strong> the data, a copy is made and this copy is modified
95 using a rather powerful <strong><a href="././rrdgraph_rpn.html">RPN</a></strong> command set.</p>
96 <p>When you are done fetching and processing the data, it is time to
97 graph it (or print it).  This ends the <strong>rrdtool graph</strong> sequence.</p>
98 <p>
99 </p>
100 <hr />
101 <h1><a name="options">OPTIONS</a></h1>
102 <p>
103 </p>
104 <h2><a name="graphv"><strong>graphv</strong></a></h2>
105 <p>This alternate version of <strong>graph</strong> takes the same arguments and performs the
106 same function. The <em>v</em> stands for <em>verbose</em>, which describes the output
107 returned. <strong>graphv</strong> will return a lot of information about the graph using
108 the same format as rrdtool info (key = value). See the bottom of the document for more information.</p>
109 <p>
110 </p>
111 <h2><a name="filename"><em>filename</em></a></h2>
112 <p>The name and path of the graph to generate. It is recommended to
113 end this in <code>.png</code>, <code>.svg</code> or <code>.eps</code>, but <strong>RRDtool</strong> does not enforce this.</p>
114 <p><em>filename</em> can be '<code>-</code>' to send the image to <code>stdout</code>. In
115 this case, no other output is generated.</p>
116 <p>
117 </p>
118 <h2><a name="time_range">Time range</a></h2>
119 <p>[<strong>-s</strong>|<strong>--start</strong> <em>time</em>]
120 [<strong>-e</strong>|<strong>--end</strong> <em>time</em>]
121 [<strong>-S</strong>|<strong>--step</strong> <em>seconds</em>]</p>
122 <p>The start and end of the time series you would like to display, and which
123 <strong>RRA</strong> the data should come from.  Defaults are: 1 day ago until
124 now, with the best possible resolution. <strong>Start</strong> and <strong>end</strong> can
125 be specified in several formats, see
126 <a href="././rrdfetch.html">AT-STYLE TIME SPECIFICATION</a> and <a href="././rrdgraph_examples.html">the rrdgraph_examples manpage</a>.
127 By default, <strong>rrdtool graph</strong> calculates the width of one pixel in
128 the time domain and tries to get data from an <strong>RRA</strong> with that
129 resolution.  With the <strong>step</strong> option you can alter this behaviour.
130 If you want <strong>rrdtool graph</strong> to get data at a one-hour resolution
131 from the <strong>RRD</strong>, set <strong>step</strong> to 3'600. Note: a step smaller than
132 one pixel will silently be ignored.</p>
133 <p>
134 </p>
135 <h2><a name="labels">Labels</a></h2>
136 <p>[<strong>-t</strong>|<strong>--title</strong> <em>string</em>]
137 [<strong>-v</strong>|<strong>--vertical-label</strong> <em>string</em>]</p>
138 <p>A horizontal string at the top of the graph and/or a vertically
139 placed string at the left hand side of the graph.</p>
140 <p>
141 </p>
142 <h2><a name="right_axis">Right Axis</a></h2>
143 <p>[<strong>--right-axis</strong> <em>scale</em><strong>:</strong><em>shift</em>]
144 [<strong>--right-axis-label</strong> <em>label</em>]</p>
145 <p>A second axis will be drawn to the right of the graph. It is tied to the
146 left axis via the scale and shift parameters. You can also define a label
147 for the right axis.</p>
148 <p>[<strong>--right-axis-format</strong> <em>format-string</em>]</p>
149 <p>By default the format of the axis lables gets determined automatically. If
150 you want todo this your self, use this option with the same %lf arguments
151 you know from the PRING and GPRINT commands.</p>
152 <p>
153 </p>
154 <h2><a name="size">Size</a></h2>
155 <p>[<strong>-w</strong>|<strong>--width</strong> <em>pixels</em>]
156 [<strong>-h</strong>|<strong>--height</strong> <em>pixels</em>]
157 [<strong>-j</strong>|<strong>--only-graph</strong>]
158 [<strong>-D</strong>|<strong>--full-size-mode</strong>]</p>
159 <p>By default, the width and height of the <strong>canvas</strong> (the part with
160 the actual data and such). This defaults to 400 pixels by 100 pixels.</p>
161 <p>If you specify the <strong>--full-size-mode</strong> option, the width and height
162 specify the final dimensions of the output image and the canvas
163 is automatically resized to fit.</p>
164 <p>If you specify the <strong>--only-graph</strong> option and set the height &lt; 32
165 pixels you will get a tiny graph image (thumbnail) to use as an icon
166 for use in an overview, for example. All labeling will be stripped off
167 the graph.</p>
168 <p>
169 </p>
170 <h2><a name="limits">Limits</a></h2>
171 <p>[<strong>-u</strong>|<strong>--upper-limit</strong> <em>value</em>]
172 [<strong>-l</strong>|<strong>--lower-limit</strong> <em>value</em>]
173 [<strong>-r</strong>|<strong>--rigid</strong>]</p>
174 <p>By default the graph will be autoscaling so that it will adjust the
175 y-axis to the range of the data. You can change this behaviour by
176 explicitly setting the limits. The displayed y-axis will then range at
177 least from <strong>lower-limit</strong> to <strong>upper-limit</strong>. Autoscaling will still
178 permit those boundaries to be stretched unless the <strong>rigid</strong> option is
179 set.</p>
180 <p>[<strong>-A</strong>|<strong>--alt-autoscale</strong>]</p>
181 <p>Sometimes the default algorithm for selecting the y-axis scale is not
182 satisfactory. Normally the scale is selected from a predefined
183 set of ranges and this fails miserably when you need to graph something
184 like <code>260 + 0.001 * sin(x)</code>. This option calculates the minimum and
185 maximum y-axis from the actual minimum and maximum data values. Our example
186 would display slightly less than <code>260-0.001</code> to slightly more than
187 <code>260+0.001</code> (this feature was contributed by Sasha Mikheev).</p>
188 <p>[<strong>-J</strong>|<strong>--alt-autoscale-min</strong>]</p>
189 <p>Where <code>--alt-autoscale</code> will modify both the absolute maximum AND minimum
190 values, this option will only affect the minimum value. The maximum
191 value, if not defined on the command line, will be 0. This option can
192 be useful when graphing router traffic when the WAN line uses compression,
193 and thus the throughput may be higher than the WAN line speed.</p>
194 <p>[<strong>-M</strong>|<strong>--alt-autoscale-max</strong>]</p>
195 <p>Where <code>--alt-autoscale</code> will modify both the absolute maximum AND minimum
196 values, this option will only affect the maximum value. The minimum
197 value, if not defined on the command line, will be 0. This option can
198 be useful when graphing router traffic when the WAN line uses compression,
199 and thus the throughput may be higher than the WAN line speed.</p>
200 <p>[<strong>-N</strong>|<strong>--no-gridfit</strong>]</p>
201 <p>In order to avoid anti-aliasing blurring effects rrdtool snaps
202 points to device resolution pixels, this results in a crisper
203 appearance. If this is not to your liking, you can use this switch
204 to turn this behaviour off.</p>
205 <p>Gridfitting is turned off for PDF, EPS, SVG output by default.</p>
206 <p>
207 </p>
208 <h2><a name="grid">Grid</a></h2>
209 <dl>
210 <dt><strong><a name="x_axis" class="item">X-Axis</a></strong></dt>
212 <dd>
213 <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>
214 <p>[<strong>-x</strong>|<strong>--x-grid</strong> <strong>none</strong>]</p>
215 <p>The x-axis label is quite complex to configure. If you don't have
216 very special needs it is probably best to rely on the autoconfiguration
217 to get this right. You can specify the string <code>none</code> to suppress the grid
218 and labels altogether.</p>
219 <p>The grid is defined by specifying a certain amount of time in the <em>?TM</em>
220 positions. You can choose from <code>SECOND</code>, <code>MINUTE</code>, <code>HOUR</code>, <code>DAY</code>,
221 <code>WEEK</code>, <code>MONTH</code> or <code>YEAR</code>. Then you define how many of these should
222 pass between each line or label.  This pair (<em>?TM:?ST</em>) needs to be
223 specified for the base grid (<em>G??</em>), the major grid (<em>M??</em>) and the
224 labels (<em>L??</em>). For the labels you also must define a precision
225 in <em>LPR</em> and a <em>strftime</em> format string in <em>LFM</em>.  <em>LPR</em> defines
226 where each label will be placed. If it is zero, the label will be
227 placed right under the corresponding line (useful for hours, dates
228 etcetera).  If you specify a number of seconds here the label is
229 centered on this interval (useful for Monday, January etcetera).</p>
230 <pre>
231  --x-grid MINUTE:10:HOUR:1:HOUR:4:0:%X</pre>
232 <p>This places grid lines every 10 minutes, major grid lines every hour,
233 and labels every 4 hours. The labels are placed under the major grid
234 lines as they specify exactly that time.</p>
235 <pre>
236  --x-grid HOUR:8:DAY:1:DAY:1:86400:%A</pre>
237 <p>This places grid lines every 8 hours, major grid lines and labels
238 each day. The labels are placed exactly between two major grid lines
239 as they specify the complete day and not just midnight.</p>
240 </dd>
241 <dt><strong><a name="y_axis" class="item">Y-Axis</a></strong></dt>
243 <dd>
244 <p>[<strong>-y</strong>|<strong>--y-grid</strong> <em>grid step</em><strong>:</strong><em>label factor</em>]</p>
245 <p>[<strong>-y</strong>|<strong>--y-grid</strong> <strong>none</strong>]</p>
246 <p>Y-axis grid lines appear at each <em>grid step</em> interval.  Labels are
247 placed every <em>label factor</em> lines.  You can specify <code>-y none</code> to
248 suppress the grid and labels altogether.  The default for this option is
249 to automatically select sensible values.</p>
250 <p>If you have set --y-grid to 'none' not only the labels get suppressed, also
251 the space reserved for the labels is removed. You can still add space
252 manually if you use the --units-length command to explicitly reserve space.</p>
253 <p>[<strong>-Y</strong>|<strong>--alt-y-grid</strong>]</p>
254 <p>Place the Y grid dynamically based on the graph's Y range. The algorithm
255 ensures that you always have a grid, that there are enough but not too many
256 grid lines, and that the grid is metric. That is the grid lines are placed
257 every 1, 2, 5 or 10 units. This parameter will also ensure that you get
258 enough decimals displayed even if your graph goes from 69.998 to 70.001. 
259 (contributed by Sasha Mikheev).</p>
260 <p>[<strong>-o</strong>|<strong>--logarithmic</strong>]</p>
261 <p>Logarithmic y-axis scaling.</p>
262 <p>[<strong>-X</strong>|<strong>--units-exponent</strong> <em>value</em>]</p>
263 <p>This sets the 10**exponent scaling of the y-axis values. Normally,
264 values will be scaled to the appropriate units (k, M, etc.).  However,
265 you may wish to display units always in k (Kilo, 10e3) even if the data
266 is in the M (Mega, 10e6) range, for instance. Value should be an
267 integer which is a multiple of 3 between -18 and 18 inclusively.  It is
268 the exponent on the units you wish to use. For example, use 3 to
269 display the y-axis values in k (Kilo, 10e3, thousands), use -6 to
270 display the y-axis values in u (Micro, 10e-6, millionths).  Use a value
271 of 0 to prevent any scaling of the y-axis values.</p>
272 <p>This option is very effective at confusing the heck out of the default
273 rrdtool autoscaler and grid painter. If rrdtool detects that it is not
274 successful in labeling the graph under the given circumstances, it will switch
275 to the more robust <strong>--alt-y-grid</strong> mode.</p>
276 <p>[<strong>-L</strong>|<strong>--units-length</strong> <em>value</em>]</p>
277 <p>How many digits should rrdtool assume the y-axis labels to be? You
278 may have to use this option to make enough space once you start
279 fideling with the y-axis labeling.</p>
280 <p>[<strong>--units=si</strong>]</p>
281 <p>With this option y-axis values on logarithmic graphs will be scaled to 
282 the appropriate units (k, M, etc.) instead of using exponential notation.
283 Note that for linear graphs, SI notation is used by default.</p>
284 </dd>
285 </dl>
286 <p>
287 </p>
288 <h2><a name="miscellaneous">Miscellaneous</a></h2>
289 <p>[<strong>-z</strong>|<strong>--lazy</strong>]</p>
290 <p>Only generate the graph if the current graph is out of date or not existent.
291 Note, that all the calculations will happen regardless so that the output of
292 PRINT and graphv will be complete regardless. Note that the behaviour of
293 lazy in this regard has seen several changes over time. The only thing you
294 can realy rely on before rrdtool 1.3.7 is that lazy will not generate the
295 graph when it is already there and up to date, and also that it will output
296 the size of the graph.</p>
297 <p>[<strong>-f</strong>|<strong>--imginfo</strong> <em>printfstr</em>]</p>
298 <p>After the image has been created, the graph function uses printf
299 together with this format string to create output similar to the PRINT
300 function, only that the printf function is supplied with the parameters
301 <em>filename</em>, <em>xsize</em> and <em>ysize</em>. In order to generate an <strong>IMG</strong> tag
302 suitable for including the graph into a web page, the command line
303 would look like this:</p>
304 <pre>
305  --imginfo '&lt;IMG SRC=&quot;/img/%s&quot; WIDTH=&quot;%lu&quot; HEIGHT=&quot;%lu&quot; ALT=&quot;Demo&quot;&gt;'</pre>
306 <p>[<strong>-c</strong>|<strong>--color</strong> <em>COLORTAG</em>#<em>rrggbb</em>[<em>aa</em>]]</p>
307 <p>Override the default colors for the standard elements of the graph. The
308 <em>COLORTAG</em> is one of <code>BACK</code> background, <code>CANVAS</code> for the background of
309 the actual graph, <code>SHADEA</code> for the left and top border, <code>SHADEB</code> for the
310 right and bottom border, <code>GRID</code>, <code>MGRID</code> for the major grid, <code>FONT</code> for
311 the color of the font, <code>AXIS</code> for the axis of the graph, <code>FRAME</code> for the
312 line around the color spots, and finally <code>ARROW</code> for the arrow head pointing
313 up and forward. Each color is composed out of three hexadecimal numbers
314 specifying its rgb color component (00 is off, FF is maximum) of red, green
315 and blue. Optionally you may add another hexadecimal number specifying the
316 transparency (FF is solid). You may set this option several times to alter
317 multiple defaults.</p>
318 <p>A green arrow is made by: <code>--color ARROW#00FF00</code></p>
319 <p>[<strong>--zoom</strong> <em>factor</em>]</p>
320 <p>Zoom the graphics by the given amount. The factor must be &gt; 0</p>
321 <p>[<strong>-n</strong>|<strong>--font</strong> <em>FONTTAG</em><strong>:</strong><em>size</em><strong>:</strong>[<em>font</em>]]</p>
322 <p>This lets you customize which font to use for the various text elements on
323 the RRD graphs. <code>DEFAULT</code> sets the default value for all elements, <code>TITLE</code>
324 for the title, <code>AXIS</code> for the axis labels, <code>UNIT</code> for the vertical unit
325 label, <code>LEGEND</code> for the graph legend, <code>WATERMARK</code> for the watermark on the
326 edge of the graph.</p>
327 <p>Use Times for the title: <code>--font TITLE:13:Times</code></p>
328 <p>If you do not give a font string you can modify just the size of the default font:
329 <code>--font TITLE:13:</code>.</p>
330 <p>If you specify the size 0 then you can modify just the font without touching
331 the size. This is especially useful for altering the default font without
332 resetting the default fontsizes: <code>--font DEFAULT:0:Courier</code>.</p>
333 <p>RRDtool comes with a preset default font. You can set the environment
334 variable <code>RRD_DEFAULT_FONT</code> if you want to change this.</p>
335 <p>RRDtool uses Pango for its font handling. This means you can to use
336 the full Pango syntax when selecting your font:</p>
337 <p>The font name has the form &quot;[<em>FAMILY-LIST</em>] [<em>STYLE-OPTIONS</em>] [<em>SIZE</em>]&quot;,
338 where <em>FAMILY-LIST</em> is a comma separated list of families optionally
339 terminated by a comma, <em>STYLE_OPTIONS</em> is a whitespace separated list of
340 words where each WORD describes one of style, variant, weight, stretch, or
341 gravity, and <em>SIZE</em> is a decimal number (size in points) or optionally
342 followed by the unit modifier &quot;px&quot; for absolute size. Any one of the options
343 may be absent.</p>
344 <p>[<strong>-R</strong>|<strong>--font-render-mode</strong> {<strong>normal</strong>,<strong>light</strong>,<strong>mono</strong>}]</p>
345 <p>There are 3 font render modes:</p>
346 <p><strong>normal</strong>: Full Hinting and Antialiasing (default)</p>
347 <p><strong>light</strong>: Slight Hinting and Antialiasing</p>
348 <p><strong>mono</strong>: Full Hinting and NO Antialiasing</p>
349 <p>[<strong>-B</strong>|<strong>--font-smoothing-threshold</strong> <em>size</em>]</p>
350 <p>(this gets ignored in 1.3 for now!)</p>
351 <p>This specifies the largest font size which will be rendered
352 bitmapped, that is, without any font smoothing. By default,
353 no text is rendered bitmapped.</p>
354 <p>[<strong>-P</strong>|<strong>--pango-markup</strong>]</p>
355 <p>All text in rrdtool is rendered using Pango. With the <strong>--pango-markup</strong> option, all
356 text will be processed by pango markup. This allows to embed some simple html
357 like markup tags using</p>
358 <pre>
359  &lt;span key=&quot;value&quot;&gt;text&lt;/span&gt;</pre>
360 <p>Apart from the verbose syntax, there are also the following short tags available.</p>
361 <pre>
362  b     Bold
363  big   Makes font relatively larger, equivalent to &lt;span size=&quot;larger&quot;&gt;
364  i     Italic
365  s     Strikethrough
366  sub   Subscript
367  sup   Superscript
368  small Makes font relatively smaller, equivalent to &lt;span size=&quot;smaller&quot;&gt;
369  tt    Monospace font
370  u     Underline</pre>
371 <p>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>.</p>
372 <p>[<strong>-G</strong>|<strong>--graph-render-mode</strong> {<strong>normal</strong>,<strong>mono</strong>}]</p>
373 <p>There are 2 render modes:</p>
374 <p><strong>normal</strong>: Graphs are fully Antialiased (default)</p>
375 <p><strong>mono</strong>: No Antialiasing</p>
376 <p>[<strong>-E</strong>|<strong>--slope-mode</strong>]</p>
377 <p>RRDtool graphs are composed of stair case curves by default. This is in line with
378 the way RRDtool calculates its data. Some people favor a more 'organic' look
379 for their graphs even though it is not all that true.</p>
380 <p>[<strong>-a</strong>|<strong>--imgformat</strong> <strong>PNG</strong>|<strong>SVG</strong>|<strong>EPS</strong>|<strong>PDF</strong>]</p>
381 <p>Image format for the generated graph. For the vector formats you can
382 choose among the standard Postscript fonts Courier-Bold,
383 Courier-BoldOblique, Courier-Oblique, Courier, Helvetica-Bold,
384 Helvetica-BoldOblique, Helvetica-Oblique, Helvetica, Symbol,
385 Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.</p>
386 <p>[<strong>-i</strong>|<strong>--interlaced</strong>]</p>
387 <p>(this gets ignored in 1.3 for now!)</p>
388 <p>If images are interlaced they become visible on browsers more quickly.</p>
389 <p>[<strong>-g</strong>|<strong>--no-legend</strong>]</p>
390 <p>Suppress generation of the legend; only render the graph.</p>
391 <p>[<strong>-F</strong>|<strong>--force-rules-legend</strong>]</p>
392 <p>Force the generation of HRULE and VRULE legends even if those HRULE or
393 VRULE will not be drawn because out of graph boundaries (mimics
394 behaviour of pre 1.0.42 versions).</p>
395 <p>[<strong>-T</strong>|<strong>--tabwidth</strong> <em>value</em>]</p>
396 <p>By default the tab-width is 40 pixels, use this option to change it.</p>
397 <p>[<strong>-b</strong>|<strong>--base</strong> <em>value</em>]</p>
398 <p>If you are graphing memory (and NOT network traffic) this switch
399 should be set to 1024 so that one Kb is 1024 byte. For traffic
400 measurement, 1 kb/s is 1000 b/s.</p>
401 <p>[<strong>-W</strong>|<strong>--watermark</strong> <em>string</em>]</p>
402 <p>Adds the given string as a watermark, horizontally centered, at the bottom 
403 of the graph.</p>
404 <p>
405 </p>
406 <h2><a name="data_and_variables">Data and variables</a></h2>
407 <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>
408 <p><strong>CDEF:</strong><em>vname</em><strong>=</strong><em>RPN expression</em></p>
409 <p><strong>VDEF:</strong><em>vname</em><strong>=</strong><em>RPN expression</em></p>
410 <p>You need at least one <strong>DEF</strong> statement to generate anything. The
411 other statements are useful but optional.
412 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>
413 <p>NOTE: <strong>Graph and print elements</strong></p>
414 <p>You need at least one graph element to generate an image and/or
415 at least one print statement to generate a report.
416 See <a href="././rrdgraph_graph.html">the rrdgraph_graph manpage</a> for the exact format.</p>
417 <p>
418 </p>
419 <h2><a name="graphv">graphv</a></h2>
420 <p>Calling rrdtool with the graphv option will return information in the
421 rrdtool info format. On the command line this means that all output will be
422 in key=value format. When used from the Perl and Ruby bindings a hash
423 pointer will be returned from the call.</p>
424 <p>When the filename '-' is given, the contents of the graph itself will also
425 be returned through this interface (hash key 'image'). On the command line
426 the output will look like this:</p>
427 <pre>
428  print[0] = &quot;0.020833&quot;
429  print[1] = &quot;0.0440833&quot;
430  graph_left = 51
431  graph_top = 22
432  graph_width = 400
433  graph_height = 100
434  graph_start = 1232908800
435  graph_end = 1232914200
436  image_width = 481
437  image_height = 154
438  value_min = 0.0000000000e+00
439  value_max = 4.0000000000e-02
440  image = BLOB_SIZE:8196
441  [... 8196 bytes of image data ...]</pre>
442 <p>There is more information returned than in the standard interface.
443 Especially the 'graph_*' keys are new. They help applications that want to
444 know what is where on the graph.</p>
445 <p>
446 </p>
447 <hr />
448 <h1><a name="see_also">SEE ALSO</a></h1>
449 <p><a href="././rrdgraph.html">the rrdgraph manpage</a> gives an overview of how <strong>rrdtool graph</strong> works.
450 <a href="././rrdgraph_data.html">the rrdgraph_data manpage</a> describes <strong>DEF</strong>,<strong>CDEF</strong> and <strong>VDEF</strong> in detail.
451 <a href="././rrdgraph_rpn.html">the rrdgraph_rpn manpage</a> describes the <strong>RPN</strong> language used in the <strong>?DEF</strong> statements.
452 <a href="././rrdgraph_graph.html">the rrdgraph_graph manpage</a> page describes all of the graph and print functions.</p>
453 <p>Make sure to read <a href="././rrdgraph_examples.html">the rrdgraph_examples manpage</a> for tips&amp;tricks.</p>
454 <p>
455 </p>
456 <hr />
457 <h1><a name="author">AUTHOR</a></h1>
458 <p>Program by Tobias Oetiker &lt;<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>&gt;</p>
459 <p>This manual page by Alex van den Bogaerdt &lt;<a href="mailto:alex@vandenbogaerdt.nl">alex@vandenbogaerdt.nl</a>&gt;
460 with corrections and/or additions by several people</p>
462 </body>
464 </html>