Code

Imported upstream version 1.2.26
[pkg-rrdtool.git] / doc / rrdupdate.txt
1 RRDUPDATE(1)                        rrdtool                       RRDUPDATE(1)
5 N\bNA\bAM\bME\bE
6        rrdupdate - Store a new set of values into the RRD
8 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
9        r\brr\brd\bdt\bto\boo\bol\bl {u\bup\bpd\bda\bat\bte\be | u\bup\bpd\bda\bat\bte\bev\bv} _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [-\b--\b-t\bte\bem\bmp\bpl\bla\bat\bte\be|-\b-t\bt _\bd_\bs_\b-_\bn_\ba_\bm_\be[:\b:_\bd_\bs_\b-
10        _\bn_\ba_\bm_\be]...]  N\bN|_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]  _\ba_\bt_\b-_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp@\b@_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]
11        [_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...] ...]
13 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
14        The u\bup\bpd\bda\bat\bte\be function feeds new data values into an R\bRR\bRD\bD. The data is time
15        aligned (interpolated) according to the properties of the R\bRR\bRD\bD to which
16        the data is written.
18        u\bup\bpd\bda\bat\bte\bev\bv This alternate version of u\bup\bpd\bda\bat\bte\be takes the same arguments and
19                performs the same function. The _\bv stands for _\bv_\be_\br_\bb_\bo_\bs_\be, which
20                describes the output returned. u\bup\bpd\bda\bat\bte\bev\bv returns a list of any
21                and all consolidated data points (CDPs) written to disk as a
22                result of the invocation of update. The values are indexed by
23                timestamp (time_t), RRA (consolidation function and PDPs per
24                CDP), and data source (name).  Note that depending on the argu-
25                ments of the current and previous call to update, the list may
26                have no entries or a large number of entries.
28        _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
29                The name of the R\bRR\bRD\bD you want to update.
31        -\b--\b-t\bte\bem\bmp\bpl\bla\bat\bte\be|-\b-t\bt _\bd_\bs_\b-_\bn_\ba_\bm_\be[:\b:_\bd_\bs_\b-_\bn_\ba_\bm_\be]...
32                By default, the u\bup\bpd\bda\bat\bte\be function expects its data input in the
33                order the data sources are defined in the RRD, excluding any
34                COMPUTE data sources (i.e. if the third data source D\bDS\bST\bT is COM-
35                PUTE, the third input value will be mapped to the fourth data
36                source in the R\bRR\bRD\bD and so on). This is not very error resistant,
37                as you might be sending the wrong data into an RRD.
39                The template switch allows you to specify which data sources
40                you are going to update and in which order. If the data sources
41                specified in the template are not available in the RRD file,
42                the update process will abort with an error message.
44                While it appears possible with the template switch to update
45                data sources asynchronously, R\bRR\bRD\bDt\bto\boo\bol\bl implicitly assigns non-
46                COMPUTE data sources missing from the template the _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*
47                value.
49                Do not specify a value for a COMPUTE D\bDS\bST\bT in the u\bup\bpd\bda\bat\bte\be func-
50                tion. If this is done accidentally (and this can only be done
51                using the template switch), R\bRR\bRD\bDt\bto\boo\bol\bl will ignore the value spec-
52                ified for the COMPUTE D\bDS\bST\bT.
54        N\bN|_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]
55                The data used for updating the RRD was acquired at a certain
56                time. This time can either be defined in seconds since
57                1970-01-01 or by using the letter 'N', in which case the update
58                time is set to be the current time. Negative time values are
59                subtracted from the current time. An AT_STYLE TIME SPECIFICA-
60                TION (see the _\br_\br_\bd_\bf_\be_\bt_\bc_\bh documentation) may also be used by
61                delimiting the end of the time specification with the '@' char-
62                acter instead of a ':'. Getting the timing right to the second
63                is especially important when you are working with data-sources
64                of type C\bCO\bOU\bUN\bNT\bTE\bER\bR, D\bDE\bER\bRI\bIV\bVE\bE or A\bAB\bBS\bSO\bOL\bLU\bUT\bTE\bE.
66                The remaining elements of the argument are DS updates. The
67                order of this list is the same as the order the data sources
68                were defined in the RRA. If there is no data for a certain
69                data-source, the letter U\bU (e.g., N:0.1:U:1) can be specified.
71                The format of the value acquired from the data source is depen-
72                dent on the data source type chosen. Normally it will be
73                numeric, but the data acquisition modules may impose their very
74                own parsing of this parameter as long as the colon (:\b:) remains
75                the data source value separator.
77 E\bEX\bXA\bAM\bMP\bPL\bLE\bE
78        "rrdtool update demo1.rrd N:3.44:3.15:U:23"
80        Update the database file demo1.rrd with 3 known and one _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*
81        value. Use the current time as the update time.
83        "rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7"
85        Update the database file demo2.rrd which expects data from a single
86        data-source, three times. First with an _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* value then with two
87        regular readings. The update interval seems to be around 300 seconds.
89 A\bAU\bUT\bTH\bHO\bOR\bR
90        Tobias Oetiker <tobi@oetiker.ch>
94 1.2.26                            2007-11-20                      RRDUPDATE(1)