124
124
.\" ========================================================================
126
126
.IX Title "RRDUPDATE 1"
127
.TH RRDUPDATE 1 "2008-03-15" "1.3.8" "rrdtool"
127
.TH RRDUPDATE 1 "2009-06-02" "1.4.3" "rrdtool"
128
128
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
129
129
.\" way too many mistakes in technical documents.
135
135
.IX Header "SYNOPSIS"
136
136
\&\fBrrdtool\fR {\fBupdate\fR | \fBupdatev\fR} \fIfilename\fR
137
137
[\fB\-\-template\fR|\fB\-t\fR\ \fIds-name\fR[\fB:\fR\fIds-name\fR]...]
138
[\fB\-\-daemon\fR\ \fIaddress\fR] [\fB\-\-\fR]
138
139
\&\fBN\fR|\fItimestamp\fR\fB:\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]
139
140
\&\fIat-timestamp\fR\fB@\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]
140
141
[\fItimestamp\fR\fB:\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]\ ...]
153
154
\&\s-1RRA\s0 (consolidation function and PDPs per \s-1CDP\s0), and data source (name).
154
155
Note that depending on the arguments of the current and previous call to
155
156
update, the list may have no entries or a large number of entries.
158
Since \fBupdatev\fR requires direct disk access, the \fB\-\-daemon\fR option cannot be
159
used with this command.
156
160
.IP "\fIfilename\fR" 8
157
161
.IX Item "filename"
158
162
The name of the \fB\s-1RRD\s0\fR you want to update.
178
182
function. If this is done accidentally (and this can only be done
179
183
using the template switch), \fBRRDtool\fR will ignore the value specified
180
184
for the \s-1COMPUTE\s0 \fB\s-1DST\s0\fR.
185
.IP "\fB\-\-daemon\fR \fIaddress\fR" 8
186
.IX Item "--daemon address"
187
If given, \fBRRDTool\fR will try to connect to the caching daemon rrdcached
188
at \fIaddress\fR and will fail if the connection cannot be established. If the
189
connection is successfully established the values will be sent to the daemon
190
instead of accessing the files directly.
192
For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
181
193
.IP "\fBN\fR|\fItimestamp\fR\fB:\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]" 8
182
194
.IX Item "N|timestamp:value[:value...]"
183
195
The data used for updating the \s-1RRD\s0 was acquired at a certain
191
203
working with data-sources of type \fB\s-1COUNTER\s0\fR, \fB\s-1DERIVE\s0\fR or
192
204
\&\fB\s-1ABSOLUTE\s0\fR.
206
When using negative time values, options and data have to be separated
207
by two dashes (\fB\-\-\fR), else the time value would be parsed as an option.
208
See below for an example.
210
When using negative time values, options and data have to be separated
211
by two dashes (\fB\-\-\fR), else the time value would be parsed as an option.
212
See below for an example.
194
214
The remaining elements of the argument are \s-1DS\s0 updates. The order of
195
215
this list is the same as the order the data sources were defined in
196
216
the \s-1RRA\s0. If there is no data for a certain data-source, the letter
201
221
acquisition modules may impose their very own parsing of this
202
222
parameter as long as the colon (\fB:\fR) remains the data source value
224
.SH "ENVIRONMENT VARIABLES"
225
.IX Header "ENVIRONMENT VARIABLES"
226
The following environment variables may be used to change the behavior of
227
\&\f(CW\*(C`rrdtool\ update\*(C'\fR:
228
.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
229
.IX Item "RRDCACHED_ADDRESS"
230
If this environment variable is set it will have the same effect as specifying
231
the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
232
line argument takes precedence.
234
.IX Header "EXAMPLES"
206
236
\&\f(CW\*(C`rrdtool update demo1.rrd N:3.44:3.15:U:23\*(C'\fR
208
238
Update the database file demo1.rrd with 3 known and one \fI*UNKNOWN*\fR
209
239
value. Use the current time as the update time.
211
241
\&\f(CW\*(C`rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7\*(C'\fR
213
243
Update the database file demo2.rrd which expects data from a single
214
244
data-source, three times. First with an \fI*UNKNOWN*\fR value then with two
215
245
regular readings. The update interval seems to be around 300 seconds.
218
Tobias Oetiker <tobi@oetiker.ch>
247
\&\f(CW\*(C`rrdtool update demo3.rrd \-\- \-5:21 N:42\*(C'\fR
249
Update the database file demo3.rrd two times, using five seconds in the
250
past and the current time as the update times.
252
\&\f(CW\*(C`rrdtool update \-\-cache /var/lib/rrd/demo3.rrd N:42\*(C'\fR
254
Update the file \f(CW\*(C`/var/lib/rrd/demo3.rrd\*(C'\fR with a single data source, using the
255
current time. If the caching daemon cannot be reached, do \fBnot\fR fall back to
258
\&\f(CW\*(C`rrdtool update \-\-daemon unix:/tmp/rrdd.sock demo4.rrd N:23\*(C'\fR
260
Use the \s-1UNIX\s0 domain socket \f(CW\*(C`/tmp/rrdd.sock\*(C'\fR to contact the caching daemon. If
261
the caching daemon is not available, update the file \f(CW\*(C`demo4.rrd\*(C'\fR directly.
262
\&\fB\s-1WARNING:\s0\fR Since a relative path is specified, the following disturbing effect
263
may occur: If the daemon is available, the file relative to the working
264
directory \fBof the daemon\fR is used. If the daemon is not available, the file
265
relative to the current working directory of the invoking process is used.
266
\&\fBThis may update two different files depending on whether the daemon could be
267
reached or not.\fR Don't do relative paths, kids!
270
Tobias Oetiker <tobi@oetiker.ch>,
271
Florian Forster <octo\ at\ verplant.org>