Code

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