diff --git a/doc/rrdgraph_graph.1 b/doc/rrdgraph_graph.1
index 09940ba3e9ec637e19c07e86f3c0c7b6a027faff..b790e343edb79162d54cbe8f81b631e110b27679 100644 (file)
--- a/doc/rrdgraph_graph.1
+++ b/doc/rrdgraph_graph.1
.\" ========================================================================
.\"
.IX Title "RRDGRAPH_GRAPH 1"
-.TH RRDGRAPH_GRAPH 1 "2008-03-15" "1.3rc9" "rrdtool"
+.TH RRDGRAPH_GRAPH 1 "2008-09-06" "1.3.5" "rrdtool"
.SH "NAME"
rrdgraph_graph \- rrdtool graph command reference
.SH "SYNOPSIS"
These instructions allow you to generate your image or report.
If you don't use any graph elements, no graph is generated.
Similarly, no report is generated if you don't use print options.
-.SH "PRINT"
-.IX Header "PRINT"
-.IP "\fB\s-1PRINT:\s0\fR\fIvname\fR\fB:\fR\fIformat\fR[\fB:strftime\fR]" 4
-.IX Item "PRINT:vname:format[:strftime]"
+.Sh "\s-1PRINT\s0"
+.IX Subsection "PRINT"
+\fI\f(BI\s-1PRINT:\s0\fI\fIvname\fI\f(BI:\fI\fIformat\fI[\f(BI:strftime\fI]\fR
+.IX Subsection "PRINT:vname:format[:strftime]"
+.PP
Depending on the context, either the value component or the time
component of a \fB\s-1VDEF\s0\fR is printed using \fIformat\fR. It is an error
to specify a \fIvname\fR generated by a \fB\s-1DEF\s0\fR or \fB\s-1CDEF\s0\fR.
-.Sp
+.PP
Any text in \fIformat\fR is printed literally with one exception:
The percent character introduces a formatter string. This string
can be:
-.Sp
+.PP
For printing values:
-.RS 4
.IP "\fB%%\fR" 4
.IX Item "%%"
just prints a literal '%' character
one (just like \fB%s\fR) unless the value is zero, in which case the magnitude
unit stays undefined. Thus, formatter strings using \fB%S\fR and no \fB%s\fR
will all use the same magnitude unit except for zero values.
-.RE
-.RS 4
-.Sp
+.PP
If you \s-1PRINT\s0 a \s-1VDEF\s0 value, you can also print the time associated with it by appending the string
\&\fB:strftime\fR to the format. Note that rrdtool uses the strftime function of your OSs clibrary. This means that
the conversion specifier may vary. Check the manual page if you are uncertain. The following is a list of
@@ -247,9 +245,12 @@ Either `\s-1AM\s0' or `\s-1PM\s0' according to the given time value, or the corr
strings for the current locale. Noon is treated as `pm' and midnight as
`am'. Note that in many locales and `pm' notation is unsupported and in
such cases \f(CW%p\fR will return an empty string.
+.IP "\fB%s\fR" 4
+.IX Item "%s"
+The second as a decimal number (range 00 to 61).
.IP "\fB%S\fR" 4
.IX Item "%S"
-The second as a decimal number (range 00 to 61).
+The seconds since the epoch (1.1.1970) (libc dependant non standard!)
.IP "\fB%U\fR" 4
.IX Item "%U"
The week number of the current year as a decimal number, range 00 to 53, starting with the
.IP "\fB%%\fR" 4
.IX Item "%%"
A literal `%' character.
-.RE
-.RS 4
-.RE
-.IP "\fB\s-1PRINT:\s0\fR\fIvname\fR\fB:\fR\fI\s-1CF\s0\fR\fB:\fR\fIformat\fR" 4
-.IX Item "PRINT:vname:CF:format"
+.PP
+\fI\f(BI\s-1PRINT:\s0\fI\fIvname\fI\f(BI:\fI\fI\s-1CF\s0\fI\f(BI:\fI\fIformat\fI\fR
+.IX Subsection "PRINT:vname:CF:format"
+.PP
\&\fIDeprecated. Use the new form of this command in new scripts.\fR
The first form of this command is to be used with \fB\s-1CDEF\s0\fR \fIvname\fRs.
-.SH "GRAPH"
-.IX Header "GRAPH"
-.IP "\fB\s-1GPRINT\s0\fR\fB:\fR\fIvname\fR\fB:\fR\fIformat\fR" 4
-.IX Item "GPRINT:vname:format"
+.Sh "\s-1GRAPH\s0"
+.IX Subsection "GRAPH"
+\fI\f(BI\s-1GPRINT\s0\fI\f(BI:\fI\fIvname\fI\f(BI:\fI\fIformat\fI\fR
+.IX Subsection "GPRINT:vname:format"
+.PP
This is the same as \f(CW\*(C`PRINT\*(C'\fR, but printed inside the graph.
-.IP "\fB\s-1GPRINT\s0\fR\fB:\fR\fIvname\fR\fB:\fR\fI\s-1CF\s0\fR\fB:\fR\fIformat\fR" 4
-.IX Item "GPRINT:vname:CF:format"
+.PP
+\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
+.IX Subsection "GPRINT:vname:CF:format"
+.PP
\&\fIDeprecated. Use the new form of this command in new scripts.\fR
This is the same as \f(CW\*(C`PRINT\*(C'\fR, but printed inside the graph.
-.IP "\fB\s-1COMMENT\s0\fR\fB:\fR\fItext\fR" 4
-.IX Item "COMMENT:text"
+.PP
+\fI\f(BI\s-1COMMENT\s0\fI\f(BI:\fI\fItext\fI\fR
+.IX Subsection "COMMENT:text"
+.PP
Text is printed literally in the legend section of the graph. Note that in
RRDtool 1.2 you have to escape colons in \s-1COMMENT\s0 text in the same way you
have to escape them in \fB*PRINT\fR commands by writing \fB'\e:'\fR.
-.IP "\fB\s-1VRULE\s0\fR\fB:\fR\fItime\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR][\fB:dashes\fR[\fB=\fR\fIon_s\fR[,\fIoff_s\fR[,\fIon_s\fR,\fIoff_s\fR]...]][\fB:dash\-offset=\fR\fIoffset\fR]]" 4
-.IX Item "VRULE:time#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
+.PP
+\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
+.IX Subsection "VRULE:time#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
+.PP
Draw a vertical line at \fItime\fR. Its color is composed from three
hexadecimal numbers specifying the rgb color components (00 is off, \s-1FF\s0 is
maximum) red, green and blue followed by an optional alpha. Optionally, a legend box and string is
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.
Dashed lines can be drawn using the \fBdashes\fR modifier. See \fB\s-1LINE\s0\fR for more
details.
-.IP "\fB\s-1HRULE\s0\fR\fB:\fR\fIvalue\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR][\fB:dashes\fR[\fB=\fR\fIon_s\fR[,\fIoff_s\fR[,\fIon_s\fR,\fIoff_s\fR]...]][\fB:dash\-offset=\fR\fIoffset\fR]]" 4
-.IX Item "HRULE:value#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
+.PP
+\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
+.IX Subsection "HRULE:value#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
+.PP
Draw a horizontal line at \fIvalue\fR. \s-1HRULE\s0 acts much like \s-1LINE\s0 except that
will have no effect on the scale of the graph. If a \s-1HRULE\s0 is outside the
graphing area it will just not be visible.
-.IP "\fB\s-1LINE\s0\fR[\fIwidth\fR]\fB:\fR\fIvalue\fR[\fB#\fR\fIcolor\fR][\fB:\fR[\fIlegend\fR][\fB:STACK\fR]][\fB:dashes\fR[\fB=\fR\fIon_s\fR[,\fIoff_s\fR[,\fIon_s\fR,\fIoff_s\fR]...]][\fB:dash\-offset=\fR\fIoffset\fR]]" 4
-.IX Item "LINE[width]:value[#color][:[legend][:STACK]][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
+.PP
+\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
+.IX Subsection "LINE[width]:value[#color][:[legend][:STACK]][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]"
+.PP
Draw a line of the specified width onto the graph. \fIwidth\fR can be a
floating point number. If the color is not specified, the drawing is done
\&'invisibly'. This is useful when stacking something else on top of this
@@ -329,7 +340,7 @@ the legend section if specified. The \fBvalue\fR can be generated by \fB\s-1DEF\
\&\fB\s-1VDEF\s0\fR, and \fB\s-1CDEF\s0\fR. If the optional \fB\s-1STACK\s0\fR modifier is used, this line
is stacked on top of the previous element which can be a \fB\s-1LINE\s0\fR or an
\&\fB\s-1AREA\s0\fR.
-.Sp
+.PP
The \fBdashes\fR modifier enables dashed line style. Without any further options
a symmetric dashed line with a segment length of 5 pixels will be drawn. The
dash pattern can be changed if the \fBdashes=\fR parameter is followed by either
provides the length of alternate \fIon_s\fR and \fIoff_s\fR portions of the
stroke. The \fBdash-offset\fR parameter specifies an \fIoffset\fR into the pattern
at which the stroke begins.
-.Sp
+.PP
When you do not specify a color, you cannot specify a legend. Should
you want to use \s-1STACK\s0, use the \*(L"LINEx:<value>::STACK\*(R" form.
-.IP "\fB\s-1AREA\s0\fR\fB:\fR\fIvalue\fR[\fB#\fR\fIcolor\fR][\fB:\fR[\fIlegend\fR][\fB:STACK\fR]]" 4
-.IX Item "AREA:value[#color][:[legend][:STACK]]"
+.PP
+\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
+.IX Subsection "AREA:value[#color][:[legend][:STACK]]"
+.PP
See \fB\s-1LINE\s0\fR, however the area between the x\-axis and the line will
be filled.
-.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
-.IX Item "TICK:vname#rrggbb[aa][:fraction[:legend]]"
+.PP
+\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
+.IX Subsection "TICK:vname#rrggbb[aa][:fraction[:legend]]"
+.PP
Plot a tick mark (a vertical line) for each value of \fIvname\fR that is
non-zero and not *UNKNOWN*. The \fIfraction\fR argument specifies the length of
the tick mark as a fraction of the y\-axis; the default value is 0.1 (10% of
the axis). Note that the color specification is not optional. The \s-1TICK\s0 marks normaly
start at the lower edge of the graphing area. If the fraction is negative they start
at the upper border of the graphing area.
-.IP "\fB\s-1SHIFT\s0\fR\fB:\fR\fIvname\fR\fB:\fR\fIoffset\fR" 4
-.IX Item "SHIFT:vname:offset"
+.PP
+\fI\f(BI\s-1SHIFT\s0\fI\f(BI:\fI\fIvname\fI\f(BI:\fI\fIoffset\fI\fR
+.IX Subsection "SHIFT:vname:offset"
+.PP
Using this command \fBRRDtool\fR will graph the following elements
with the specified offset. For instance, you can specify an
offset of (\ 7*24*60*60\ =\ )\ 604'800\ seconds to \*(L"look back\*(R" one
week. Make sure to tell the viewer of your graph you did this ...
As with the other graphing elements, you can specify a number or
a variable here.
-.IP "\fB\s-1TEXTALIGN\s0\fR\fB:\fR{\fBleft\fR|\fBright\fR|\fBjustified\fR|\fBcenter\fR}" 4
-.IX Item "TEXTALIGN:{left|right|justified|center}"
+.PP
+\fI\f(BI\s-1TEXTALIGN\s0\fI\f(BI:\fI{\f(BIleft\fI|\f(BIright\fI|\f(BIjustified\fI|\f(BIcenter\fI}\fR
+.IX Subsection "TEXTALIGN:{left|right|justified|center}"
+.PP
Labels are placed below the graph. When they overflow to the left, they wrap
to the next line. By default, lines are justified left and right. The
\&\fB\s-1TEXTALIGN\s0\fR function lets you change this default. This is a command and
not an option, so that you can change the default several times in your
argument list.
-.IP "\fB\s-1STACK\s0\fR\fB:\fR\fIvname\fR\fB#\fR\fIcolor\fR[\fB:\fR\fIlegend\fR]" 4
-.IX Item "STACK:vname#color[:legend]"
-\&\fIDeprecated. Use the \f(BI\s-1STACK\s0\fI modifiers on the other commands.\fR
+.PP
+\fI\f(BI\s-1STACK\s0\fI\f(BI:\fI\fIvname\fI\f(BI#\fI\fIcolor\fI[\f(BI:\fI\fIlegend\fI]\fR
+.IX Subsection "STACK:vname#color[:legend]"
+.PP
+\&\fIDeprecated. Use the \f(BI\s-1STACK\s0\fI modifiers on the other commands instead!\fR
.PP
\&\fBSome notes on stacking\fR
.PP