1RRDGRAPH_GRAPH(1)                   rrdtool                  RRDGRAPH_GRAPH(1)
2
3
4

NAME

6       rrdgraph_graph - rrdtool graph command reference
7

SYNOPSIS

9       PRINT:vname:format
10
11       GPRINT:vname:format
12
13       COMMENT:text
14
15       VRULE:time#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]
16
17       HRULE:value#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]
18
19       LINE[width]:value[#color][:[legend][:STACK]][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]
20
21       AREA:value[#color][:[legend][:STACK]]
22
23       TICK:vname#rrggbb[aa][:fraction[:legend]]
24
25       SHIFT:vname:offset
26
27       TEXTALIGN:{left|right|justified|center}
28
29       PRINT:vname:CF:format (deprecated)
30
31       GPRINT:vname:CF:format (deprecated)
32
33       STACK:vname#color[:legend] (deprecated)
34

DESCRIPTION

36       These instructions allow you to generate your image or report.  If you
37       don't use any graph elements, no graph is generated.  Similarly, no
38       report is generated if you don't use print options.
39
40   PRINT
41       PRINT:vname:format[:strftime]
42
43       Depending on the context, either the value component or the time
44       component of a VDEF is printed using format. It is an error to specify
45       a vname generated by a DEF or CDEF.
46
47       Any text in format is printed literally with one exception: The percent
48       character introduces a formatter string. This string can be:
49
50       For printing values:
51
52       %%  just prints a literal '%' character
53
54       %#.#le
55           prints numbers like 1.2346e+04. The optional integers # denote
56           field width and decimal precision.
57
58       %#.#lf
59           prints numbers like 12345.6789, with optional field width and
60           precision.
61
62       %s  place this after %le, %lf or %lg. This will be replaced by the
63           appropriate SI magnitude unit and the value will be scaled
64           accordingly (123456 -> 123.456 k).
65
66       %S  is similar to %s. It does, however, use a previously defined
67           magnitude unit. If there is no such unit yet, it tries to define
68           one (just like %s) unless the value is zero, in which case the
69           magnitude unit stays undefined. Thus, formatter strings using %S
70           and no %s will all use the same magnitude unit except for zero
71           values.
72
73       If you PRINT a VDEF value, you can also print the time associated with
74       it by appending the string :strftime to the format. Note that rrdtool
75       uses the strftime function of your OSs C library. This means that the
76       conversion specifier may vary. Check the manual page if you are
77       uncertain. The following is a list of conversion specifiers usually
78       supported across the board.
79
80       %a  The abbreviated weekday name according to the current locale.
81
82       %A  The full weekday name according to the current locale.
83
84       %b  The abbreviated month name according to the current locale.
85
86       %B  The full month name according to the current locale.
87
88       %c  The preferred date and time representation for the current locale.
89
90       %d  The day of the month as a decimal number (range 01 to 31).
91
92       %H  The hour as a decimal number using a 24-hour clock (range 00 to
93           23).
94
95       %I  The hour as a decimal number using a 12-hour clock (range 01 to
96           12).
97
98       %j  The day of the year as a decimal number (range 001 to 366).
99
100       %m  The month as a decimal number (range 01 to 12).
101
102       %M  The minute as a decimal number (range 00 to 59).
103
104       %p  Either `AM' or `PM' according to the given time value, or the
105           corresponding strings for the current locale.  Noon is treated as
106           `pm' and midnight as `am'.  Note that in many locales and `pm'
107           notation is unsupported and in such cases %p will return an empty
108           string.
109
110       %s  The second as a decimal number (range 00 to 61).
111
112       %S  The seconds since the epoch (1.1.1970) (libc dependant non
113           standard!)
114
115       %U  The  week  number  of  the current year as a decimal number, range
116           00 to 53, starting with the first Sunday as the first day of week
117           01. See also %V and %W.
118
119       %V  The ISO 8601:1988 week number of the current year as a decimal
120           number, range 01 to  53,  where week  1 is the first week that has
121           at least 4 days in the current year, and with Monday as the first
122           day of the week. See also %U and %W.
123
124       %w  The day of the week as a decimal, range 0 to 6, Sunday being 0.
125           See also %u.
126
127       %W  The week number of the current year as a decimal number, range 00
128           to  53,  starting  with  the first Monday as the first day of week
129           01.
130
131       %x  The preferred date representation for the current locale without
132           the time.
133
134       %X  The preferred time representation for the current locale without
135           the date.
136
137       %y  The year as a decimal number without a century (range 00 to 99).
138
139       %Y  The year as a decimal number including the century.
140
141       %Z  The time zone or name or abbreviation.
142
143       %%  A literal `%' character.
144
145       PRINT:vname:CF:format
146
147       Deprecated. Use the new form of this command in new scripts.  The first
148       form of this command is to be used with CDEF vnames.
149
150   GRAPH
151       GPRINT:vname:format
152
153       This is the same as "PRINT", but printed inside the graph.
154
155       GPRINT:vname:CF:format
156
157       Deprecated. Use the new form of this command in new scripts.  This is
158       the same as "PRINT", but printed inside the graph.
159
160       COMMENT:text
161
162       Text is printed literally in the legend section of the graph. Note that
163       in RRDtool 1.2 you have to escape colons in COMMENT text in the same
164       way you have to escape them in *PRINT commands by writing '\:'.
165
166       VRULE:time#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]
167
168       Draw a vertical line at time.  Its color is composed from three
169       hexadecimal numbers specifying the rgb color components (00 is off, FF
170       is maximum) red, green and blue followed by an optional alpha.
171       Optionally, a legend box and string is printed in the legend section.
172       time may be a number or a variable from a VDEF. It is an error to use
173       vnames from DEF or CDEF here.  Dashed lines can be drawn using the
174       dashes modifier. See LINE for more details.
175
176       HRULE:value#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]
177
178       Draw a horizontal line at value.  HRULE acts much like LINE except that
179       will have no effect on the scale of the graph. If a HRULE is outside
180       the graphing area it will just not be visible.
181
182       LINE[width]:value[#color][:[legend][:STACK]][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]
183
184       Draw a line of the specified width onto the graph. width can be a
185       floating point number. If the color is not specified, the drawing is
186       done 'invisibly'. This is useful when stacking something else on top of
187       this line. Also optional is the legend box and string which will be
188       printed in the legend section if specified. The value can be generated
189       by DEF, VDEF, and CDEF.  If the optional STACK modifier is used, this
190       line is stacked on top of the previous element which can be a LINE or
191       an AREA.
192
193       The dashes modifier enables dashed line style. Without any further
194       options a symmetric dashed line with a segment length of 5 pixels will
195       be drawn. The dash pattern can be changed if the dashes= parameter is
196       followed by either one value or an even number (1, 2, 4, 6, ...) of
197       positive values. Each value provides the length of alternate on_s and
198       off_s portions of the stroke. The dash-offset parameter specifies an
199       offset into the pattern at which the stroke begins.
200
201       When you do not specify a color, you cannot specify a legend.  Should
202       you want to use STACK, use the "LINEx:<value>::STACK" form.
203
204       AREA:value[#color][:[legend][:STACK]]
205
206       See LINE, however the area between the x-axis and the line will be
207       filled.
208
209       TICK:vname#rrggbb[aa][:fraction[:legend]]
210
211       Plot a tick mark (a vertical line) for each value of vname that is non-
212       zero and not *UNKNOWN*. The fraction argument specifies the length of
213       the tick mark as a fraction of the y-axis; the default value is 0.1
214       (10% of the axis). Note that the color specification is not optional.
215       The TICK marks normally start at the lower edge of the graphing area.
216       If the fraction is negative they start at the upper border of the
217       graphing area.
218
219       SHIFT:vname:offset
220
221       Using this command RRDtool will graph the following elements with the
222       specified offset.  For instance, you can specify an offset of
223       ( 7*24*60*60 = ) 604'800 seconds to "look back" one week. Make sure to
224       tell the viewer of your graph you did this ...  As with the other
225       graphing elements, you can specify a number or a variable here.
226
227       TEXTALIGN:{left|right|justified|center}
228
229       Labels are placed below the graph. When they overflow to the left, they
230       wrap to the next line. By default, lines are justified left and right.
231       The TEXTALIGN function lets you change this default. This is a command
232       and not an option, so that you can change the default several times in
233       your argument list.
234
235       STACK:vname#color[:legend]
236
237       Deprecated.  Use the STACK modifiers on the other commands instead!
238
239       Some notes on stacking
240
241       When stacking, an element is not placed above the X-axis but rather on
242       top of the previous element.  There must be something to stack upon.
243
244       You can use an invisible LINE or AREA to stacked upon.
245
246       An unknown value makes the entire stack unknown from that moment on.
247       You don't know where to begin (the unknown value) and therefore do not
248       know where to end.
249
250       If you want to make sure you will be displaying a certain variable,
251       make sure never to stack upon the unknown value.  Use a CDEF
252       instruction with IF and UN to do so.
253

NOTES on legend arguments

255   Escaping the colon
256       A colon ':' in a legend argument will mark the end of the legend. To
257       enter a ':' as part of a legend, the colon must be escaped with a
258       backslash '\:'.  Beware that many environments process backslashes
259       themselves, so it may be necessary to write two backslashes in order to
260       one being passed onto rrd_graph.
261
262   String Formatting
263       The text printed below the actual graph can be formatted by appending
264       special escape characters at the end of a text. When ever such a
265       character occurs, all pending text is pushed onto the graph according
266       to the character specified.
267
268       Valid markers are: \j for justified, \l for left aligned, \r for right
269       aligned, and \c for centered. In the next section there is an example
270       showing how to use centered formatting.
271
272       \n is a valid alias for \l since incomplete parsing in earlier versions
273       of rrdtool lead to this behavior and a number of people has been using
274       it.
275
276       Normally there are two space characters inserted between every two
277       items printed into the graph. The space following a string can be
278       suppressed by putting a \g at the end of the string. The \g also
279       ignores any space inside the string if it is at the very end of the
280       string. This can be used in connection with %s to suppress empty unit
281       strings.
282
283        GPRINT:a:MAX:%lf%s\g
284
285       A special case is COMMENT:\s which inserts some additional vertical
286       space before placing the next row of legends.
287
288       If you are using the proportional font in your graph, you can use tab
289       characters or the sequence \t to line-up legend elements. Note that the
290       tabs inserted are relative to the start of the current legend element!
291
292       Since RRDtool 1.3 is using Pango for rending text, you can use Pango
293       markup.  Pango uses the xml span tags for inline formatting
294       instructions.:
295
296       A simple example of a marked-up string might be:
297
298        <span foreground="blue" size="x-large">Blue text</span> is <i>cool</i>!
299
300       The complete list of attributes for the span tag (taken from the pango
301       documentation):
302
303       font_desc
304           A font description string, such as "Sans Italic 12"; note that any
305           other span attributes will override this description. So if you
306           have "Sans Italic" and also a style="normal" attribute, you will
307           get Sans normal, not italic.
308
309       font_family
310           A font family name
311
312       face
313           Synonym for font_family
314
315       size
316           Font size in 1024ths of a point, or one of the absolute sizes
317           'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large',
318           'xx-large', or one of the relative sizes 'smaller' or 'larger'. If
319           you want to specify a absolute size, it's usually easier to take
320           advantage of the ability to specify a partial font description
321           using 'font_desc'; you can use font_desc='12.5' rather than
322           size='12800'.
323
324       style
325           One of 'normal', 'oblique', 'italic'
326
327       weight
328           One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold',
329           'heavy', or a numeric weight
330
331       variant
332           'normal' or 'smallcaps'
333
334       stretch
335           One of 'ultracondensed', 'extracondensed', 'condensed',
336           'semicondensed', 'normal', 'semiexpanded', 'expanded',
337           'extraexpanded', 'ultraexpanded'
338
339       foreground
340           An RGB color specification such as '#00FF00' or a color name such
341           as 'red'
342
343       background
344           An RGB color specification such as '#00FF00' or a color name such
345           as 'red'
346
347       underline
348           One of 'none', 'single', 'double', 'low', 'error'
349
350       underline_color
351           The color of underlines; an RGB color specification such as
352           '#00FF00' or a color name such as 'red'
353
354       rise
355           Vertical displacement, in 10000ths of an em. Can be negative for
356           subscript, positive for superscript.
357
358       strikethrough
359           'true' or 'false' whether to strike through the text
360
361       strikethrough_color
362           The color of strikethrough lines; an RGB color specification such
363           as '#00FF00' or a color name such as 'red'
364
365       fallback
366           'true' or 'false' whether to enable fallback. If disabled, then
367           characters will only be used from the closest matching font on the
368           system. No fallback will be done to other fonts on the system that
369           might contain the characters in the text. Fallback is enabled by
370           default. Most applications should not disable fallback.
371
372       lang
373           A language code, indicating the text language
374
375       letter_spacing
376           Inter-letter spacing in 1024ths of a point.
377
378       gravity
379           One of 'south', 'east', 'north', 'west', 'auto'.
380
381       gravity_hint
382           One of 'natural', 'strong', 'line'.
383
384       To save you some typing, there are also some shortcuts:
385
386       b   Bold
387
388       big Makes font relatively larger, equivalent to <span size="larger">
389
390       i   Italic
391
392       s   Strikethrough
393
394       sub Subscript
395
396       sup Superscript
397
398       small
399           Makes font relatively smaller, equivalent to <span size="smaller">
400
401       tt  Monospace font
402
403       u   Underline
404

SEE ALSO

406       rrdgraph gives an overview of how rrdtool graph works.  rrdgraph_data
407       describes DEF,CDEF and VDEF in detail.  rrdgraph_rpn describes the RPN
408       language used in the ?DEF statements.  rrdgraph_graph page describes
409       all of the graph and print functions.
410
411       Make sure to read rrdgraph_examples for tips&tricks.
412

AUTHOR

414       Program by Tobias Oetiker <tobi@oetiker.ch>
415
416       This manual page by Alex van den Bogaerdt <alex@vandenbogaerdt.nl> with
417       corrections and/or additions by several people
418
419
420
4211.3.8                             2009-02-21                 RRDGRAPH_GRAPH(1)
Impressum