Bladeren bron

man: Modify man-page according to command usage

Signed-off-by: Takeshi MIZUTA <miz.take4@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Takeshi MIZUTA 9 jaren geleden
bovenliggende
commit
034553c080

+ 1 - 1
exec/main.c

@@ -1179,8 +1179,8 @@ int main (int argc, char **argv, char **envp)
 					"usage:\n"\
 					"usage:\n"\
 					"        -f     : Start application in foreground.\n"\
 					"        -f     : Start application in foreground.\n"\
 					"        -p     : Do not set process priority.\n"\
 					"        -p     : Do not set process priority.\n"\
-					"        -t     : Test configuration and exit.\n"\
 					"        -r     : Set round robin realtime scheduling (default).\n"\
 					"        -r     : Set round robin realtime scheduling (default).\n"\
+					"        -t     : Test configuration and exit.\n"\
 					"        -v     : Display version and SVN revision of Corosync and exit.\n");
 					"        -v     : Display version and SVN revision of Corosync and exit.\n");
 				logsys_system_fini();
 				logsys_system_fini();
 				return EXIT_FAILURE;
 				return EXIT_FAILURE;

+ 8 - 14
man/corosync-cfgtool.8

@@ -35,14 +35,11 @@
 .SH "NAME"
 .SH "NAME"
 corosync-cfgtool \- An administrative tool for corosync.
 corosync-cfgtool \- An administrative tool for corosync.
 .SH "SYNOPSIS"
 .SH "SYNOPSIS"
-.B corosync\-cfgtool [\-i] [IP_address] [\-s] [\-r] [\-l] [\-u] [\-H] [service_name] [\-v] [version] [\-k] [nodeid] [\-a] [nodeid]
+.B corosync\-cfgtool [\-i IP_address] [\-s] [\-r] [\-R] [\-k nodeid] [\-a nodeid] [\-h] [\-H]
 .SH "DESCRIPTION"
 .SH "DESCRIPTION"
 .B corosync\-cfgtool
 .B corosync\-cfgtool
 A tool for displaying and configuring active parameters within corosync.
 A tool for displaying and configuring active parameters within corosync.
 .SH "OPTIONS"
 .SH "OPTIONS"
-.TP 
-.B -h
-Print basic usage.
 .TP
 .TP
 .B -i
 .B -i
 Finds only information about the specified interface IP address.
 Finds only information about the specified interface IP address.
@@ -56,20 +53,17 @@ to the shell.
 Reset redundant ring state cluster wide after a fault to
 Reset redundant ring state cluster wide after a fault to
 re-enable redundant ring operation.
 re-enable redundant ring operation.
 .TP 
 .TP 
-.B -l
-Load a service identified by "service_name".
-.TP 
-.B -u
-Unload a service identified by "service_name".
-.TP 
-.B -a
-Display the IP address(es) of a node.
+.B -R
+Tell all instances of corosync in this cluster to reload corosync.conf.
 .TP 
 .TP 
 .B -k
 .B -k
 Kill a node identified by node id.
 Kill a node identified by node id.
 .TP 
 .TP 
-.B -R
-Tell all instances of corosync in this cluster to reload corosync.conf
+.B -a
+Display the IP address(es) of a node.
+.TP
+.B -h
+Print basic usage.
 .TP 
 .TP 
 .B -H
 .B -H
 Shutdown corosync cleanly on this node.
 Shutdown corosync cleanly on this node.

+ 1 - 1
man/corosync-cmapctl.8

@@ -35,7 +35,7 @@
 .SH NAME
 .SH NAME
 corosync-cmapctl: \- A tool for accessing the object database.
 corosync-cmapctl: \- A tool for accessing the object database.
 .SH DESCRIPTION
 .SH DESCRIPTION
-usage:  corosync\-cmapctl [\-b] [\-dghsTtp] [params...]
+usage:  corosync\-cmapctl [\-b] [\-DdghsTt] [\-p filename] [params...]
 .HP
 .HP
 \fB\-b\fR show binary values
 \fB\-b\fR show binary values
 .SS "Set key:"
 .SS "Set key:"

+ 4 - 4
man/corosync-cpgtool.8

@@ -41,17 +41,17 @@ corosync-cpgtool \- A tool for displaying cpg groups and members.
 A tool for displaying cpg groups and members.
 A tool for displaying cpg groups and members.
 .SH OPTIONS
 .SH OPTIONS
 .TP
 .TP
-.B -h
-Display this help.
-.TP
 .B -d
 .B -d
 Delimiter between fields.
 Delimiter between fields.
 .TP
 .TP
 .B -e
 .B -e
