Support for COMPUTE data sources (CDEF data sources). Removes the RPN
[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> 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 I<filename>
24
25 The name of the B<RRD> you want to update.
26
27 =item B<--template>|B<-t> I<ds-name>[B<:>I<ds-name>]...
28
29 by default, the B<update> function expects the data input in the order
30 the data sources are defined in the RRD, excluding any COMPUTE data sources 
31 (i.e. if the third data source B<DST> is COMPUTE, the third input value
32 will be mapped to the fourth data source in the B<RRD>). This is not very
33 error resistant, as you might be sending the wrong data into a RRD.
34
35 The template switch allows you to specify which data sources you are
36 going to update and in which order. If the data sources specified in
37 the template are not available in the rrd file, the update process
38 will abort with an error message.
39
40 While it appears possible with the template switch to update data sources
41 asynchronously, B<RRDtool> implicitly assigns non-COMPUTE data sources missing
42 from the template the I<*UNKNOWN*> value. 
43
44 Do not specify a value for a COMPUTE B<DST> in the B<update> function. If
45 this is done accidently (and this can only be done using the template switch),
46 B<RRDtool> will ignore the value specified for the COMPUTE B<DST>.
47
48 =item B<N>|I<timestamp>B<:>I<value>[B<:>I<value>...]
49
50 The data used for updating the RRD was acquired at a certain time. This
51 time can either be defined in seconds since 1970-01-01. Or by using the
52 letter 'N' the update time is set to be the current time. Negative time
53 values are subtracted from the current time.
54 An AT_STYLE TIME SPECIFICATION (see the I<rrdfetch> documentation) may
55 also be used by delimiting the end of the time specification with the '@' character
56 instead of a ':'.
57 Getting the timing right to the second is especially
58 important when you are working with data-sources of type B<COUNTER>,
59 B<DERIVE> or B<ABSOLUTE>. 
60
61 The remaining elements of the argument are DS updates. The order of this list is
62 the same as the order the data sources were defined in the rra.
63 If there is no data for a certain data-source, the letter 
64 B<U> (eg. N:0.1:U:1) can be defined.
65
66 The format of the value acquired from the data source is dependent of the
67 data source type chosen. Normally it will be numeric, but the data acquisition
68 modules my impose their very own parsing of this parameter as long as the colon
69 (B<:>) remains the data source value separator.
70
71 =back
72
73 =head1 EXAMPLE
74
75 C<rrdtool update demo1.rrd N:3.44:3.15:U:23>
76
77 Update the database file demo1.rrd with 3 known and one I<*UNKNOWN*>
78 value. Use the current time as the update time.
79
80 C<rrdtool update demo2.rrd 887457267:U 887457521:22 88745790:2.7>
81
82 Update the database file demo2.rrd which expects data from a single
83 data-source, three times. First with an I<*UNKNOWN*> value then with two
84 normal readings. The update interval seems to be around 300 seconds.
85
86 =head1 AUTHOR
87
88 Tobias Oetiker <oetiker@ee.ethz.ch>
89