Summary of changes:
[rrdtool.git] / doc / rrdlast.pod
1 =head1 NAME
2
3 rrdlast - Return the date of the last data sample in an RRD
4
5 =head1 SYNOPSIS
6
7 B<rrdtool> B<last> I<filename>
8 S<[B<--daemon> I<address>]>
9
10 =head1 DESCRIPTION
11
12 The B<last> function returns the UNIX timestamp of the most recent
13 update of the RRD.
14
15 =over 8
16
17 =item I<filename>
18
19 The name of the B<RRD> that contains the data.
20
21 =item B<--daemon> I<address>
22
23 Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
24 to the server before reading the RRD files. This allows B<rrdtool> to return
25 fresh data even if the daemon is configured to cache values for a long time.
26 For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
27
28  rrdtool last --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
29
30 =item B<--noflush> 
31
32 If the L<rrdcached> daemon is being used, then omit the flush normally 
33 send before returning the last update.  If you add this option, you get the 
34 last time the file on disk was updated; if you have relatively low cache times
35 and are calling this frequently it will preserve the caching benefit
36
37 =back
38
39 =head1 ENVIRONMENT VARIABLES
40
41 The following environment variables may be used to change the behavior of
42 C<rrdtoolE<nbsp>last>:
43
44 =over 4
45
46 =item B<RRDCACHED_ADDRESS>
47
48 If this environment variable is set it will have the same effect as specifying
49 the C<--daemon> option on the command line. If both are present, the command
50 line argument takes precedence.
51
52 =back
53
54 =head1 AUTHOR
55
56 Russ Wright <rwwright@home.com>
57 Daemon support added by Steve Shipway <steve@steveshipway.org>
58
59