164
166
Similarly, no report is generated if you don't use print options.
165
167
.Sh "\s-1PRINT\s0"
166
168
.IX Subsection "PRINT"
167
.IP "\fB\s-1PRINT:\s0\fR\fIvname\fR\fB:\fR\fIformat\fR[\fB:strftime\fR]" 4
168
.IX Item "PRINT:vname:format[:strftime]"
169
\fI\f(BI\s-1PRINT:\s0\fI\fIvname\fI\f(BI:\fI\fIformat\fI[\f(BI:strftime\fI]\fR
170
.IX Subsection "PRINT:vname:format[:strftime]"
169
172
Depending on the context, either the value component or the time
170
173
component of a \fB\s-1VDEF\s0\fR is printed using \fIformat\fR. It is an error
171
174
to specify a \fIvname\fR generated by a \fB\s-1DEF\s0\fR or \fB\s-1CDEF\s0\fR.
173
176
Any text in \fIformat\fR is printed literally with one exception:
174
177
The percent character introduces a formatter string. This string
177
180
For printing values:
179
\&\fB%%\fR \- just prints a literal '%' character
181
\&\fB%#.#le\fR \- prints numbers like 1.2346e+04. The optional integers # denote field
183
just prints a literal '%' character
186
prints numbers like 1.2346e+04. The optional integers # denote field
182
187
width and decimal precision.
184
\&\fB%#.#lf\fR \- prints numbers like 12345.6789, with optional field width
190
prints numbers like 12345.6789, with optional field width
187
\&\fB%s\fR \- place this after \fB%le\fR, \fB%lf\fR or \fB%lg\fR. This will be replaced by the
194
place this after \fB%le\fR, \fB%lf\fR or \fB%lg\fR. This will be replaced by the
188
195
appropriate \s-1SI\s0 magnitude unit and the value will be scaled
189
196
accordingly (123456 \-> 123.456 k).
191
\&\fB%S\fR \- is similar to \fB%s\fR. It does, however, use a previously defined
199
is similar to \fB%s\fR. It does, however, use a previously defined
192
200
magnitude unit. If there is no such unit yet, it tries to define
193
201
one (just like \fB%s\fR) unless the value is zero, in which case the magnitude
194
202
unit stays undefined. Thus, formatter strings using \fB%S\fR and no \fB%s\fR
195
203
will all use the same magnitude unit except for zero values.
197
205
If you \s-1PRINT\s0 a \s-1VDEF\s0 value, you can also print the time associated with it by appending the string
198
206
\&\fB:strftime\fR to the format. Note that rrdtool uses the strftime function of your OSs clibrary. This means that
199
207
the conversion specifier may vary. Check the manual page if you are uncertain. The following is a list of
200
208
conversion specifiers usually supported across the board.
202
\&\fB%a\fR \- The abbreviated weekday name according to the current locale.
204
\&\fB%A\fR \- The full weekday name according to the current locale.
206
\&\fB%b\fR \- The abbreviated month name according to the current locale.
208
\&\fB%B\fR \- The full month name according to the current locale.
210
\&\fB%c\fR \- The preferred date and time representation for the current locale.
212
\&\fB%d\fR \- The day of the month as a decimal number (range 01 to 31).
214
\&\fB%H\fR \- The hour as a decimal number using a 24\-hour clock (range 00 to 23).
216
\&\fB%I\fR \- The hour as a decimal number using a 12\-hour clock (range 01 to 12).
218
\&\fB%j\fR \- The day of the year as a decimal number (range 001 to 366).
220
\&\fB%m\fR \- The month as a decimal number (range 01 to 12).
222
\&\fB%M\fR \- The minute as a decimal number (range 00 to 59).
224
\&\fB%p\fR \- Either `\s-1AM\s0' or `\s-1PM\s0' according to the given time value, or the corresponding
211
The abbreviated weekday name according to the current locale.
214
The full weekday name according to the current locale.
217
The abbreviated month name according to the current locale.
220
The full month name according to the current locale.
223
The preferred date and time representation for the current locale.
226
The day of the month as a decimal number (range 01 to 31).
229
The hour as a decimal number using a 24\-hour clock (range 00 to 23).
232
The hour as a decimal number using a 12\-hour clock (range 01 to 12).
235
The day of the year as a decimal number (range 001 to 366).
238
The month as a decimal number (range 01 to 12).
241
The minute as a decimal number (range 00 to 59).
244
Either `\s-1AM\s0' or `\s-1PM\s0' according to the given time value, or the corresponding
225
245
strings for the current locale. Noon is treated as `pm' and midnight as
226
246
`am'. Note that in many locales and `pm' notation is unsupported and in
227
247
such cases \f(CW%p\fR will return an empty string.
229
\&\fB%S\fR \- The second as a decimal number (range 00 to 61).
231
\&\fB%U\fR \- The week number of the current year as a decimal number, range 00 to 53, starting with the
250
The second as a decimal number (range 00 to 61).
253
The seconds since the epoch (1.1.1970) (libc dependant non standard!)
256
The week number of the current year as a decimal number, range 00 to 53, starting with the
232
257
first Sunday as the first day of week 01. See also \f(CW%V\fR and \f(CW%W\fR.
234
\&\fB%V\fR \- The \s-1ISO\s0 8601:1988 week number of the current year as a decimal number, range 01 to 53, where
260
The \s-1ISO\s0 8601:1988 week number of the current year as a decimal number, range 01 to 53, where
235
261
week 1 is the first week that has at least 4 days in the current year, and with Monday as the
236
262
first day of the week. See also \f(CW%U\fR and \f(CW%W\fR.
238
\&\fB%w\fR \- The day of the week as a decimal, range 0 to 6, Sunday being 0. See also \f(CW%u\fR.
240
\&\fB%W\fR \- The week number of the current year as a decimal number, range 00 to 53, starting with the
265
The day of the week as a decimal, range 0 to 6, Sunday being 0. See also \f(CW%u\fR.
268
The week number of the current year as a decimal number, range 00 to 53, starting with the
241
269
first Monday as the first day of week 01.
243
\&\fB%x\fR \- The preferred date representation for the current locale without the time.
245
\&\fB%X\fR \- The preferred time representation for the current locale without the date.
247
\&\fB%y\fR \- The year as a decimal number without a century (range 00 to 99).
249
\&\fB%Y\fR \- The year as a decimal number including the century.
251
\&\fB%Z\fR \- The time zone or name or abbreviation.
253
\&\fB%%\fR \- A literal `%' character.
254
.IP "\fB\s-1PRINT:\s0\fR\fIvname\fR\fB:\fR\fI\s-1CF\s0\fR\fB:\fR\fIformat\fR" 4
255
.IX Item "PRINT:vname:CF:format"
272
The preferred date representation for the current locale without the time.
275
The preferred time representation for the current locale without the date.
278
The year as a decimal number without a century (range 00 to 99).
281
The year as a decimal number including the century.
284
The time zone or name or abbreviation.
287
A literal `%' character.
289
\fI\f(BI\s-1PRINT:\s0\fI\fIvname\fI\f(BI:\fI\fI\s-1CF\s0\fI\f(BI:\fI\fIformat\fI\fR
290
.IX Subsection "PRINT:vname:CF:format"
256
292
\&\fIDeprecated. Use the new form of this command in new scripts.\fR
257
293
The first form of this command is to be used with \fB\s-1CDEF\s0\fR \fIvname\fRs.
258
294
.Sh "\s-1GRAPH\s0"
259
295
.IX Subsection "GRAPH"
260
.IP "\fB\s-1GPRINT\s0\fR\fB:\fR\fIvname\fR\fB:\fR\fIformat\fR" 4
261
.IX Item "GPRINT:vname:format"
296
\fI\f(BI\s-1GPRINT\s0\fI\f(BI:\fI\fIvname\fI\f(BI:\fI\fIformat\fI\fR
297
.IX Subsection "GPRINT:vname:format"
262
299
This is the same as \f(CW\*(C`PRINT\*(C'\fR, but printed inside the graph.
263
.IP "\fB\s-1GPRINT\s0\fR\fB:\fR\fIvname\fR\fB:\fR\fI\s-1CF\s0\fR\fB:\fR\fIformat\fR" 4
264
.IX Item "GPRINT:vname:CF:format"
301
\fI\f(BI\s-1GPRINT\s0\fI\f(BI:\fI\fIvname\fI\f(BI:\fI\fI\s-1CF\s0\fI\f(BI:\fI\fIformat\fI\fR
302
.IX Subsection "GPRINT:vname:CF:format"
265
304
\&\fIDeprecated. Use the new form of this command in new scripts.\fR
266
305
This is the same as \f(CW\*(C`PRINT\*(C'\fR, but printed inside the graph.
267
.IP "\fB\s-1COMMENT\s0\fR\fB:\fR\fItext\fR" 4
268
.IX Item "COMMENT:text"
307
\fI\f(BI\s-1COMMENT\s0\fI\f(BI:\fI\fItext\fI\fR
308
.IX Subsection "COMMENT:text"
269
310
Text is printed literally in the legend section of the graph. Note that in
270
311
RRDtool 1.2 you have to escape colons in \s-1COMMENT\s0 text in the same way you
271
312
have to escape them in \fB*PRINT\fR commands by writing \fB'\e:'\fR.
272
.IP "\fB\s-1VRULE\s0\fR\fB:\fR\fItime\fR\fB#\fR\fIcolor\fR [\fB:\fR\fIlegend\fR ]" 4
273
.IX Item "VRULE:time#color [:legend ]"
314
\fI\f(BI\s-1VRULE\s0\fI\f(BI:\fI\fItime\fI\f(BI#\fI\fIcolor\fI[\f(BI:\fI\fIlegend\fI][\f(BI:dashes\fI[\f(BI=\fI\fIon_s\fI[,\fIoff_s\fI[,\fIon_s\fI,\fIoff_s\fI]...]][\f(BI:dash\-offset=\fI\fIoffset\fI]]\fR
315
.IX Subsection "VRULE:time#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
274
317
Draw a vertical line at \fItime\fR. Its color is composed from three
275
318
hexadecimal numbers specifying the rgb color components (00 is off, \s-1FF\s0 is
276
319
maximum) red, green and blue followed by an optional alpha. Optionally, a legend box and string is
277
320
printed in the legend section. \fItime\fR may be a number or a variable
278
321
from a \fB\s-1VDEF\s0\fR. It is an error to use \fIvname\fRs from \fB\s-1DEF\s0\fR or \fB\s-1CDEF\s0\fR here.
279
.IP "\fB\s-1HRULE\s0\fR\fB:\fR\fIvalue\fR\fB#\fR\fIcolor\fR [ :\fIlegend\fR ]" 4
280
.IX Item "HRULE:value#color [ :legend ]"
322
Dashed lines can be drawn using the \fBdashes\fR modifier. See \fB\s-1LINE\s0\fR for more
325
\fI\f(BI\s-1HRULE\s0\fI\f(BI:\fI\fIvalue\fI\f(BI#\fI\fIcolor\fI[\f(BI:\fI\fIlegend\fI][\f(BI:dashes\fI[\f(BI=\fI\fIon_s\fI[,\fIoff_s\fI[,\fIon_s\fI,\fIoff_s\fI]...]][\f(BI:dash\-offset=\fI\fIoffset\fI]]\fR
326
.IX Subsection "HRULE:value#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
281
328
Draw a horizontal line at \fIvalue\fR. \s-1HRULE\s0 acts much like \s-1LINE\s0 except that
282
329
will have no effect on the scale of the graph. If a \s-1HRULE\s0 is outside the
283
330
graphing area it will just not be visible.
284
.IP "\fB\s-1LINE\s0\fR[\fIwidth\fR]\fB:\fR\fIvalue\fR[\fB#\fR\fIcolor\fR][\fB:\fR[\fIlegend\fR][\fB:STACK\fR]]" 4
285
.IX Item "LINE[width]:value[#color][:[legend][:STACK]]"
332
\fI\f(BI\s-1LINE\s0\fI[\fIwidth\fI]\f(BI:\fI\fIvalue\fI[\f(BI#\fI\fIcolor\fI][\f(BI:\fI[\fIlegend\fI][\f(BI:STACK\fI]][\f(BI:dashes\fI[\f(BI=\fI\fIon_s\fI[,\fIoff_s\fI[,\fIon_s\fI,\fIoff_s\fI]...]][\f(BI:dash\-offset=\fI\fIoffset\fI]]\fR
333
.IX Subsection "LINE[width]:value[#color][:[legend][:STACK]][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
286
335
Draw a line of the specified width onto the graph. \fIwidth\fR can be a
287
336
floating point number. If the color is not specified, the drawing is done
288
337
\&'invisibly'. This is useful when stacking something else on top of this
291
340
\&\fB\s-1VDEF\s0\fR, and \fB\s-1CDEF\s0\fR. If the optional \fB\s-1STACK\s0\fR modifier is used, this line
292
341
is stacked on top of the previous element which can be a \fB\s-1LINE\s0\fR or an
293
342
\&\fB\s-1AREA\s0\fR.
344
The \fBdashes\fR modifier enables dashed line style. Without any further options
345
a symmetric dashed line with a segment length of 5 pixels will be drawn. The
346
dash pattern can be changed if the \fBdashes=\fR parameter is followed by either
347
one value or an even number (1, 2, 4, 6, ...) of positive values. Each value
348
provides the length of alternate \fIon_s\fR and \fIoff_s\fR portions of the
349
stroke. The \fBdash-offset\fR parameter specifies an \fIoffset\fR into the pattern
350
at which the stroke begins.
295
352
When you do not specify a color, you cannot specify a legend. Should
296
353
you want to use \s-1STACK\s0, use the \*(L"LINEx:<value>::STACK\*(R" form.
297
.IP "\fB\s-1AREA\s0\fR\fB:\fR\fIvalue\fR[\fB#\fR\fIcolor\fR][\fB:\fR[\fIlegend\fR][\fB:STACK\fR]]" 4
298
.IX Item "AREA:value[#color][:[legend][:STACK]]"
355
\fI\f(BI\s-1AREA\s0\fI\f(BI:\fI\fIvalue\fI[\f(BI#\fI\fIcolor\fI][\f(BI:\fI[\fIlegend\fI][\f(BI:STACK\fI]]\fR
356
.IX Subsection "AREA:value[#color][:[legend][:STACK]]"
299
358
See \fB\s-1LINE\s0\fR, however the area between the x\-axis and the line will
301
.IP "\fB\s-1TICK\s0\fR\fB:\fR\fIvname\fR\fB#\fR\fIrrggbb\fR[\fIaa\fR][\fB:\fR\fIfraction\fR[\fB:\fR\fIlegend\fR]]" 4
302
.IX Item "TICK:vname#rrggbb[aa][:fraction[:legend]]"
361
\fI\f(BI\s-1TICK\s0\fI\f(BI:\fI\fIvname\fI\f(BI#\fI\fIrrggbb\fI[\fIaa\fI][\f(BI:\fI\fIfraction\fI[\f(BI:\fI\fIlegend\fI]]\fR
362
.IX Subsection "TICK:vname#rrggbb[aa][:fraction[:legend]]"
303
364
Plot a tick mark (a vertical line) for each value of \fIvname\fR that is
304
365
non-zero and not *UNKNOWN*. The \fIfraction\fR argument specifies the length of
305
366
the tick mark as a fraction of the y\-axis; the default value is 0.1 (10% of
306
367
the axis). Note that the color specification is not optional. The \s-1TICK\s0 marks normaly
307
368
start at the lower edge of the graphing area. If the fraction is negative they start
308
369
at the upper border of the graphing area.
309
.IP "\fB\s-1SHIFT\s0\fR\fB:\fR\fIvname\fR\fB:\fR\fIoffset\fR" 4
310
.IX Item "SHIFT:vname:offset"
371
\fI\f(BI\s-1SHIFT\s0\fI\f(BI:\fI\fIvname\fI\f(BI:\fI\fIoffset\fI\fR
372
.IX Subsection "SHIFT:vname:offset"
311
374
Using this command \fBRRDtool\fR will graph the following elements
312
375
with the specified offset. For instance, you can specify an
313
376
offset of (\ 7*24*60*60\ =\ )\ 604'800\ seconds to \*(L"look back\*(R" one
314
377
week. Make sure to tell the viewer of your graph you did this ...
315
378
As with the other graphing elements, you can specify a number or
317
.IP "\fB\s-1STACK\s0\fR\fB:\fR\fIvname\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR]" 4
318
.IX Item "STACK:vname#color[:legend]"
381
\fI\f(BI\s-1TEXTALIGN\s0\fI\f(BI:\fI{\f(BIleft\fI|\f(BIright\fI|\f(BIjustified\fI|\f(BIcenter\fI}\fR
382
.IX Subsection "TEXTALIGN:{left|right|justified|center}"
384
Labels are placed below the graph. When they overflow to the left, they wrap
385
to the next line. By default, lines are justified left and right. The
386
\&\fB\s-1TEXTALIGN\s0\fR function lets you change this default. This is a command and
387
not an option, so that you can change the default several times in your
390
\fI\f(BI\s-1STACK\s0\fI\f(BI:\fI\fIvname\fI\f(BI#\fI\fIcolor\fI[\f(BI:\fI\fIlegend\fI]\fR
391
.IX Subsection "STACK:vname#color[:legend]"
319
393
\&\fIDeprecated. Use the \f(BI\s-1STACK\s0\fI modifiers on the other commands.\fR
321
395
\&\fBSome notes on stacking\fR
373
447
characters or the sequence \fB\et\fR to line-up legend elements. Note that
374
448
the tabs inserted are relative to the start of the current legend
451
Since RRDtool 1.3 is using Pango for rending text, you can use Pango markup.
452
Pango uses the xml \fBspan\fR tags for inline formatting instructions.:
454
A simple example of a marked-up string might be:
457
\& <span foreground="blue" size="x\-large">Blue text</span> is <i>cool</i>!
460
The complete list of attributes for the span tag (taken from the pango documentation):
461
.IP "\fBfont_desc\fR" 4
463
A font description string, such as \*(L"Sans Italic 12\*(R"; note that any other span attributes will override this description. So if you have \*(L"Sans Italic\*(R" and also a style=\*(L"normal\*(R" attribute, you will get Sans normal, not italic.
464
.IP "\fBfont_family\fR" 4
465
.IX Item "font_family"
469
Synonym for font_family
472
Font size in 1024ths of a point, or one of the absolute sizes 'xx\-small', 'x\-small', 'small', 'medium', 'large', 'x\-large', 'xx\-large', or one of the relative sizes 'smaller' or 'larger'. If you want to specify a absolute size, it's usually easier to take advantage of the ability to specify a partial font description using 'font_desc'; you can use font_desc='12.5' rather than size='12800'.
475
One of 'normal', 'oblique', 'italic'
478
One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight
479
.IP "\fBvariant\fR" 4
481
\&'normal' or 'smallcaps'
482
.IP "\fBstretch\fR" 4
484
One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'
485
.IP "\fBforeground\fR" 4
486
.IX Item "foreground"
487
An \s-1RGB\s0 color specification such as '#00FF00' or a color name such as 'red'
488
.IP "\fBbackground\fR" 4
489
.IX Item "background"
490
An \s-1RGB\s0 color specification such as '#00FF00' or a color name such as 'red'
491
.IP "\fBunderline\fR" 4
493
One of 'none', 'single', 'double', 'low', 'error'
494
.IP "\fBunderline_color\fR" 4
495
.IX Item "underline_color"
496
The color of underlines; an \s-1RGB\s0 color specification such as '#00FF00' or a color name such as 'red'
499
Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.
500
.IP "\fBstrikethrough\fR" 4
501
.IX Item "strikethrough"
502
\&'true' or 'false' whether to strike through the text
503
.IP "\fBstrikethrough_color\fR" 4
504
.IX Item "strikethrough_color"
505
The color of strikethrough lines; an \s-1RGB\s0 color specification such as '#00FF00' or a color name such as 'red'
506
.IP "\fBfallback\fR" 4
508
\&'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.
511
A language code, indicating the text language
512
.IP "\fBletter_spacing\fR" 4
513
.IX Item "letter_spacing"
514
Inter-letter spacing in 1024ths of a point.
515
.IP "\fBgravity\fR" 4
517
One of 'south', 'east', 'north', 'west', 'auto'.
518
.IP "\fBgravity_hint\fR" 4
519
.IX Item "gravity_hint"
520
One of 'natural', 'strong', 'line'.
522
To save you some typing, there are also some shortcuts:
528
Makes font relatively larger, equivalent to <span size=\*(L"larger\*(R">
543
Makes font relatively smaller, equivalent to <span size=\*(L"smaller\*(R">
377
551
.IX Header "SEE ALSO"
378
552
rrdgraph gives an overview of how \fBrrdtool graph\fR works.