Code

Mention that negative time values should be separated by '--' in rrdupdate.pod -...
[rrdtool-all.git] / program / doc / rrdupdate.pod
1 =head1 NAME
3 rrdupdate - Store a new set of values into the RRD
5 =head1 SYNOPSIS
7 B<rrdtool> {B<update> | B<updatev>} I<filename>
8 S<[B<--template>|B<-t> I<ds-name>[B<:>I<ds-name>]...]> [B<-->]
9 S<B<N>|I<timestamp>B<:>I<value>[B<:>I<value>...]>
10 S<I<at-timestamp>B<@>I<value>[B<:>I<value>...]>
11 S<[I<timestamp>B<:>I<value>[B<:>I<value>...] ...]>
13 =head1 DESCRIPTION
15 The B<update> function feeds new data values into an B<RRD>. The data
16 is time aligned (interpolated) according to the properties of the
17 B<RRD> to which the data is written.
19 =over 8
21 =item B<updatev>
23 This alternate version of B<update> takes the same arguments and
24 performs the same function. The I<v> stands for I<verbose>, which
25 describes the output returned. B<updatev> returns a list of any and all
26 consolidated data points (CDPs) written to disk as a result of the
27 invocation of update. The values are indexed by timestamp (time_t),
28 RRA (consolidation function and PDPs per CDP), and data source (name).
29 Note that depending on the arguments of the current and previous call to
30 update, the list may have no entries or a large number of entries.
32 =item I<filename>
34 The name of the B<RRD> you want to update.
36 =item B<--template>|B<-t> I<ds-name>[B<:>I<ds-name>]...
38 By default, the B<update> function expects its data input in the order
39 the data sources are defined in the RRD, excluding any COMPUTE data
40 sources (i.e. if the third data source B<DST> is COMPUTE, the third
41 input value will be mapped to the fourth data source in the B<RRD> and
42 so on). This is not very error resistant, as you might be sending the
43 wrong data into an RRD.
45 The template switch allows you to specify which data sources you are
46 going to update and in which order. If the data sources specified in
47 the template are not available in the RRD file, the update process
48 will abort with an error message.
50 While it appears possible with the template switch to update data sources
51 asynchronously, B<RRDtool> implicitly assigns non-COMPUTE data sources missing
52 from the template the I<*UNKNOWN*> value.
54 Do not specify a value for a COMPUTE B<DST> in the B<update>
55 function. If this is done accidentally (and this can only be done
56 using the template switch), B<RRDtool> will ignore the value specified
57 for the COMPUTE B<DST>.
59 =item B<N>|I<timestamp>B<:>I<value>[B<:>I<value>...]
61 The data used for updating the RRD was acquired at a certain
62 time. This time can either be defined in seconds since 1970-01-01 or
63 by using the letter 'N', in which case the update time is set to be
64 the current time. Negative time values are subtracted from the current
65 time. An AT_STYLE TIME SPECIFICATION (see the I<rrdfetch>
66 documentation) may also be used by delimiting the end of the time
67 specification with the '@' character instead of a ':'. Getting the
68 timing right to the second is especially important when you are
69 working with data-sources of type B<COUNTER>, B<DERIVE> or
70 B<ABSOLUTE>.
72 When using negative time values, options and data have to be separated
73 by two dashes (B<-->), else the time value would be parsed as an option.
74 See below for an example.
76 The remaining elements of the argument are DS updates. The order of
77 this list is the same as the order the data sources were defined in
78 the RRA. If there is no data for a certain data-source, the letter
79 B<U> (e.g., N:0.1:U:1) can be specified.
81 The format of the value acquired from the data source is dependent on
82 the data source type chosen. Normally it will be numeric, but the data
83 acquisition modules may impose their very own parsing of this
84 parameter as long as the colon (B<:>) remains the data source value
85 separator.
87 =back
89 =head1 EXAMPLE
91 C<rrdtool update demo1.rrd N:3.44:3.15:U:23>
93 Update the database file demo1.rrd with 3 known and one I<*UNKNOWN*>
94 value. Use the current time as the update time.
96 C<rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7>
98 Update the database file demo2.rrd which expects data from a single
99 data-source, three times. First with an I<*UNKNOWN*> value then with two
100 regular readings. The update interval seems to be around 300 seconds.
102 C<rrdtool update demo3.rrd -- -5:21 N:42>
104 Update the database file demo3.rrd two times, using five seconds in the
105 past and the current time as the update times.
107 =head1 AUTHOR
109 Tobias Oetiker <tobi@oetiker.ch>