B<rrdtool> {B<update> | B<updatev>} I<filename>
S<[B<--template>|B<-t> I<ds-name>[B<:>I<ds-name>]...]>
-S<[B<--cache> | B<--nocache>]>
S<[B<--daemon> I<address>]>
S<B<N>|I<timestamp>B<:>I<value>[B<:>I<value>...]>
S<I<at-timestamp>B<@>I<value>[B<:>I<value>...]>
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 B<updatev> requires direct disk access, the B<--daemon> option cannot be
+used with this command.
+
=item I<filename>
The name of the B<RRD> you want to update.
using the template switch), B<RRDtool> will ignore the value specified
for the COMPUTE B<DST>.
-=item B<--cache> | B<--nocache>
-
-Force the use of the caching daemon or force direct file access. If B<--cache>
-is given, B<RRDTool> will try to contact the caching daemon B<RRDd> and will
-fail if it cannot connect to the daemon. If the connection is successfully
-established the values will be sent to the daemon instead of accessing the
-files directly. If B<--nocache> is given no connection attempt is made. If
-neither option is specified B<RRDTool> will try to contact the daemon and, if
-no connection may be established, will fall back to direct file access.
-
-Examples:
-
- rrdtool update --cache /var/lib/rrd/foo.rrd N:123
- rrdtool update --nocache /var/lib/rrd/bar.rrd N:234
-
=item B<--daemon> I<address>
-Specifies the address of the caching daemon. If I<address> begins with C<unix:>
-the everything after this prefix will be considered to be a UNIX domain socket.
-Otherwise the address is interpreted as network address or node name as
-understood by L<getaddrinfo(3)>. One practical consequence is that both, IPv4
-and IPv6, may be used if the system supports it.
-
-Examples:
-
- rrdtool update --daemon unix:/tmp/rrdd.sock /var/lib/rrd/foo.rrd N:123
- rrdtool update --daemon ::1 /var/lib/rrd/bar.rrd N:234
- rrdtool update --daemon 10.0.0.2 /var/lib/rrd/baz.rrd N:345
- rrdtool update --daemon rrdtool.example.com /var/lib/rrd/qux.rrd N:456
+If given, B<RRDTool> will try to connect to the caching daemon L<rrdcached(1)>
+at I<address> 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. If I<address> begins with C<unix:>
+then everything after this prefix will be considered to be a UNIX domain
+socket, see L<EXAMPLES> below. Otherwise the address is interpreted as network
+address or node name as understood by L<getaddrinfo(3)>. One practical
+consequence is that both, IPv4 and IPv6, may be used if the system supports
+it. This option is available for the B<update> command only.
=item B<N>|I<timestamp>B<:>I<value>[B<:>I<value>...]
=back
-=head1 EXAMPLE
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>update>:
+
+=over 4
+
+=item B<RRDCACHED_ADDRESS>
+
+If this environment variable is set it will have the same effect as specifying
+the C<--daemon> option on the command line. If both are present, the command
+line argument takes precedence.
+
+=back
+
+=head1 EXAMPLES
+
+=over 4
+
+=item
C<rrdtool update demo1.rrd N:3.44:3.15:U:23>
Update the database file demo1.rrd with 3 known and one I<*UNKNOWN*>
value. Use the current time as the update time.
+=item
+
C<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 I<*UNKNOWN*> value then with two
regular readings. The update interval seems to be around 300 seconds.
+=item
+
+C<rrdtool update --cache /var/lib/rrd/demo3.rrd N:42>
+
+Update the file C</var/lib/rrd/demo3.rrd> with a single data source, using the
+current time. If the caching daemon cannot be reached, do B<not> fall back to
+direct file access.
+
+=item
+
+C<rrdtool update --daemon unix:/tmp/rrdd.sock demo4.rrd N:23>
+
+Use the UNIX domain socket C</tmp/rrdd.sock> to contact the caching daemon. If
+the caching daemon is not available, update the file C<demo4.rrd> directly.
+B<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 B<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.
+B<This may update two different files depending on whether the daemon could be
+reached or not.> Don't do relative paths, kids!
+
+=back
+
=head1 AUTHORS
Tobias Oetiker <tobi@oetiker.ch>,