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 dependent 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 want to have left and right aligned legends on the same line use
289       COMMENT:\u to go one line back like this:
290
291        COMMENT:left\l
292        COMMENT:\u
293        COMMENT:right\r
294
295       When using a proportional font in your graph, the tab characters or the
296       sequence \t will line-up legend elements. Note that the tabs inserted
297       are relative to the start of the current legend element!
298
299       Since RRDtool 1.3 is using Pango for rending text, you can use Pango
300       markup.  Pango uses the xml span tags for inline formatting
301       instructions.:
302
303       A simple example of a marked-up string might be:
304
305        <span foreground="blue" size="x-large">Blue text</span> is <i>cool</i>!
306
307       The complete list of attributes for the span tag (taken from the pango
308       documentation):
309
310       font_desc
311           A font description string, such as "Sans Italic 12"; note that any
312           other span attributes will override this description. So if you
313           have "Sans Italic" and also a style="normal" attribute, you will
314           get Sans normal, not italic.
315
316       font_family
317           A font family name
318
319       face
320           Synonym for font_family
321
322       size
323           Font size in 1024ths of a point, or one of the absolute sizes
324           'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large',
325           'xx-large', or one of the relative sizes 'smaller' or 'larger'. If
326           you want to specify a absolute size, it's usually easier to take
327           advantage of the ability to specify a partial font description
328           using 'font_desc'; you can use font_desc='12.5' rather than
329           size='12800'.
330
331       style
332           One of 'normal', 'oblique', 'italic'
333
334       weight
335           One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold',
336           'heavy', or a numeric weight
337
338       variant
339           'normal' or 'smallcaps'
340
341       stretch
342           One of 'ultracondensed', 'extracondensed', 'condensed',
343           'semicondensed', 'normal', 'semiexpanded', 'expanded',
344           'extraexpanded', 'ultraexpanded'
345
346       foreground
347           An RGB color specification such as '#00FF00' or a color name such
348           as 'red'
349
350       background
351           An RGB color specification such as '#00FF00' or a color name such
352           as 'red'
353
354       underline
355           One of 'none', 'single', 'double', 'low', 'error'
356
357       underline_color
358           The color of underlines; an RGB color specification such as
359           '#00FF00' or a color name such as 'red'
360
361       rise
362           Vertical displacement, in 10000ths of an em. Can be negative for
363           subscript, positive for superscript.
364
365       strikethrough
366           'true' or 'false' whether to strike through the text
367
368       strikethrough_color
369           The color of crossed out lines; an RGB color specification such as
370           '#00FF00' or a color name such as 'red'
371
372       fallback
373           'true' or 'false' whether to enable fallback. If disabled, then
374           characters will only be used from the closest matching font on the
375           system. No fallback will be done to other fonts on the system that
376           might contain the characters in the text. Fallback is enabled by
377           default. Most applications should not disable fallback.
378
379       lang
380           A language code, indicating the text language
381
382       letter_spacing
383           Inter-letter spacing in 1024ths of a point.
384
385       gravity
386           One of 'south', 'east', 'north', 'west', 'auto'.
387
388       gravity_hint
389           One of 'natural', 'strong', 'line'.
390
391       To save you some typing, there are also some shortcuts:
392
393       b   Bold
394
395       big Makes font relatively larger, equivalent to <span size="larger">
396
397       i   Italic
398
399       s   Strike through
400
401       sub Subscript
402
403       sup Superscript
404
405       small
406           Makes font relatively smaller, equivalent to <span size="smaller">
407
408       tt  Monospace font
409
410       u   Underline
411

SEE ALSO

413       rrdgraph gives an overview of how rrdtool graph works.  rrdgraph_data
414       describes DEF,CDEF and VDEF in detail.  rrdgraph_rpn describes the RPN
415       language used in the ?DEF statements.  rrdgraph_graph page describes
416       all of the graph and print functions.
417
418       Make sure to read rrdgraph_examples for tips&tricks.
419

AUTHOR

421       Program by Tobias Oetiker <tobi@oetiker.ch>
422
423       This manual page by Alex van den Bogaerdt <alex@vandenbogaerdt.nl> with
424       corrections and/or additions by several people
425
426
427
4281.4.4                             2010-01-25                 RRDGRAPH_GRAPH(1)
Impressum