]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
rrdlast: fix options documentation and parsing
authorBenoît Monin <benoit.monin@gmx.fr>
Sat, 25 Apr 2015 10:02:44 +0000 (12:02 +0200)
committerBenoît Monin <benoit.monin@gmx.fr>
Sat, 25 Apr 2015 20:54:52 +0000 (22:54 +0200)
* Document short option '-d' for daemon.
* Remove noflush option from documentation, unimplemented
* Add short-option '-d' to error message.
* Add daemon to rrdtool help.

doc/rrdlast.pod
src/rrd_last.c
src/rrd_tool.c

index f0eaad0c7d86ed761f738f977db35fad89c5576d..ab9c42a805124b85e0b562555dfa66758a7b1085 100644 (file)
@@ -5,7 +5,7 @@ rrdlast - Return the date of the last data sample in an RRD
 =head1 SYNOPSIS
 
 B<rrdtool> B<last> I<filename>
-S<[B<--daemon> I<address>]>
+S<[B<--daemon>|B<-d> I<address>]>
 
 =head1 DESCRIPTION
 
@@ -18,7 +18,7 @@ update of the RRD.
 
 The name of the B<RRD> that contains the data.
 
-=item B<--daemon> I<address>
+=item B<--daemon>|B<-d> 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
@@ -27,13 +27,6 @@ For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
 
  rrdtool last --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
 
-=item B<--noflush> 
-
-If the L<rrdcached> daemon is being used, then omit the flush normally 
-send before returning the last update.  If you add this option, you get the 
-last time the file on disk was updated; if you have relatively low cache times
-and are calling this frequently it will preserve the caching benefit
-
 =back
 
 =head1 ENVIRONMENT VARIABLES
index 30bece91abe3e7d852b11d2ce5b18f5b547e45a7..dc012a168e205a2cb254730717ffe28b13934553 100644 (file)
@@ -45,7 +45,7 @@ time_t rrd_last(
             break;
 
         default:
-            rrd_set_error ("Usage: rrdtool %s [--daemon <addr>] <file>",
+            rrd_set_error ("Usage: rrdtool %s [--daemon|-d <addr>] <file>",
                     argv[0]);
             return (-1);
             break;
@@ -53,7 +53,7 @@ time_t rrd_last(
     }                   /* while (42) */
 
     if ((argc - optind) != 1) {
-        rrd_set_error ("Usage: rrdtool %s [--daemon <addr>] <file>",
+        rrd_set_error ("Usage: rrdtool %s [--daemon|-d <addr>] <file>",
                 argv[0]);
         return (-1);
     }
index 74d57f7d456df1c486cfdcea7ef90b23cf5234be..8af96841bc04eccd19753f22521c75521085a667 100644 (file)
@@ -88,7 +88,8 @@ void PrintUsage(
 
     const char *help_last =
         N_("* last - show last update time for RRD\n\n"
-           "\trrdtool last filename.rrd\n");
+           "\trrdtool last filename.rrd\n"
+           "\t\t[--daemon|-d address]\n");
 
     const char *help_lastupdate =
         N_("* lastupdate - returns the most recent datum stored for\n"