_R_R_D_U_P_D_A_T_E(1)                         rrdtool                        _R_R_D_U_P_D_A_T_E(1)

NNAAMMEE
     rrdupdate - Store a new set of values into the RRD

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]...]
     [----sskkiipp--ppaasstt--uuppddaatteess|--ss]  [----ddaaeemmoonn|--dd _a_d_d_r_e_s_s]   [----]   NN::_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]...  _a_t_-_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
     aligned (interpolated) according to the properties of the RRRRDD to which  the
     data is written.

     uuppddaatteevv This  alternate version of uuppddaattee takes the same arguments and per‐
             forms the same function. The _v stands for _v_e_r_b_o_s_e, which  describes
             the output returned. uuppddaatteevv returns a list of any and all consoli‐
             dated data points (CDPs) written to disk as a result of the invoca‐
             tion  of  update. The values are indexed by timestamp (time_t), RRA
             (consolidation function and PDPs per CDP), and data source  (name).
             Note  that  depending  on the 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 can‐
             not be used with this command.

     _f_i_l_e_n_a_m_eThe name of the RRRRDD you want to update.

     ----lloocckkiinngg|--LL ttrryy|bblloocckk|nnoonnee
             Lock  the  RRRRDD  file in the given mode: ttrryy fails, when the file is
             locked by another process, bblloocckk waits until the lock  is  released
             and  nnoonnee  skips  locking  at  all.   The  default is read from the
             $$RRRRDD__LLOOCCKKIINNGG environment variable and falls back to ttrryy when such a
             variable does not exist.

     ----tteemmppllaattee|--tt _d_s_-_n_a_m_e[::_d_s_-_n_a_m_e]...
             By default, the uuppddaattee function expects its data input in the order
             the data sources are defined in the RRD, excluding any COMPUTE data
             sources (i.e. if the third data source DDSSTT is  COMPUTE,  the  third
             input value will be mapped to the fourth data source in the RRRRDD and
             so  on).  This is not very error resistant, as you might be sending
             the wrong data into an RRD.

             The template switch allows you to specify which  data  sources  you
             are  going to update and in which order. If the data sources speci‐
             fied in the template are not available in the RRD file, the  update
             process will abort with an error message.

             While  it  appears possible with the template switch to update data
             sources asynchronously, RRRRDDttooooll implicitly assigns non-COMPUTE data
             sources missing from the template the _*_U_N_K_N_O_W_N_* value.

             Do not specify a value for a COMPUTE DDSSTT in the uuppddaattee function. If
             this is done accidentally (and this can only be done using the tem‐
             plate switch), RRRRDDttooooll will ignore the value specified for the COM‐
             PUTE DDSSTT.

             The caching daemon rrdcached cannot be used together with templates
             yet.

     ----sskkiipp--ppaasstt--uuppddaatteess|--ss
             When updating an rrd file with data earlier than the latest  update
             already  applied,  rrdtool  will  issue an error message and abort.
             This option instructs rrdtool to silently skip such data. It can be
             useful when re-playing old data into an rrd file and  you  are  not
             sure how many updates have already been applied.

     ----ddaaeemmoonn|--dd _a_d_d_r_e_s_s
             If  given,  RRRRDDttooooll  will try to connect to the caching daemon rrd‐
             cached at _a_d_d_r_e_s_s. If the connection  is  successfully  established
             the  values  will  be  sent  to the daemon instead of accessing the
             files directly. If the connection cannot  be  established  it  will
             fall  back to direct file-access.  While this is convenient, it can
             silently create problems so please read the warning  in  the  exam‐
             ples.

             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 1970-01-01 or by
             using the letter 'N', in which case the update time is  set  to  be
             the current time. Negative time values are subtracted from the cur‐
             rent  time.  An AT_STYLE TIME SPECIFICATION (see the _r_r_d_f_e_t_c_h docu‐
             mentation) may also be used by delimiting the end of the time spec‐
             ification with the '@' character instead of a ':'. Getting the tim‐
             ing right to the second is especially important when you are  work‐
             ing with data-sources of type CCOOUUNNTTEERR, DDEERRIIVVEE, DDCCOOUUNNTTEERR, DDDDEERRIIVVEE or
             AABBSSOOLLUUTTEE.

             When  using negative time values, options and data have to be sepa‐
             rated 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 data-source, the  letter
             UU (e.g., N:0.1:U:1) can be specified.

             The  format of the value acquired from the data source is dependent
             on the data source type chosen. Normally it will  be  numeric,  but
             the  data  acquisition modules may impose their very own parsing of
             this parameter as long as the colon (::)  remains  the  data  source
             value separator.

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.

     RRRRDDCCAACCHHEEDD__SSTTRRIIPPPPAATTHH
         If this environment variable is set it will strip  the  leading  string
         from  the filename prior to sending the filename to rrdcached.  This is
         mostly intended to allow rrdcached to work with xymon and  cacti  tools
         without having to modify those tools.

     RRRRDD__LLOOCCKKIINNGG
         If  this  environment  variable  is  set, the RRRRDD file is locked in the
         given mode: ttrryy fails, when the file  is  locked  by  another  process,
         bblloocckk waits until the lock is released and nnoonnee skips locking at all.

         This variable can be overridden by the ----lloocckkiinngg command line option.

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 --daemon unix:/tmp/rrdd.sock demo4.rrd N:23"

         Use the UNIX domain socket "/tmp/rrdd.sock" to contact the caching dae‐
         mon.  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 di‐
         rectory 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!

AAUUTTHHOORRSS
     Tobias Oetiker <tobi@oetiker.ch>, Florian Forster <octo at verplant.org>

1.10.2                             2026-06-02                       _R_R_D_U_P_D_A_T_E(1)
