Code

Imported upstream version 1.4~rc2.
[pkg-rrdtool.git] / doc / rrdupdate.1
index db05bd9a0e61b26d12af7d1d003d7d4aad85ab56..07683f51805abdb5bccc837bb354eeb0cbbf2b6b 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDUPDATE 1"
-.TH RRDUPDATE 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDUPDATE 1 "2009-06-02" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdupdate \- Store a new set of values into the RRD
 .SH "SYNOPSIS"
 .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 +155,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 +183,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,9 +204,17 @@ 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
+the \s-1RRA\s0. If there is no data for a certain data\-source, the letter
 \&\fBU\fR (e.g., N:0.1:U:1) can be specified.
 .Sp
 The format of the value acquired from the data source is dependent on
@@ -201,18 +222,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
+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>