-Don't escape unprintable characters in group name
+Don't escape unprintable characters in group name.
 .TP
 .TP
 .B -n
 .B -n
 Display only all existing group names.
 Display only all existing group names.
+.TP
+.B -h
+Display this help.
 .SH EXAMPLES
 .SH EXAMPLES
 .TP
 .TP
 Display the groups and process that belong to those cpg groups.
 Display the groups and process that belong to those cpg groups.

+ 4 - 1
man/corosync-keygen.8

@@ -35,7 +35,7 @@
 .SH NAME
 .SH NAME
 corosync-keygen \- Generate an authentication key for Corosync.
 corosync-keygen \- Generate an authentication key for Corosync.
 .SH SYNOPSIS
 .SH SYNOPSIS
-.B "corosync-keygen [\-k <filename>] [\-l]"
+.B "corosync-keygen [\-k <filename>] [\-l] [\-h]"
 .SH DESCRIPTION
 .SH DESCRIPTION
 
 
 If you want to configure corosync to use cryptographic techniques to ensure authenticity
 If you want to configure corosync to use cryptographic techniques to ensure authenticity
@@ -70,6 +70,9 @@ The default is /etc/corosync/authkey.
 Use a less secure random data source that will not require user input to help generate
 Use a less secure random data source that will not require user input to help generate
 entropy.  This may be useful when this utility is used from a script or hardware random number
 entropy.  This may be useful when this utility is used from a script or hardware random number
 generator is not available (f.e. in virtual machine).
 generator is not available (f.e. in virtual machine).
+.TP
+.B -h
+Print basic usage.
 
 
 .SH EXAMPLES
 .SH EXAMPLES
 .TP
 .TP

+ 3 - 3
man/corosync-notifyd.8

@@ -35,7 +35,7 @@
 .SH NAME
 .SH NAME
 corosync-notifyd \- Listen for important corosync events and send dbus and/or snmp traps.
 corosync-notifyd \- Listen for important corosync events and send dbus and/or snmp traps.
 .SH SYNOPSIS
 .SH SYNOPSIS
-.B "corosync-notifyd [\-f] [\-l] [\-o] [\-s] [\-m] [manager] [\-d] [-h]"
+.B "corosync-notifyd [\-f] [\-l] [\-o] [\-s] [\-m manager] [\-d] [-h]"
 .SH DESCRIPTION
 .SH DESCRIPTION
 .B corosync-notifyd
 .B corosync-notifyd
 uses corosync API to listen for important cluster events and can log them,
 uses corosync API to listen for important cluster events and can log them,
@@ -55,13 +55,13 @@ Print events to stdout (turns on -l).
 Send SNMP traps on all events.
 Send SNMP traps on all events.
 .TP
 .TP
 .B -m
 .B -m
-Set the SNMP manager address.
+Set the SNMP Manager IP address (defaults to localhost).
 .TP
 .TP
 .B -d
 .B -d
 Send DBUS signals on all events.
 Send DBUS signals on all events.
 .TP
 .TP
 .B -h
 .B -h
-Print this help
+Print this help.
 .SH EXAMPLES
 .SH EXAMPLES
 .br
 .br
 $ corosync-notifyd -o
 $ corosync-notifyd -o

+ 7 - 1
man/corosync-quorumtool.8

@@ -35,7 +35,7 @@
 .SH NAME
 .SH NAME
 corosync-quorumtool \- Set and display quorum settings.
 corosync-quorumtool \- Set and display quorum settings.
 .SH SYNOPSIS
 .SH SYNOPSIS
-.B "corosync-quorumtool [\-s] [\-m] [\-l] [\-p] [\-v votes] [\-n nodeid] [\-e expected] [\-h] [\-i] [\-o <a|n|i>] [\-V]"
+.B "corosync-quorumtool [\-s] [\-m] [\-l] [\-p] [\-v votes] [\-n nodeid] [\-e expected] [\-H] [\-i] [\-o <a|n|i>] [\-f] [\-h] [\-V]"
 .SH DESCRIPTION
 .SH DESCRIPTION
 Display the current state of quorum in the cluster and set vote quorum options.
 Display the current state of quorum in the cluster and set vote quorum options.
 .SH OPTIONS
 .SH OPTIONS
@@ -49,6 +49,9 @@ constantly monitor quorum status
 .B  -l
 .B  -l
 list nodes
 list nodes
 .TP
 .TP
+.B  -p
+when used with -s or -l, generates machine parsable output
+.TP
 .B  -v <votes>
 .B  -v <votes>
 change the number of votes for a node *
 change the number of votes for a node *
 .TP
 .TP
@@ -72,6 +75,9 @@ Orders the output of the nodes list. By default or with -oa nodes are listed in
 order: as they come from corosync. -on will order the nodes based on their name,
 order: as they come from corosync. -on will order the nodes based on their name,
 and -oi will order them based on their node ID.
 and -oi will order them based on their node ID.
 .TP
 .TP
