X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=doc%2Frrdfetch.pod;h=29f91bc4d873291ca240a3a3f3f6bd06c2ea5607;hb=825f213df6f751b4e48fe7dcd64feeb27b10cc59;hp=7ebd9d603bb84dc0705f0c2a621fb6343b03be48;hpb=cb092381724e4ba8a1f18712fefc541a3d370f99;p=rrdtool.git diff --git a/doc/rrdfetch.pod b/doc/rrdfetch.pod index 7ebd9d6..29f91bc 100644 --- a/doc/rrdfetch.pod +++ b/doc/rrdfetch.pod @@ -8,6 +8,7 @@ B B I I S<[B<--resolution>|B<-r> I]> S<[B<--start>|B<-s> I]> S<[B<--end>|B<-e> I]> +S<[B<--daemon> I
]> =head1 DESCRIPTION @@ -48,6 +49,22 @@ the end of the time series in seconds since epoch. See also AT-STYLE TIME SPECIFICATION section for a detailed explanation of how to specify the end time. +=item B<--daemon> I
+ +Address of the L daemon. If specified, a C command is sent +to the server before reading the RRD files. This allows B 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 manual. + + rrdtool fetch --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd AVERAGE + +Please note that due to thread-safety reasons, the time specified with B<-s> +and B<-e> cannot use the complex forms described in +L<"AT-STYLE TIME SPECIFICATION">. The only accepted arguments are "simple +integers". Positive values are interpreted as seconds since epoch, negative +values (and zero) are interpreted as relative to I. So "1272535035" refers +to "09:57:15 (UCT), April 29th 2010" and "-3600" means "one hour ago". + =back =head2 RESOLUTION INTERVAL @@ -103,7 +120,7 @@ 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: @@ -148,11 +165,16 @@ single-number date is interpreted as MMDD[YY]YY. I: if you specify the I in this way, the I is REQUIRED as well. -Finally, you can use the words B, B, or B as your time +Finally, you can use the words B, B, B or B as your time reference. B refers to the current moment (and is also the default time reference). B (B) can be used to specify a time relative to the start (end) time for those tools that use these -categories (B, L). +categories (B, L) and B indicates the +*IX epoch (*IX timestamp 0 = 1970-01-01 00:00:00 UTC). B is +useful to disambiguate between a timestamp value and some forms +of abbreviated date/time specifications, because it allows to use +time offset specifications using units, eg. B+19711205s unambiguously +denotes timestamp 19711205 and not 1971-12-05 00:00:00 UTC. Month and day of the week names can be used in their naturally abbreviated form (e.g., Dec for December, Sun for Sunday, etc.). The @@ -257,6 +279,22 @@ I<931225537> -- 18:45 July 5th, 1999 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 +Cfetch>: + +=over 4 + +=item B + +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 +Tobias Oetiker Etobi@oetiker.chE +