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]
16
17       HRULE:value#color[:legend]
18
19       LINE[width]:value[#color][:[legend][:STACK]]
20
21       AREA:value[#color][:[legend][:STACK]]
22
23       TICK:vname#rrggbb[aa][:fraction[:legend]]
24
25       SHIFT:vname:offset
26
27       PRINT:vname:CF:format (deprecated)
28
29       GPRINT:vname:CF:format (deprecated)
30
31       STACK:vname#color[:legend] (deprecated)
32

DESCRIPTION

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

NOTES on legend arguments

225       Escaping the colon
226
227       A colon ':' in a legend argument will mark the end of the legend. To
228       enter a ':' as part of a legend, the colon must be escaped with a back‐
229       slash '\:'.  Beware that many environments process backslashes them‐
230       selves, so it may be necessary to write two backslashes in order to one
231       being passed onto rrd_graph.
232
233       String Formatting
234
235       The text printed below the actual graph can be formatted by appending
236       special escape characters at the end of a text. When ever such a char‐
237       acter occurs, all pending text is pushed onto the graph according to
238       the character specified.
239
240       Valid markers are: \j for justified, \l for left aligned, \r for right
241       aligned, and \c for centered. In the next section there is an example
242       showing how to use centered formatting.
243
244       \n is a valid alias for \l since incomplete parsing in earlier versions
245       of rrdtool lead to this behaviour and a number of people has been using
246       it.
247
248       Normally there are two space characters inserted between every two
249       items printed into the graph. The space following a string can be sup‐
250       pressed by putting a \g at the end of the string. The \g also ignores
251       any space inside the string if it is at the very end of the string.
252       This can be used in connection with %s to suppress empty unit strings.
253
254        GPRINT:a:MAX:%lf%s\g
255
256       A special case is COMMENT:\s which inserts some additional vertical
257       space before placing the next row of legends.
258
259       If you are using the proportional font in your graph, you can use tab
260       characters or the sequence \t to line-up legend elements. Note that the
261       tabs inserted are relative to the start of the current legend element!
262

SEE ALSO

264       rrdgraph gives an overview of how rrdtool graph works.  rrdgraph_data
265       describes DEF,CDEF and VDEF in detail.  rrdgraph_rpn describes the RPN
266       language used in the ?DEF statements.  rrdgraph_graph page describes
267       all of the graph and print functions.
268
269       Make sure to read rrdgraph_examples for tips&tricks.
270

AUTHOR

272       Program by Tobias Oetiker <tobi@oetiker.ch>
273
274       This manual page by Alex van den Bogaerdt <alex@ergens.op.het.net>
275
276
277
2781.2.27                            2008-02-17                 RRDGRAPH_GRAPH(1)
Impressum