X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=doc%2Frrdfetch.pod;h=62736fa11eb857fa5342c928f242f417c9700e3e;hb=6d19d9d651c2b710f26ba98417f280d1b6cd9cf4;hp=a6382b92692ad7c51373b1fc12b58e56903f5434;hpb=26f7c5c1ba83c8ab82cd271b143061f7fb13394c;p=rrdtool.git diff --git a/doc/rrdfetch.pod b/doc/rrdfetch.pod index a6382b9..62736fa 100644 --- a/doc/rrdfetch.pod +++ b/doc/rrdfetch.pod @@ -4,10 +4,10 @@ rrdfetch - Fetch data from an RRD. =head1 SYNOPSIS -B B I I -S<[B<--resolution>|B<-r> I]> -S<[B<--start>|B<-s> I]> -S<[B<--end>|B<-e> I]> +B B I I +S<[B<--resolution>|B<-r> I]> +S<[B<--start>|B<-s> I]> +S<[B<--end>|B<-e> I]> =head1 DESCRIPTION @@ -20,11 +20,11 @@ function. =over 8 -=item I +=item I the name of the B you want to fetch the data from. -=item I +=item I the consolidation function that is applied to the data you want to fetch (AVERAGE,MIN,MAX,LAST) @@ -48,12 +48,23 @@ 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. To +specify a UNIX domain socket use the prefix C, see example below. Other +addresses are interpreted as normal network addresses, i.Ee. IPv4 or IPv6 +addresses in most cases. + + 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 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 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 \ @@ -92,10 +103,10 @@ both start and end time are within the desired RRA =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: @@ -103,7 +114,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: @@ -259,4 +270,4 @@ I<19970703 12:45> -- 12:45 July 3th, 1997 =head1 AUTHOR -Tobias Oetiker +Tobias Oetiker