]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
rrdtune: 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 all the short options.
* Document step option (although detailled documentation is missing)
* Add short options '-s', '-S', '-t' and '-D' to getopt.
* Add missing options to rrdtool help.

doc/rrdtune.pod
src/rrd_tool.c
src/rrd_tune.c

index 71d70469da3dec406ed6e183ef72b97212dfae3c..d6aa63732636b7db9826c638cc5822f45d0ce158 100644 (file)
@@ -10,17 +10,18 @@ S<[B<--minimum>|B<-i> I<ds-name>:I<min>]>
 S<[B<--maximum>|B<-a> I<ds-name>:I<max>]>
 S<[B<--data-source-type>|B<-d> I<ds-name>:I<DST>]>
 S<[B<--data-source-rename>|B<-r> I<old-name>:I<new-name>]>
-S<[B<--deltapos> I<scale-value>]>
-S<[B<--deltaneg> I<scale-value>]>
-S<[B<--failure-threshold> I<failure-threshold>]>
-S<[B<--window-length> I<window-length>]>
-S<[B<--alpha> I<adaption-parameter>]>
-S<[B<--beta> I<adaption-parameter>]>
-S<[B<--gamma> I<adaption-parameter>]>
-S<[B<--gamma-deviation> I<adaption-parameter>]>
-S<[B<--smoothing-window> I<fraction-of-season>]>
-S<[B<--smoothing-window-deviation> I<fraction-of-season>]>
-S<[B<--aberrant-reset> I<ds-name>]>
+S<[B<--deltapos>|B<-p> I<scale-value>]>
+S<[B<--deltaneg>|B<-n> I<scale-value>]>
+S<[B<--failure-threshold>|B<-f> I<failure-threshold>]>
+S<[B<--window-length>|B<-w> I<window-length>]>
+S<[B<--alpha>|B<-x> I<adaption-parameter>]>
+S<[B<--beta>|B<-y> I<adaption-parameter>]>
+S<[B<--gamma>|B<-z> I<adaption-parameter>]>
+S<[B<--gamma-deviation>|B<-v> I<adaption-parameter>]>
+S<[B<--smoothing-window>|B<-s> I<fraction-of-season>]>
+S<[B<--smoothing-window-deviation>|B<-S> I<fraction-of-season>]>
+S<[B<--aberrant-reset>|B<-b> I<ds-name>]>
+S<[B<--step>|B<-t> I<newstep>]>
 S<[B<--daemon>|B<-D> I<address>]>
 S<[B<DEL:>I<ds-name>]>
 S<[B<DS:>I<ds-spec>]>
@@ -82,7 +83,7 @@ alter the type B<DST> of a data source.
 
 rename a data source.
 
-=item S<B<--deltapos> I<scale-value>>
+=item S<B<--deltapos>|B<-p> I<scale-value>>
 
 Alter the deviation scaling factor for the upper bound of the
 confidence band used internally to calculate violations for the
@@ -92,14 +93,14 @@ CDEF argument to generate a graph with confidence bounds. The graph
 scale factor need not to agree with the value used internally by the
 FAILURES B<RRA>.
 
-=item S<B<--deltaneg> I<scale-value>>
+=item S<B<--deltaneg>|B<-n> I<scale-value>>
 
 Alter the deviation scaling factor for the lower bound of the confidence band
 used internally to calculate violations for the FAILURES B<RRA>. The default
 value is 2. As with B<--deltapos>, this argument is unrelated to the scale
 factor chosen when graphing confidence bounds.
 
-=item S<B<--failure-threshold> I<failure-threshold>>
+=item S<B<--failure-threshold>|B<-f> I<failure-threshold>>
 
 Alter the number of confidence bound violations that constitute a failure for
 purposes of the FAILURES B<RRA>. This must be an integer less than or equal to
@@ -107,44 +108,44 @@ the window length of the FAILURES B<RRA>. This restriction is not verified by
 the tune option, so one can reset failure-threshold and window-length
 simultaneously. Setting this option will reset the count of violations to 0.
 
-=item S<B<--window-length> I<window-length>>
+=item S<B<--window-length>|B<-w> I<window-length>>
 
 Alter the number of time points in the temporal window for determining
 failures. This must be an integer greater than or equal to the window
 length of the FAILURES B<RRA> and less than or equal to 28. Setting
 this option will reset the count of violations to 0.
 
-=item S<B<--alpha> I<adaption-parameter>>
+=item S<B<--alpha>|B<-x> I<adaption-parameter>>
 
 Alter the intercept adaptation parameter for the Holt-Winters
 forecasting algorithm. This parameter must be between 0 and 1.
 
-=item S<B<--beta> I<adaption-parameter>>
+=item S<B<--beta>|B<-y> I<adaption-parameter>>
 
 Alter the slope adaptation parameter for the Holt-Winters forecasting
 algorithm. This parameter must be between 0 and 1.
 
-=item S<B<--gamma> I<adaption-parameter>>
+=item S<B<--gamma>|B<-z> I<adaption-parameter>>
 
 Alter the seasonal coefficient adaptation parameter for the SEASONAL
 B<RRA>. This parameter must be between 0 and 1.
 
