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