diff --git a/doc/rrdfetch.pod b/doc/rrdfetch.pod
index a6382b92692ad7c51373b1fc12b58e56903f5434..0052aa6513b1a82b351d5e705cc5fd185f78d090 100644 (file)
--- a/doc/rrdfetch.pod
+++ b/doc/rrdfetch.pod
=head1 SYNOPSIS
-B<rrdtool> B<fetch> I<filename> I<CF>
-S<[B<--resolution>|B<-r> I<resolution>]>
-S<[B<--start>|B<-s> I<start>]>
-S<[B<--end>|B<-e> I<end>]>
+B<rrdtool> B<fetch> I<filename> I<CF>
+S<[B<--resolution>|B<-r> I<resolution>]>
+S<[B<--start>|B<-s> I<start>]>
+S<[B<--end>|B<-e> I<end>]>
+S<[B<--daemon> I<address>]>
=head1 DESCRIPTION
=over 8
-=item I<filename>
+=item I<filename>
the name of the B<RRD> you want to fetch the data from.
-=item I<CF>
+=item I<CF>
the consolidation function that is applied to the data you
want to fetch (AVERAGE,MIN,MAX,LAST)
TIME SPECIFICATION section for a detailed explanation of how to
specify the end time.
+=item B<--daemon> I<address>
+
+Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
+to the server before reading the RRD files. This allows B<rrdtool> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
+
+ rrdtool fetch --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd AVERAGE
+
=back
=head2 RESOLUTION INTERVAL
-In order to get RRDtool to fetch anything other than the finest resolution RRA
-B<both> the start and end time must be specified on boundaries that are
+In order to get RRDtool to fetch anything other than the finest resolution RRA
+B<both> the start and end time must be specified on boundaries that are
multiples of the desired resolution. Consider the following example:
rrdtool create subdata.rrd -s 10 DS:ds0:GAUGE:300:0:U \
=back
-So, if time now is called "t", do
+So, if time now is called "t", do
end time == int(t/900)*900,
- start time == end time - 1hour,
+ start time == end time - 1hour,
resolution == 900.
Using the bash shell, this could look be:
TIME=$(date +%s)
RRDRES=900
rrdtool fetch subdata.rrd AVERAGE -r $RRDRES \
- -e $(echo $(($TIME/$RRDRES*$RRDRES))) -s e-1h
+ -e $(($TIME/$RRDRES*$RRDRES)) -s e-1h
Or in Perl:
I<19970703 12:45> -- 12:45 July 3th, 1997
(my favorite, and its even got an ISO number (8601)).
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>fetch>:
+
+=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 AUTHOR
-Tobias Oetiker <oetiker@ee.ethz.ch>
+Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
+