-=item S<B<--gamma-deviation> I<adaption-parameter>>
+=item S<B<--gamma-deviation>|B<-v> I<adaption-parameter>>
 
 Alter the seasonal deviation adaptation parameter for the DEVSEASONAL
 B<RRA>. This parameter must be between 0 and 1.
 
-=item S<B<--smoothing-window> I<fraction-of-season>>
+=item S<B<--smoothing-window>|B<-s> I<fraction-of-season>>
 
 Alter the size of the smoothing window for the SEASONAL B<RRA>. This must
 be between 0 and 1.
 
-=item S<B<--smoothing-window-deviation> I<fraction-of-season>>
+=item S<B<--smoothing-window-deviation>|B<-S> I<fraction-of-season>>
 
 Alter the size of the smoothing window for the DEVSEASONAL B<RRA>. This must
 be between 0 and 1.
 
-=item S<B<--aberrant-reset> I<ds-name>>
+=item S<B<--aberrant-reset>|B<-b> I<ds-name>>
 
 This option causes the aberrant behavior detection algorithm to reset
 for the specified data source; that is, forget all it is has learnt so far.
@@ -172,6 +173,12 @@ data source.
 Use of this tuning option is advised when the behavior of the data source
 time series changes in a drastic and permanent manner.
 
+=item B<--step>|B<-t> I<newstep>
+
+Changes the step size of the RRD to newstep.
+
+TODO: add proper documentation
+
 =item B<--daemon>|B<-D> I<address>
 
 B<NOTE>: Because the B<-d> (small letter 'd') option was already taken, this 
index 6a54c0e11adad0b53349e021537d0fbc83885af6..6e4fa60f76fcc528cec0d70c6ba599526d17e37c 100644 (file)
@@ -201,17 +201,25 @@ void PrintUsage(
            "\t\t[--data-source-type|-d ds-name:DST]\n"
            "\t\t[--data-source-rename|-r old-name:new-name]\n"
            "\t\t[--minimum|-i ds-name:min] [--maximum|-a ds-name:max]\n"
-           "\t\t[--deltapos scale-value] [--deltaneg scale-value]\n"
-           "\t\t[--failure-threshold integer]\n"
-           "\t\t[--window-length integer]\n"
-           "\t\t[--alpha adaptation-parameter]\n");
+           "\t\t[--deltapos|-p scale-value] [--deltaneg|-n scale-value]\n"
+           "\t\t[--failure-threshold|-f integer]\n"
+           "\t\t[--window-length|-w integer]\n"
+           "\t\t[--alpha|-x adaptation-parameter]\n");
     const char *help_tune2 =
-        N_("\t\t[--beta adaptation-parameter]\n"
-           "\t\t[--gamma adaptation-parameter]\n"
-           "\t\t[--gamma-deviation adaptation-parameter]\n"
-           "\t\t[--aberrant-reset ds-name]\n");
+        N_("\t\t[--beta|-y adaptation-parameter]\n"
+           "\t\t[--gamma|-z adaptation-parameter]\n"
+           "\t\t[--gamma-deviation|-v adaptation-parameter]\n"
+           "\t\t[--smoothing-window|-s fraction-of-season]\n"
+           "\t\t[--smoothing-window-deviation|-S fraction-of-season]\n"
+           "\t\t[--aberrant-reset|-b ds-name]\n");
     const char *help_tune3 = 
-       N_("\t\t???");  // FIXME
+        N_("\t\t[--step|-t newstep]\n"
+           "\t\t[--daemon|-D address]\n"
+           "\t\t[DEL:ds-name]\n"
+           "\t\t[DS:ds-spec]\n"
+           "\t\t[DELRRA:index]\n"
+           "\t\t[RRA:rra-spec]\n"
+           "\t\t[RRA#index:[+-=]number]\n");
     const char *help_resize =
         N_
         (" * resize - alter the length of one of the RRAs in an RRD\n\n"
index 4838d4c70ee10f9ca07292ab6ab853cfcd2541df..c743d37a563503d494fd19360d728de0bbd34a57 100644 (file)
@@ -124,7 +124,7 @@ int rrd_tune(
     
     while (1) {
        int option_index = 0;
-       int opt = getopt_long(argc, argv, "h:i:a:d:r:p:n:w:f:x:y:z:v:b:",
+       int opt = getopt_long(argc, argv, "h:i:a:d:r:p:n:w:f:x:y:z:v:s:S:b:t:D:",
                              long_options, &option_index);
         if (opt == EOF)
             break;
@@ -187,7 +187,7 @@ int rrd_tune(
         int       opt;
         unsigned int strtod_ret_val;
 
-        opt = getopt_long(argc, argv, "h:i:a:d:r:p:n:w:f:x:y:z:v:b:",
+        opt = getopt_long(argc, argv, "h:i:a:d:r:p:n:w:f:x:y:z:v:s:S:b:t:D:",
                           long_options, &option_index);
         if (opt == EOF)
             break;