Code

Imported upstream version 1.4~rc2.
[pkg-rrdtool.git] / doc / rrdupdate.txt
index 99ac40596770b182f232df7235fee4ab244d1752..af77a25f52ba33444b847e806760434e9ff032e0 100644 (file)
@@ -7,8 +7,8 @@ N\bNA\bAM\bME\bE
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
        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-
-       _\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...]
-       [_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...] ...]
+       _\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-
+       _\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...] ...]
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        The u\bup\bpd\bda\bat\bte\be function feeds new data values into an R\bRR\bRD\bD. The data is time
@@ -25,6 +25,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                ments of the current and previous call to update, the list may
                have no entries or a large number of entries.
 
+               Since u\bup\bpd\bda\bat\bte\bev\bv requires direct disk access, the -\b--\b-d\bda\bae\bem\bmo\bon\bn option
+               cannot be used with this command.
+
        _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
                The name of the R\bRR\bRD\bD you want to update.
 
@@ -51,6 +54,16 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                using the template switch), R\bRR\bRD\bDt\bto\boo\bol\bl will ignore the value spec-
                ified for the COMPUTE D\bDS\bST\bT.
 
+       -\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs
+               If given, R\bRR\bRD\bDT\bTo\boo\bol\bl will try to connect to the caching daemon
+               rrdcached at _\ba_\bd_\bd_\br_\be_\bs_\bs and will fail if the connection cannot be
+               established. If the connection is successfully established the
+               values will be sent to the daemon instead of accessing the
+               files directly.
+
+               For a list of accepted formats, see the -\b-l\bl option in the rrd-
+               cached manual.
+
        N\bN|_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]
                The data used for updating the RRD was acquired at a certain
                time. This time can either be defined in seconds since
@@ -63,6 +76,14 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                is especially important when you are working with data-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.
 
+               When using negative time values, options and data have to be
+               separated by two dashes (-\b--\b-), else the time value would be
+               parsed as an option.  See below for an example.
+
+               When using negative time values, options and data have to be
+               separated by two dashes (-\b--\b-), else the time value would be
+               parsed as an option.  See below for an example.
+
                The remaining elements of the argument are DS updates. The
                order of this list is the same as the order the data sources
                were defined in the RRA. If there is no data for a certain
@@ -74,21 +95,55 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                own parsing of this parameter as long as the colon (:\b:) remains
                the data source value separator.
 
-E\bEX\bXA\bAM\bMP\bPL\bLE\bE
-       "rrdtool update demo1.rrd N:3.44:3.15:U:23"
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+       The following environment variables may be used to change the behavior
+       of "rrdtool update":
+
+       R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
+           If this environment variable is set it will have the same effect as
+           specifying the "--daemon" option on the command line. If both are
+           present, the command line argument takes precedence.
+
+E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
+       ·   "rrdtool update demo1.rrd N:3.44:3.15:U:23"
+
+           Update the database file demo1.rrd with 3 known and one _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*
+           value. Use the current time as the update time.
+
+       ·   "rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7"
+
+           Update the database file demo2.rrd which expects data from a single
+           data-source, three times. First with an _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* value then with
+           two regular readings. The update interval seems to be around 300
+           seconds.
+
+       ·   "rrdtool update demo3.rrd -- -5:21 N:42"
+
+           Update the database file demo3.rrd two times, using five seconds in
+           the past and the current time as the update times.
+
+       ·   "rrdtool update --cache /var/lib/rrd/demo3.rrd N:42"
 
-       Update the database file demo1.rrd with 3 known and one _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*
-       value. Use the current time as the update time.
+           Update the file "/var/lib/rrd/demo3.rrd" with a single data source,
+           using the current time. If the caching daemon cannot be reached, do
+           n\bno\bot\bt fall back to direct file access.
 
-       "rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7"
+       ·   "rrdtool update --daemon unix:/tmp/rrdd.sock demo4.rrd N:23"
 
-       Update the database file demo2.rrd which expects data from a single
-       data-source, three times. First with an _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* value then with two
-       regular readings. The update interval seems to be around 300 seconds.
+           Use the UNIX domain socket "/tmp/rrdd.sock" to contact the caching
+           daemon. If the caching daemon is not available, update the file
+           "demo4.rrd" directly.  W\bWA\bAR\bRN\bNI\bIN\bNG\bG:\b: Since a relative path is specified,
+           the following disturbing effect may occur: If the daemon is avail-
+           able, the file relative to the working directory o\bof\bf t\bth\bhe\be d\bda\bae\bem\bmo\bon\bn is
+           used. If the daemon is not available, the file relative to the cur-
+           rent working directory of the invoking process is used.  T\bTh\bhi\bis\bs 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 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!
 
-A\bAU\bUT\bTH\bHO\bOR\bR
-       Tobias Oetiker <tobi@oetiker.ch>
+A\bAU\bUT\bTH\bHO\bOR\bRS\bS
+       Tobias Oetiker <tobi@oetiker.ch>, Florian Forster <octo at ver-
+       plant.org>
 
 
 
-1.3.0                             2008-03-15                      RRDUPDATE(1)
+1.3.99909060808                   2009-06-02                      RRDUPDATE(1)