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