Code

Imported upstream SVN snapshot 1.4~rc2+20090928.
[pkg-rrdtool.git] / doc / rrdupdate.1
index db05bd9a0e61b26d12af7d1d003d7d4aad85ab56..5ae016c0538063ed6e0a2a587b1230f74a1eca04 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.08)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\" ========================================================================
 .\"
 .IX Title "RRDUPDATE 1"
-.TH RRDUPDATE 1 "2008-03-15" "1.3.8" "rrdtool"
+.TH RRDUPDATE 1 "2009-06-09" "1.3.999" "rrdtool"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -135,6 +135,7 @@ rrdupdate \- Store a new set of values into the RRD
 .IX Header "SYNOPSIS"
 \&\fBrrdtool\fR {\fBupdate\fR | \fBupdatev\fR} \fIfilename\fR
 [\fB\-\-template\fR|\fB\-t\fR\ \fIds-name\fR[\fB:\fR\fIds-name\fR]...]
+[\fB\-\-daemon\fR\ \fIaddress\fR] [\fB\-\-\fR]
 \&\fBN\fR|\fItimestamp\fR\fB:\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]
 \&\fIat-timestamp\fR\fB@\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]
 [\fItimestamp\fR\fB:\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]\ ...]
@@ -153,6 +154,9 @@ invocation of update. The values are indexed by timestamp (time_t),
 \&\s-1RRA\s0 (consolidation function and PDPs per \s-1CDP\s0), and data source (name).
 Note that depending on the arguments of the current and previous call to
 update, the list may have no entries or a large number of entries.
+.Sp
+Since \fBupdatev\fR requires direct disk access, the \fB\-\-daemon\fR option cannot be
+used with this command.
 .IP "\fIfilename\fR" 8
 .IX Item "filename"
 The name of the \fB\s-1RRD\s0\fR you want to update.
@@ -178,6 +182,14 @@ Do not specify a value for a \s-1COMPUTE\s0 \fB\s-1DST\s0\fR in the \fBupdate\fR
 function. If this is done accidentally (and this can only be done
 using the template switch), \fBRRDtool\fR will ignore the value specified
 for the \s-1COMPUTE\s0 \fB\s-1DST\s0\fR.
+.IP "\fB\-\-daemon\fR \fIaddress\fR" 8
+.IX Item "--daemon address"
+If given, \fBRRDTool\fR will try to connect to the caching daemon rrdcached
+at \fIaddress\fR and will fail if the connection cannot be established. If the
+connection is successfully established the values will be sent to the daemon
+instead of accessing the files directly.
+.Sp
+For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
 .IP "\fBN\fR|\fItimestamp\fR\fB:\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]" 8
 .IX Item "N|timestamp:value[:value...]"
 The data used for updating the \s-1RRD\s0 was acquired at a certain
@@ -191,6 +203,14 @@ timing right to the second is especially important when you are
 working with data-sources of type \fB\s-1COUNTER\s0\fR, \fB\s-1DERIVE\s0\fR or
 \&\fB\s-1ABSOLUTE\s0\fR.
 .Sp
+When using negative time values, options and data have to be separated
+by two dashes (\fB\-\-\fR), else the time value would be parsed as an option.
+See below for an example.
+.Sp
+When using negative time values, options and data have to be separated
+by two dashes (\fB\-\-\fR), else the time value would be parsed as an option.
+See below for an example.
+.Sp
 The remaining elements of the argument are \s-1DS\s0 updates. The order of
 this list is the same as the order the data sources were defined in
 the \s-1RRA\s0. If there is no data for a certain data-source, the letter
@@ -201,18 +221,51 @@ the data source type chosen. Normally it will be numeric, but the data
 acquisition modules may impose their very own parsing of this
 parameter as long as the colon (\fB:\fR) remains the data source value
 separator.
-.SH "EXAMPLE"
-.IX Header "EXAMPLE"
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ update\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
+.SH "EXAMPLES"
+.IX Header "EXAMPLES"
+.IP "\(bu" 4
 \&\f(CW\*(C`rrdtool update demo1.rrd N:3.44:3.15:U:23\*(C'\fR
-.PP
+.Sp
 Update the database file demo1.rrd with 3 known and one \fI*UNKNOWN*\fR
 value. Use the current time as the update time.
-.PP
+.IP "\(bu" 4
 \&\f(CW\*(C`rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7\*(C'\fR
-.PP
+.Sp
 Update the database file demo2.rrd which expects data from a single
 data-source, three times. First with an \fI*UNKNOWN*\fR value then with two
 regular readings. The update interval seems to be around 300 seconds.
-.SH "AUTHOR"
-.IX Header "AUTHOR"
-Tobias Oetiker <tobi@oetiker.ch>
+.IP "\(bu" 4
+\&\f(CW\*(C`rrdtool update demo3.rrd \-\- \-5:21 N:42\*(C'\fR
+.Sp
+Update the database file demo3.rrd two times, using five seconds in the
+past and the current time as the update times.
+.IP "\(bu" 4
+\&\f(CW\*(C`rrdtool update \-\-cache /var/lib/rrd/demo3.rrd N:42\*(C'\fR
+.Sp
+Update the file \f(CW\*(C`/var/lib/rrd/demo3.rrd\*(C'\fR with a single data source, using the
+current time. If the caching daemon cannot be reached, do \fBnot\fR fall back to
+direct file access.
+.IP "\(bu" 4
+\&\f(CW\*(C`rrdtool update \-\-daemon unix:/tmp/rrdd.sock demo4.rrd N:23\*(C'\fR
+.Sp
+Use the \s-1UNIX\s0 domain socket \f(CW\*(C`/tmp/rrdd.sock\*(C'\fR to contact the caching daemon. If
+the caching daemon is not available, update the file \f(CW\*(C`demo4.rrd\*(C'\fR directly.
+\&\fB\s-1WARNING:\s0\fR Since a relative path is specified, the following disturbing effect
+may occur: If the daemon is available, the file relative to the working
+directory \fBof the daemon\fR is used. If the daemon is not available, the file
+relative to the current working directory of the invoking process is used.
+\&\fBThis may update two different files depending on whether the daemon could be
+reached or not.\fR Don't do relative paths, kids!
+.SH "AUTHORS"
+.IX Header "AUTHORS"
+Tobias Oetiker <tobi@oetiker.ch>,
+Florian Forster <octo\ at\ verplant.org>