remove extra whitespace at the end of lines
[rrdtool.git] / doc / rrdupdate.pod
1 =head1 NAME
2
3 rrdupdate - Store a new set of values into the RRD
4
5 =head1 SYNOPSIS
6
7 B<rrdtool> {B<update> | B<updatev>} I<filename>
8 S<[B<--template>|B<-t> I<ds-name>[B<:>I<ds-name>]...]>
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>...] ...]>
12
13 =head1 DESCRIPTION
14
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.
18
19 =over 8
20
21 =item B<updatev>
22
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.
31
32 =item I<filename>
33
34 The name of the B<RRD> you want to update.
35
36 =item B<--template>|B<-t> I<ds-name>[B<:>I<ds-name>]...
37
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.
44
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.
49
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.
53
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>.
58
59 =item B<N>|I<timestamp>B<:>I<value>[B<:>I<value>...]
60
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>.
71
72 The remaining elements of the argument are DS updates. The order of
73 this list is the same as the order the data sources were defined in
74 the RRA. If there is no data for a certain data-source, the letter
75 B<U> (e.g., N:0.1:U:1) can be specified.
76
77 The format of the value acquired from the data source is dependent on
78 the data source type chosen. Normally it will be numeric, but the data
79 acquisition modules may impose their very own parsing of this
80 parameter as long as the colon (B<:>) remains the data source value
81 separator.
82
83 =back
84
85 =head1 EXAMPLE
86
87 C<rrdtool update demo1.rrd N:3.44:3.15:U:23>
88
89 Update the database file demo1.rrd with 3 known and one I<*UNKNOWN*>
90 value. Use the current time as the update time.
91
92 C<rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7>
93
94 Update the database file demo2.rrd which expects data from a single
95 data-source, three times. First with an I<*UNKNOWN*> value then with two
96 regular readings. The update interval seems to be around 300 seconds.
97
98 =head1 AUTHOR
99
100 Tobias Oetiker <oetiker@ee.ethz.ch>
101