Code

Imported upstream version 1.4.8
[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]...]  [-\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs] [-\b--\b-] 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-
11        _\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp@\b@_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]  [_\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
25                arguments of the current and previous call to update, the list
26                may have no entries or a large number of entries.
28                Since u\bup\bpd\bda\bat\bte\bev\bv requires direct disk access, the -\b--\b-d\bda\bae\bem\bmo\bon\bn option
29                cannot be used with this command.
31        _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
32                The name of the R\bRR\bRD\bD you want to update.
34        -\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]...
35                By default, the u\bup\bpd\bda\bat\bte\be function expects its data input in the
36                order the data sources are defined in the RRD, excluding any
37                COMPUTE data sources (i.e. if the third data source D\bDS\bST\bT is
38                COMPUTE, the third input value will be mapped to the fourth
39                data source in the R\bRR\bRD\bD and so on). This is not very error
40                resistant, as you might be sending the wrong data into an RRD.
42                The template switch allows you to specify which data sources
43                you are going to update and in which order. If the data sources
44                specified in the template are not available in the RRD file,
45                the update process will abort with an error message.
47                While it appears possible with the template switch to update
48                data sources asynchronously, R\bRR\bRD\bDt\bto\boo\bol\bl implicitly assigns non-
49                COMPUTE data sources missing from the template the _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*
50                value.
52                Do not specify a value for a COMPUTE D\bDS\bST\bT in the u\bup\bpd\bda\bat\bte\be
53                function. If this is done accidentally (and this can only be
54                done using the template switch), R\bRR\bRD\bDt\bto\boo\bol\bl will ignore the value
55                specified for the COMPUTE D\bDS\bST\bT.
57        -\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs
58                If given, R\bRR\bRD\bDT\bTo\boo\bol\bl will try to connect to the caching daemon
59                rrdcached at _\ba_\bd_\bd_\br_\be_\bs_\bs and will fail if the connection cannot be
60                established. If the connection is successfully established the
61                values will be sent to the daemon instead of accessing the
62                files directly.
64                For a list of accepted formats, see the -\b-l\bl option in the
65                rrdcached manual.
67        N\bN|_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]
68                The data used for updating the RRD was acquired at a certain
69                time. This time can either be defined in seconds since
70                1970-01-01 or by using the letter 'N', in which case the update
71                time is set to be the current time. Negative time values are
72                subtracted from the current time. An AT_STYLE TIME
73                SPECIFICATION (see the _\br_\br_\bd_\bf_\be_\bt_\bc_\bh documentation) may also be used
74                by delimiting the end of the time specification with the '@'
75                character instead of a ':'. Getting the timing right to the
76                second is especially important when you are working with data-
77                sources 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.
79                When using negative time values, options and data have to be
80                separated by two dashes (-\b--\b-), else the time value would be
81                parsed as an option.  See below for an example.
83                When using negative time values, options and data have to be
84                separated by two dashes (-\b--\b-), else the time value would be
85                parsed as an option.  See below for an example.
87                The remaining elements of the argument are DS updates. The
88                order of this list is the same as the order the data sources
89                were defined in the RRA. If there is no data for a certain
90                data-source, the letter U\bU (e.g., N:0.1:U:1) can be specified.
92                The format of the value acquired from the data source is
93                dependent on the data source type chosen. Normally it will be
94                numeric, but the data acquisition modules may impose their very
95                own parsing of this parameter as long as the colon (:\b:) remains
96                the data source value separator.
98 E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
99        The following environment variables may be used to change the behavior
100        of "rrdtool update":
102        R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
103            If this environment variable is set it will have the same effect as
104            specifying the "--daemon" option on the command line. If both are
105            present, the command line argument takes precedence.
107 E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
108        ·   "rrdtool update demo1.rrd N:3.44:3.15:U:23"
110            Update the database file demo1.rrd with 3 known and one _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*
111            value. Use the current time as the update time.
113        ·   "rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7"
115            Update the database file demo2.rrd which expects data from a single
116            data-source, three times. First with an _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* value then with
117            two regular readings. The update interval seems to be around 300
118            seconds.
120        ·   "rrdtool update demo3.rrd -- -5:21 N:42"
122            Update the database file demo3.rrd two times, using five seconds in
123            the past and the current time as the update times.
125        ·   "rrdtool update --cache /var/lib/rrd/demo3.rrd N:42"
127            Update the file "/var/lib/rrd/demo3.rrd" with a single data source,
128            using the current time. If the caching daemon cannot be reached, do
129            n\bno\bot\bt fall back to direct file access.
131        ·   "rrdtool update --daemon unix:/tmp/rrdd.sock demo4.rrd N:23"
133            Use the UNIX domain socket "/tmp/rrdd.sock" to contact the caching
134            daemon. If the caching daemon is not available, update the file
135            "demo4.rrd" directly.  W\bWA\bAR\bRN\bNI\bIN\bNG\bG:\b: Since a relative path is specified,
136            the following disturbing effect may occur: If the daemon is
137            available, the file relative to the working directory o\bof\bf t\bth\bhe\be d\bda\bae\bem\bmo\bon\bn
138            is used. If the daemon is not available, the file relative to the
139            current working directory of the invoking process is used.  T\bTh\bhi\bis\bs
140            m\bma\bay\by u\bup\bpd\bda\bat\bte\be t\btw\bwo\bo d\bdi\bif\bff\bfe\ber\bre\ben\bnt\bt f\bfi\bil\ble\bes\bs d\bde\bep\bpe\ben\bnd\bdi\bin\bng\bg o\bon\bn w\bwh\bhe\bet\bth\bhe\ber\br t\bth\bhe\be d\bda\bae\bem\bmo\bon\bn
141            c\bco\bou\bul\bld\bd b\bbe\be r\bre\bea\bac\bch\bhe\bed\bd o\bor\br n\bno\bot\bt.\b. Don't do relative paths, kids!
143 A\bAU\bUT\bTH\bHO\bOR\bRS\bS
144        Tobias Oetiker <tobi@oetiker.ch>, Florian Forster
145        <octo at verplant.org>
149 1.4.8                             2013-05-23                      RRDUPDATE(1)