OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / user / rrdtool / doc / rrdgraph_data.1
1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
21 ..
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
25 ..
26 .\" Set up some character translations and predefined strings.  \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote.  | will give a
29 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
30 .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
32 .tr \(*W-|\(bv\*(Tr
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
55 .if \nF \{\
56 .    de IX
57 .    tm Index:\\$1\t\\n%\t"\\$2"
58 ..
59 .    nr % 0
60 .    rr F
61 .\}
62 .\"
63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
65 .hy 0
66 .if n .na
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "RRDGRAPH_DATA 1"
132 .TH RRDGRAPH_DATA 1 "2005-06-17" "1.2.10" "rrdtool"
133 .SH "NAME"
134 rrdgraph_data \- preparing data for graphing in rrdtool graph
135 .SH "SYNOPSIS"
136 .IX Header "SYNOPSIS"
137 \&\fB\s-1DEF:\s0\fR\fI<vname>\fR=\fI<rrdfile>\fR:\fI<ds-name>\fR:\fI<\s-1CF\s0>\fR[:step=\fI<step>\fR][:start=\fI<time>\fR][:end=\fI<time>\fR][:reduce=\fI<\f(BI\s-1CF\s0\fI>\fR]
138 .PP
139 \&\fB\s-1VDEF\s0\fR:\fIvname\fR=\fI\s-1RPN\s0 expression\fR
140 .PP
141 \&\fB\s-1CDEF\s0\fR:\fIvname\fR=\fI\s-1RPN\s0 expression\fR
142 .SH "DESCRIPTION"
143 .IX Header "DESCRIPTION"
144 These three instructions extract data values out of the \fB\s-1RRD\s0\fR files,
145 optionally altering them (think, for example, of a bytes to bits
146 conversion). If so desired, you can also define variables containing
147 useful information such as maximum, minimum etcetera. Two of the
148 instructions use a language called \fB\s-1RPN\s0\fR which is described in its
149 own manual page.
150 .PP
151 Variable names (\fIvname\fR) must be made up strings of the following characters
152 \&\f(CW\*(C`A\-Z, a\-z, 0\-9, \-,_\*(C'\fR and a maximum length of 255 characters.
153 .SH "DEF"
154 .IX Header "DEF"
155 \&\fB\s-1DEF:\s0\fR\fI<vname>\fR=\fI<rrdfile>\fR:\fI<ds-name>\fR:\fI<\s-1CF\s0>\fR[:step=\fI<step>\fR][:start=\fI<time>\fR][:end=\fI<time>\fR][:reduce=\fI<\f(BI\s-1CF\s0\fI>\fR]
156 .PP
157 This command fetches data from an \fB\s-1RRD\s0\fR file.  The virtual name
158 \&\fIvname\fR can then be used throughout the rest of the script. By
159 default, an \fB\s-1RRA\s0\fR which contains the correct consolidated data
160 at an appropriate resolution will be chosen.  The resolution can
161 be overridden with the \-\-step option.
162 The resolution can again be overridden by specifying the \fBstep size\fR.
163 The time span of this data is the same as for the graph by default,
164 you can override this by specifying \fBstart and end\fR.  Remember to
165 escape colons in the time specification!
166 .PP
167 If the resolution of the data is higher than the resolution of the
168 graph, the data will be further consolidated. This may result in
169 a graph that spans slightly more time than requested.
170 Ideally each point in the graph should correspond with one \fB\s-1CDP\s0\fR
171 from an \fB\s-1RRA\s0\fR.  For instance, if your \fB\s-1RRD\s0\fR has an \fB\s-1RRA\s0\fR with
172 a resolution of 1800 seconds per \fB\s-1CDP\s0\fR, you should create an
173 image with width 400 and time span 400*1800 seconds (use appropriate
174 start and end times, such as \f(CW\*(C`\-\-start end\-8days8hours\*(C'\fR).
175 .PP
176 If consolidation needs to be done, the \fB\s-1CF\s0\fR of the \fB\s-1RRA\s0\fR specified in the
177 \&\fB\s-1DEF\s0\fR itself will be used to reduce the data density. This behaviour can
178 be changed using \f(CW\*(C`:reduce=\f(CI<\f(CB\s-1CF\s0\f(CI>\f(CW\*(C'\fR.  This optional parameter
179 specifies the \fB\s-1CF\s0\fR to use during the data reduction phase.
180 .PP
181 Example:
182 .PP
183 .Vb 4
184 \&        DEF:ds0=router.rrd:ds0:AVERAGE
185 \&        DEF:ds0weekly=router.rrd:ds0:AVERAGE:step=7200
186 \&        DEF:ds0weekly=router.rrd:ds0:AVERAGE:start=end-1h
187 \&        DEF:ds0weekly=router.rrd:ds0:AVERAGE:start=11\e:00:end=start+1h
188 .Ve
189 .SH "VDEF"
190 .IX Header "VDEF"
191 \&\fB\s-1VDEF\s0\fR:\fIvname\fR=\fI\s-1RPN\s0 expression\fR
192 .PP
193 This command returns a value and/or a time according to the \fB\s-1RPN\s0\fR
194 statements used. The resulting \fIvname\fR will, depending on the
195 functions used, have a value and a time component.  When you use
196 this \fIvname\fR in another \fB\s-1RPN\s0\fR expression, you are effectively
197 inserting its value just as if you had put a number at that place.
198 The variable can also be used in the various graph and print
199 elements.
200 .PP
201 Example: \f(CW\*(C`VDEF:avg=mydata,AVERAGE\*(C'\fR
202 .SH "CDEF"
203 .IX Header "CDEF"
204 \&\fB\s-1CDEF\s0\fR:\fIvname\fR=\fI\s-1RPN\s0 expression\fR
205 .PP
206 This command creates a new set of data points (in memory only, not
207 in the \fB\s-1RRD\s0\fR file) out of one or more other data series. The \fB\s-1RPN\s0\fR
208 instructions are used to evaluate a mathematical function on each
209 data point. The resulting \fIvname\fR can then be used further on in
210 the script, just as if it were generated by a \fB\s-1DEF\s0\fR instruction.
211 .PP
212 Example: \f(CW\*(C`CDEF:mydatabits=mydata,8,*\*(C'\fR
213 .SH "SEE ALSO"
214 .IX Header "SEE ALSO"
215 rrdgraph gives an overview of how \fBrrdtool graph\fR works.
216 rrdgraph_data describes \fB\s-1DEF\s0\fR,\fB\s-1CDEF\s0\fR and \fB\s-1VDEF\s0\fR in detail.
217 rrdgraph_rpn describes the \fB\s-1RPN\s0\fR language used in the \fB?DEF\fR statements.
218 rrdgraph_graph page describes all of the graph and print functions.
219 .PP
220 Make sure to read rrdgraph_examples for tips&tricks.
221 .SH "AUTHOR"
222 .IX Header "AUTHOR"
223 Program by Tobias Oetiker <oetiker@ee.ethz.ch>
224 .PP
225 This manual page by Alex van den Bogaerdt <alex@ergens.op.het.net>