+.B -f
+forcefully unregister a quorum device *DANGEROUS* *
+.TP
 .B  -h (if no other argument)
 .B  -h (if no other argument)
 show this help text
 show this help text
 .TP
 .TP

+ 1 - 1
man/corosync.8

@@ -35,7 +35,7 @@
 .SH NAME
 .SH NAME
 corosync \- The Corosync Cluster Engine.
 corosync \- The Corosync Cluster Engine.
 .SH SYNOPSIS
 .SH SYNOPSIS
-.B "corosync [\-f] [\-p] [\-r] [\-v]"
+.B "corosync [\-f] [\-p] [\-r] [\-t] [\-v]"
 .SH DESCRIPTION
 .SH DESCRIPTION
 .B corosync
 .B corosync
 Corosync provides clustering infrastructure such as membership, messaging and quorum.
 Corosync provides clustering infrastructure such as membership, messaging and quorum.

+ 7 - 4
tools/corosync-cfgtool.c

@@ -261,15 +261,17 @@ static void killnode_do(unsigned int nodeid)
 
 
 static void usage_do (void)
 static void usage_do (void)
 {
 {
-	printf ("corosync-cfgtool [-i <interface ip>] -s] [-r] [-H] [service_name] [-k] [nodeid] [-a] [nodeid]\n\n");
+	printf ("corosync-cfgtool [-i <interface ip>] [-s] [-r] [-R] [-k nodeid] [-a nodeid] [-h] [-H]\n\n");
 	printf ("A tool for displaying and configuring active parameters within corosync.\n");
 	printf ("A tool for displaying and configuring active parameters within corosync.\n");
 	printf ("options:\n");
 	printf ("options:\n");
+	printf ("\t-i\tFinds only information about the specified interface IP address.\n");
 	printf ("\t-s\tDisplays the status of the current rings on this node.\n");
 	printf ("\t-s\tDisplays the status of the current rings on this node.\n");
 	printf ("\t-r\tReset redundant ring state cluster wide after a fault to\n");
 	printf ("\t-r\tReset redundant ring state cluster wide after a fault to\n");
 	printf ("\t\tre-enable redundant ring operation.\n");
 	printf ("\t\tre-enable redundant ring operation.\n");
-	printf ("\t-a\tDisplay the IP address(es) of a node\n");
+	printf ("\t-R\tTell all instances of corosync in this cluster to reload corosync.conf.\n");
 	printf ("\t-k\tKill a node identified by node id.\n");
 	printf ("\t-k\tKill a node identified by node id.\n");
-	printf ("\t-R\tReload corosync.conf on all nodes.\n");
+	printf ("\t-a\tDisplay the IP address(es) of a node\n");
+	printf ("\t-h\tPrint basic usage.\n");
 	printf ("\t-H\tShutdown corosync cleanly on this node.\n");
 	printf ("\t-H\tShutdown corosync cleanly on this node.\n");
 }
 }
 
 
@@ -306,7 +308,8 @@ int main (int argc, char *argv[]) {
 			shutdown_do();
 			shutdown_do();
 			break;
 			break;
 		case 'a':
 		case 'a':
-			showaddrs_do( atoi(optarg) );
+			nodeid = atoi (optarg);
+			showaddrs_do(nodeid);
 			break;
 			break;
 		case 'h':
 		case 'h':
 			usage_do();
 			usage_do();

+ 1 - 1
tools/corosync-cmapctl.c

@@ -96,7 +96,7 @@ static int convert_name_to_type(const char *name)
 static int print_help(void)
 static int print_help(void)
 {
 {
 	printf("\n");
 	printf("\n");
-	printf("usage:  corosync-cmapctl [-b] [-dghsTtp] [params...]\n");
+	printf("usage:  corosync-cmapctl [-b] [-DdghsTt] [-p filename] [params...]\n");
 	printf("\n");
 	printf("\n");
 	printf("    -b show binary values\n");
 	printf("    -b show binary values\n");
 	printf("\n");
 	printf("\n");

+ 1 - 1
tools/corosync-cpgtool.c

@@ -198,7 +198,7 @@ static void usage_do (const char *prog_name)
 	printf ("A tool for displaying cpg groups and members.\n");
 	printf ("A tool for displaying cpg groups and members.\n");
 	printf ("options:\n");
 	printf ("options:\n");
 	printf ("\t-d\tDelimiter between fields.\n");
 	printf ("\t-d\tDelimiter between fields.\n");
-	printf ("\t-e\tDon't escape unprintable characters in group name\n");
+	printf ("\t-e\tDon't escape unprintable characters in group name.\n");
 	printf ("\t-n\tDisplay only all existing group names.\n");
 	printf ("\t-n\tDisplay only all existing group names.\n");
 	printf ("\t-h\tDisplay this help.\n");
 	printf ("\t-h\tDisplay this help.\n");
 }
 }

+ 3 - 2
tools/corosync-keygen.c

@@ -50,13 +50,14 @@
 #define DEFAULT_KEYFILE COROSYSCONFDIR "/authkey"
 #define DEFAULT_KEYFILE COROSYSCONFDIR "/authkey"
 
 
 static const char usage[] =
 static const char usage[] =
-	"Usage: corosync-keygen [-k <keyfile>] [-l]\n"
+	"Usage: corosync-keygen [-k <keyfile>] [-l] [-h]\n"
 	"     -k / --key-file=<filename> -  Write to the specified keyfile\n"
 	"     -k / --key-file=<filename> -  Write to the specified keyfile\n"
 	"            instead of the default " DEFAULT_KEYFILE ".\n"
 	"            instead of the default " DEFAULT_KEYFILE ".\n"
 	"     -l / --less-secure -  Use a less secure random number source\n"
 	"     -l / --less-secure -  Use a less secure random number source\n"
 	"            (/dev/urandom) that is guaranteed not to require user\n"
 	"            (/dev/urandom) that is guaranteed not to require user\n"
 	"            input for entropy.  This can be used when this\n"
 	"            input for entropy.  This can be used when this\n"
-	"            application is used from a script.\n";
+	"            application is used from a script.\n"
+	"     -h / --help -  Print basic usage.\n";
 
 
 
 
 int main (int argc, char *argv[])
 int main (int argc, char *argv[])

+ 2 - 2
tools/corosync-notifyd.c

@@ -1093,9 +1093,9 @@ _cs_usage(void)
 		"        -l     : Log all events.\n"\
 		"        -l     : Log all events.\n"\
 		"        -o     : Print events to stdout (turns on -l).\n"\
 		"        -o     : Print events to stdout (turns on -l).\n"\
 		"        -s     : Send SNMP traps on all events.\n"\
 		"        -s     : Send SNMP traps on all events.\n"\
-		"        -m     : SNMP Manager IP address (defaults to localhost).\n"\
+		"        -m     : Set the SNMP Manager IP address (defaults to localhost).\n"\
 		"        -d     : Send DBUS signals on all events.\n"\
 		"        -d     : Send DBUS signals on all events.\n"\
-		"        -h     : Print this help\n\n");
+		"        -h     : Print this help.\n\n");
 }
 }
 
 
 int
 int

+ 4 - 3
tools/corosync-quorumtool.c

@@ -157,15 +157,16 @@ static void show_usage(const char *name)
 	printf("  options:\n");
 	printf("  options:\n");
 	printf("\n");
 	printf("\n");
 	printf("  -s             show quorum status\n");
 	printf("  -s             show quorum status\n");
-	printf("  -m             monitor quorum status\n");
+	printf("  -m             constantly monitor quorum status\n");
 	printf("  -l             list nodes\n");
 	printf("  -l             list nodes\n");
 	printf("  -p             when used with -s or -l, generates machine parsable output\n");
 	printf("  -p             when used with -s or -l, generates machine parsable output\n");
 	printf("  -v <votes>     change the number of votes for a node (*)\n");
 	printf("  -v <votes>     change the number of votes for a node (*)\n");
-	printf("  -n <nodeid>    optional nodeid of node for -v (*)\n");
+	printf("  -n <nodeid>    optional nodeid of node for -v\n");
 	printf("  -e <expected>  change expected votes for the cluster (*)\n");
 	printf("  -e <expected>  change expected votes for the cluster (*)\n");
 	printf("  -H             show nodeids in hexadecimal rather than decimal\n");
 	printf("  -H             show nodeids in hexadecimal rather than decimal\n");
 	printf("  -i             show node IP addresses instead of the resolved name\n");
 	printf("  -i             show node IP addresses instead of the resolved name\n");
-	printf("  -o <a|i>       order by [a] IP address (default), [i] nodeid,\n");
+	printf("  -p             when used with -s or -l, generates machine parsable output\n");
+	printf("  -o <a|n|i>     order by [a] IP address (default), [n] name, [i] nodeid\n");
 	printf("  -f             forcefully unregister a quorum device *DANGEROUS* (*)\n");
 	printf("  -f             forcefully unregister a quorum device *DANGEROUS* (*)\n");
 	printf("  -h             show this help text\n");
 	printf("  -h             show this help text\n");
 	printf("  -V             show version and exit\n");
 	printf("  -V             show version and exit\n");