Initial revision
[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<timestamp>B<:>I<value>[B<:>I<value>...] ...]>
13
14 =head1 DESCRIPTION
15
16 The B<update> function feeds new data values into an B<RRD>. The
17 data gets time aligned according to the properties of the B<RRD> to
18 which the data is written.
19
20 =over 8
21
22 =item I<filename>
23
24 The name of the B<RRD> you want to update.
25
26 =item B<--template>|B<-t> I<ds-name>[B<:>I<ds-name>]...
27
28 by default, the update function expects the data input in the order,
29 the data sources are defined in the RRD. This is not very error
30 resistant, as you might be sending the wrong data into a RRD.
31
32 The template switch allows you to specify which data sources you are
33 going to update and in which order. If the data sources specified in
34 the template are not available in the rrd file, the update process
35 will abort with an error message.
36
37 =item B<N>|I<timestamp>B<:>I<value>[B<:>I<value>...]
38
39 The data used for updating the RRD was acquired at a certain time. This
40 time can either be defined in seconds since 1970-01-01. Or by using the
41 letter 'N' the update time is set to be the current time. Negative time
42 values are subtracted from the current time.
43 Getting the timing right to the second is especially
44 important when you are working with data-sources of type B<COUNTER>,
45 B<DERIVE> or B<ABSOLUTE>. 
46
47 The remaining elements of the argument are DS updates. The order of this list is
48 the same as the order the data sources were defined in the rra.
49 If there is no data for a certain data-source, the letter 
50 B<U> (eg. N:0.1:U:1) can be defined.
51
52 The format of the value acquired from the data source is dependent of the
53 data source type chosen. Normally it will be numeric, but the data acquisition
54 modules my impose their very own parsing of this parameter as long as the colon
55 (B<:>) remains the data source value separator.
56
57 =back
58
59 =head1 EXAMPLE
60
61 C<rrdtool update demo1.rrd N:3.44:3.15:U:23>
62
63 Update the database file demo1.rrd with 3 known and one I<*UNKNOWN*>
64 value. Use the current time as the update time.
65
66 C<rrdtool update demo2.rrd 887457267:U 887457521:22 88745790:2.7>
67
68 Update the database file demo2.rrd which expects data from a single
69 data-source, three times. First with an I<*UNKNOWN*> value then with two
70 normal readings. The update interval seems to be around 300 seconds.
71
72 =head1 AUTHOR
73
74 Tobias Oetiker <oetiker@ee.ethz.ch>
75