X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=doc%2Frrdupdate.txt;h=8ff2503584016a046a9eb446705ce1b66d5e5038;hb=645054bac6187b0e83fd4125fd59e4feda216b64;hp=ec271e3a93e58b6430a6a36ce0f557c96531b67e;hpb=51c3d3fb997c22e1ee828470413f1e84989e1f6c;p=pkg-rrdtool.git diff --git a/doc/rrdupdate.txt b/doc/rrdupdate.txt index ec271e3..8ff2503 100644 --- a/doc/rrdupdate.txt +++ b/doc/rrdupdate.txt @@ -7,8 +7,8 @@ NNAAMMEE SSYYNNOOPPSSIISS rrrrddttooooll {uuppddaattee | uuppddaatteevv} _f_i_l_e_n_a_m_e [----tteemmppllaattee|--tt _d_s_-_n_a_m_e[::_d_s_- - _n_a_m_e]...] NN|_t_i_m_e_s_t_a_m_p::_v_a_l_u_e[::_v_a_l_u_e...] _a_t_-_t_i_m_e_s_t_a_m_p@@_v_a_l_u_e[::_v_a_l_u_e...] - [_t_i_m_e_s_t_a_m_p::_v_a_l_u_e[::_v_a_l_u_e...] ...] + _n_a_m_e]...] [----ddaaeemmoonn _a_d_d_r_e_s_s] [----] NN|_t_i_m_e_s_t_a_m_p::_v_a_l_u_e[::_v_a_l_u_e...] _a_t_- + _t_i_m_e_s_t_a_m_p@@_v_a_l_u_e[::_v_a_l_u_e...] [_t_i_m_e_s_t_a_m_p::_v_a_l_u_e[::_v_a_l_u_e...] ...] DDEESSCCRRIIPPTTIIOONN The uuppddaattee function feeds new data values into an RRRRDD. The data is time @@ -25,6 +25,9 @@ DDEESSCCRRIIPPTTIIOONN arguments of the current and previous call to update, the list may have no entries or a large number of entries. + Since uuppddaatteevv requires direct disk access, the ----ddaaeemmoonn option + cannot be used with this command. + _f_i_l_e_n_a_m_e The name of the RRRRDD you want to update. @@ -51,6 +54,16 @@ DDEESSCCRRIIPPTTIIOONN done using the template switch), RRRRDDttooooll will ignore the value specified for the COMPUTE DDSSTT. + ----ddaaeemmoonn _a_d_d_r_e_s_s + If given, RRRRDDTTooooll will try to connect to the caching daemon + rrdcached at _a_d_d_r_e_s_s 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 --ll option in the + rrdcached manual. + NN|_t_i_m_e_s_t_a_m_p::_v_a_l_u_e[::_v_a_l_u_e...] 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 @@ DDEESSCCRRIIPPTTIIOONN second is especially important when you are working with data- sources of type CCOOUUNNTTEERR, DDEERRIIVVEE or AABBSSOOLLUUTTEE. + When using negative time values, options and data have to be + separated by two dashes (----), 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 (----), 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 @@ DDEESSCCRRIIPPTTIIOONN own parsing of this parameter as long as the colon (::) remains the data source value separator. -EEXXAAMMPPLLEE - "rrdtool update demo1.rrd N:3.44:3.15:U:23" +EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS + The following environment variables may be used to change the behavior + of "rrdtool update": + + RRRRDDCCAACCHHEEDD__AADDDDRREESSSS + 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. + +EEXXAAMMPPLLEESS + · "rrdtool update demo1.rrd N:3.44:3.15:U:23" + + Update the database file demo1.rrd with 3 known and one _*_U_N_K_N_O_W_N_* + 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 _*_U_N_K_N_O_W_N_* 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 _*_U_N_K_N_O_W_N_* - 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 + nnoott 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 _*_U_N_K_N_O_W_N_* 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. WWAARRNNIINNGG:: Since a relative path is specified, + the following disturbing effect may occur: If the daemon is + available, the file relative to the working directory ooff tthhee ddaaeemmoonn + is used. If the daemon is not available, the file relative to the + current working directory of the invoking process is used. TThhiiss + mmaayy uuppddaattee ttwwoo ddiiffffeerreenntt ffiilleess ddeeppeennddiinngg oonn wwhheetthheerr tthhee ddaaeemmoonn + ccoouulldd bbee rreeaacchheedd oorr nnoott.. Don't do relative paths, kids! -AAUUTTHHOORR - Tobias Oetiker +AAUUTTHHOORRSS + Tobias Oetiker , Florian Forster + -1.3.8 2008-03-15 RRDUPDATE(1) +1.3.999 2009-06-09 RRDUPDATE(1)