RRDUPDATE(1)
π
RRDUPDATE(1) β the rrdtool manual page for rrdupdate, but make it cute π
okay bestie, welcome to the rrdtool glow-up zone. This is where your RRD gets fed new values, and yes, the timing details are lowkey important. Letβs get into it β¨
πΈ NAME πΈ
rrdupdate β store a new set of values into the RRD. No cap, thatβs the whole job π
β¨ SYNOPSIS β¨
rrdtool {update | updatev} filename [--template|-t ds-name[:ds-name]...]
[--skip-past-updates|-s] [--daemon|-d address] [--] N:value[:value]...
timestamp:value[:value]... at-timestamp@value[:value]...
π¦ DESCRIPTION π¦
The update function feeds new data values into an RRD. The data is time aligned (interpolated) according to the properties of the RRD to which the data is written. So itβs not just βdump numbers and pray,β okay? The RRD is doing its little timing choreography π©°
updatev
This alternate version of update takes the same arguments and performs the same function. The v stands for verbose, which describes the output returned. updatev returns a list of any and all consolidated data points (CDPs) written to disk as a result of the invocation 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. So itβs giving βmaybe a tiny snack, maybe a whole buffetβ energy π
Since updatev requires direct disk access, the --daemon option cannot be used with this command. Thatβs a hard no, bestie π
filename
The name of the RRD you want to update. Simple, iconic, necessary π
--locking|-L try|block|none
Lock the RRD file in the given mode: try fails, when the file is locked by another process, block waits until the lock is released and none skips locking at all. The default is read from the $RRD_LOCKING environment variable and falls back to try when such a variable does not exist.
Locking tea β:tryis like knocking and leaving if nobody answers,blockis waiting outside the bathroom, andnoneis just walking in like you own the place π
--template|-t ds-name[:ds-name]...
By default, the update 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 DST is COMPUTE, the third input value will be mapped to the fourth data source in the RRD and so on). This is not very error resistant, as you might be sending the wrong data into an RRD. And bestie, sending the wrong data into an RRD is giving βtexted the wrong personβ but worse π¬
The template switch allows you to specify which data sources you are going to update and in which order. If the data sources specified in the template are not available in the RRD file, the update process will abort with an error message. Abort. Not slay. Error message.
While it appears possible with the template switch to update data sources asynchronously, RRDtool implicitly assigns non-COMPUTE data sources missing from the template the UNKNOWN value. So the missing ones get the little mystery cloak π΅οΈββοΈ
Do not specify a value for a COMPUTE DST in the update function. If this is done accidentally (and this can only be done using the template switch), RRDtool will ignore the value specified for the COMPUTE DST. RRDtool is literally like βhuh? no πβ and moves on.
The caching daemon rrdcached cannot be used together with templates yet. Not yet, bestie. Not yet.
--skip-past-updates|-s
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. So itβs the βjust skip the ones we already lived throughβ button π«Ά
--daemon|-d address
If given, RRDtool will try to connect to the caching daemon rrdcached at address. 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 examples. Convenient but messy, like a cute outfit with zero pockets π₯
For a list of accepted formats, see the -l option in the rrdcached manual.
{N | timestamp}:value[:value]...
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 current time. An AT_STYLE TIME SPECIFICATION (see the rrdfetch documentation) may also be used by delimiting the end of the time specification with the @ character instead of a :. Getting the timing right to the second is especially important when you are working with data-sources of type COUNTER, DERIVE, DCOUNTER, DDERIVE or ABSOLUTE. Like, second-level timing matters. Respect the clock β°
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 data-source, the letter U (e.g., N:0.1:U:1) can be specified. U is the UNKNOWN placeholder, doing its little mystery era π«οΈ
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. The colon is basically the group-chat divider. Do not remove it π¬
π ENVIRONMENT VARIABLES π
The following environment variables may be used to change the behavior of rrdtool update:
RRDCACHED_ADDRESS
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. Command line stays main character π
RRDCACHED_STRIPPATH
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. Very βmake it work without touching the legacy setupβ of it all π§
RRD_LOCKING
If this environment variable is set, the RRD file is locked in the given mode: try fails, when the file is locked by another process, block waits until the lock is released and none skips locking at all.
This variable can be overridden by the --locking command line option. Again: command line wins, because sheβs that girl π
π EXAMPLES π
rrdtool update demo1.rrd N:3.44:3.15:U:23β Update the database filedemo1.rrdwith 3 known and one UNKNOWN value. Use the current time as the update time. Cute, current, and one little mystery number πrrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7β Update the database filedemo2.rrdwhich expects data from a single data-source, three times. First with an UNKNOWN value then with two regular readings. The update interval seems to be around 300 seconds. Three updates, one little unknown moment, two real readings. We love a timeline πrrdtool update demo3.rrd -- -5:21 N:42β Update the database filedemo3.rrdtwo times, using five seconds in the past and the current time as the update times. See that--? Itβs keeping the negative time from being read as an option. Respect the separator π«Άrrdtool update --daemon unix:/tmp/rrdd.sock demo4.rrd N:23β 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.
WARNING: Since a relative path is specified, the following disturbing effect may occur: If the daemon is available, the file relative to the working directory of the daemon is used. If the daemon is not available, the file relative to the current working directory of the invoking process is used. This may update two different files depending on whether the daemon could be reached or not. Donβt do relative paths, kids! ππ
π AUTHORS π
Tobias Oetiker <tobi@oetiker.ch>, Florian Forster <octo at verplant.org>
mwah π β this page is from the rrdtool manual, version 1.11.0, dated 2026-10-17.
π¦ where this page comes from
- arch rolling: rrdtool 1.11.0-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms