Blob Blame History Raw
From 79898e8cb1715e79b7467b91661b7341e2664550 Mon Sep 17 00:00:00 2001
From: Takeshi MIZUTA <miz.take4@gmail.com>
Date: Thu, 1 Dec 2016 02:45:16 +0900
Subject: [PATCH] man: Modify man-page according to command usage

Signed-off-by: Takeshi MIZUTA <miz.take4@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
(cherry picked from commit 034553c0808dfcf27441925b05ae095901dee3f4)
---
 exec/main.c                 |    2 +-
 man/corosync-cfgtool.8      |   22 ++++++++--------------
 man/corosync-cmapctl.8      |    2 +-
 man/corosync-cpgtool.8      |    8 ++++----
 man/corosync-keygen.8       |    5 ++++-
 man/corosync-notifyd.8      |    6 +++---
 man/corosync-quorumtool.8   |    8 +++++++-
 man/corosync.8              |    2 +-
 tools/corosync-cfgtool.c    |   11 +++++++----
 tools/corosync-cmapctl.c    |    2 +-
 tools/corosync-cpgtool.c    |    2 +-
 tools/corosync-keygen.c     |    5 +++--
 tools/corosync-notifyd.c    |    4 ++--
 tools/corosync-quorumtool.c |    7 ++++---
 14 files changed, 47 insertions(+), 39 deletions(-)

diff --git a/exec/main.c b/exec/main.c
index 82fb808..ca54a47 100644
--- a/exec/main.c
+++ b/exec/main.c
@@ -1185,8 +1185,8 @@ int main (int argc, char **argv, char **envp)
 					"usage:\n"\
 					"        -f     : Start application in foreground.\n"\
 					"        -p     : Do not set process priority.\n"\
-					"        -t     : Test configuration and exit.\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");
 				logsys_system_fini();
 				return EXIT_FAILURE;
diff --git a/man/corosync-cfgtool.8 b/man/corosync-cfgtool.8
index 6df8651..b190766 100644
--- a/man/corosync-cfgtool.8
+++ b/man/corosync-cfgtool.8
@@ -35,14 +35,11 @@
 .SH "NAME"
 corosync-cfgtool \- An administrative tool for corosync.
 .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"
 .B corosync\-cfgtool
 A tool for displaying and configuring active parameters within corosync.
 .SH "OPTIONS"
-.TP 
-.B -h
-Print basic usage.
 .TP
 .B -i
 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
 re-enable redundant ring operation.
 .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 
 .B -k
 Kill a node identified by node id.
 .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 
 .B -H
 Shutdown corosync cleanly on this node.
diff --git a/man/corosync-cmapctl.8 b/man/corosync-cmapctl.8
index 661137c..ed97fad 100644
--- a/man/corosync-cmapctl.8
+++ b/man/corosync-cmapctl.8
@@ -35,7 +35,7 @@
 .SH NAME
 corosync-cmapctl: \- A tool for accessing the object database.
 .SH DESCRIPTION
-usage:  corosync\-cmapctl [\-b] [\-dghsTtp] [params...]
+usage:  corosync\-cmapctl [\-b] [\-DdghsTt] [\-p filename] [params...]
 .HP
 \fB\-b\fR show binary values
 .SS "Set key:"
diff --git a/man/corosync-cpgtool.8 b/man/corosync-cpgtool.8
index 8ef32d1..3a62752 100644
--- a/man/corosync-cpgtool.8
+++ b/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.
 .SH OPTIONS
 .TP
-.B -h
-Display this help.
-.TP
 .B -d
 Delimiter between fields.
 .TP
 .B -e
-Don't escape unprintable characters in group name
+Don't escape unprintable characters in group name.
 .TP
 .B -n
 Display only all existing group names.
+.TP
+.B -h
+Display this help.
 .SH EXAMPLES
 .TP
 Display the groups and process that belong to those cpg groups.
diff --git a/man/corosync-keygen.8 b/man/corosync-keygen.8
index 5aaae93..ed04620 100644
--- a/man/corosync-keygen.8
+++ b/man/corosync-keygen.8
@@ -35,7 +35,7 @@
 .SH NAME
 corosync-keygen \- Generate an authentication key for Corosync.
 .SH SYNOPSIS
-.B "corosync-keygen [\-k <filename>] [\-l]"
+.B "corosync-keygen [\-k <filename>] [\-l] [\-h]"
 .SH DESCRIPTION
 
 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
 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).
+.TP
+.B -h
+Print basic usage.
 
 .SH EXAMPLES
 .TP
diff --git a/man/corosync-notifyd.8 b/man/corosync-notifyd.8
index 822d138..40d8d79 100644
--- a/man/corosync-notifyd.8
+++ b/man/corosync-notifyd.8
@@ -35,7 +35,7 @@
 .SH NAME
 corosync-notifyd \- Listen for important corosync events and send dbus and/or snmp traps.
 .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
 .B corosync-notifyd
 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.
 .TP
 .B -m
-Set the SNMP manager address.
+Set the SNMP Manager IP address (defaults to localhost).
 .TP
 .B -d
 Send DBUS signals on all events.
 .TP
 .B -h
-Print this help
+Print this help.
 .SH EXAMPLES
 .br
 $ corosync-notifyd -o
diff --git a/man/corosync-quorumtool.8 b/man/corosync-quorumtool.8
index 9707a70..88264b0 100644
--- a/man/corosync-quorumtool.8
+++ b/man/corosync-quorumtool.8
@@ -35,7 +35,7 @@
 .SH NAME
 corosync-quorumtool \- Set and display quorum settings.
 .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
 Display the current state of quorum in the cluster and set vote quorum options.
 .SH OPTIONS
@@ -49,6 +49,9 @@ constantly monitor quorum status
 .B  -l
 list nodes
 .TP
+.B  -p
+when used with -s or -l, generates machine parsable output
+.TP
 .B  -v <votes>
 change the number of votes for a node *
 .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,
 and -oi will order them based on their node ID.
 .TP
+.B -f
+forcefully unregister a quorum device *DANGEROUS* *
+.TP
 .B  -h (if no other argument)
 show this help text
 .TP
diff --git a/man/corosync.8 b/man/corosync.8
index b5451ad..89ab771 100644
--- a/man/corosync.8
+++ b/man/corosync.8
@@ -35,7 +35,7 @@
 .SH NAME
 corosync \- The Corosync Cluster Engine.
 .SH SYNOPSIS
-.B "corosync [\-f] [\-p] [\-r] [\-v]"
+.B "corosync [\-f] [\-p] [\-r] [\-t] [\-v]"
 .SH DESCRIPTION
 .B corosync
 Corosync provides clustering infrastructure such as membership, messaging and quorum.
diff --git a/tools/corosync-cfgtool.c b/tools/corosync-cfgtool.c
index 94ffce4..201977b 100644
--- a/tools/corosync-cfgtool.c
+++ b/tools/corosync-cfgtool.c
@@ -261,15 +261,17 @@ static void killnode_do(unsigned int nodeid)
 
 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 ("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-r\tReset redundant ring state cluster wide after a fault to\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-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");
 }
 
@@ -306,7 +308,8 @@ int main (int argc, char *argv[]) {
 			shutdown_do();
 			break;
 		case 'a':
-			showaddrs_do( atoi(optarg) );
+			nodeid = atoi (optarg);
+			showaddrs_do(nodeid);
 			break;
 		case 'h':
 			usage_do();
diff --git a/tools/corosync-cmapctl.c b/tools/corosync-cmapctl.c
index d31a73d..af0aa14 100644
--- a/tools/corosync-cmapctl.c
+++ b/tools/corosync-cmapctl.c
@@ -96,7 +96,7 @@ static int convert_name_to_type(const char *name)
 static int print_help(void)
 {
 	printf("\n");
-	printf("usage:  corosync-cmapctl [-b] [-dghsTtp] [params...]\n");
+	printf("usage:  corosync-cmapctl [-b] [-DdghsTt] [-p filename] [params...]\n");
 	printf("\n");
 	printf("    -b show binary values\n");
 	printf("\n");
diff --git a/tools/corosync-cpgtool.c b/tools/corosync-cpgtool.c
index 719d10b..a5fc118 100644
--- a/tools/corosync-cpgtool.c
+++ b/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 ("options:\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-h\tDisplay this help.\n");
 }
diff --git a/tools/corosync-keygen.c b/tools/corosync-keygen.c
index 668d6e9..695ed31 100644
--- a/tools/corosync-keygen.c
+++ b/tools/corosync-keygen.c
@@ -50,13 +50,14 @@
 #define DEFAULT_KEYFILE COROSYSCONFDIR "/authkey"
 
 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"
 	"            instead of the default " DEFAULT_KEYFILE ".\n"
 	"     -l / --less-secure -  Use a less secure random number source\n"
 	"            (/dev/urandom) that is guaranteed not to require user\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[])
diff --git a/tools/corosync-notifyd.c b/tools/corosync-notifyd.c
index 783c637..507a248 100644
--- a/tools/corosync-notifyd.c
+++ b/tools/corosync-notifyd.c
@@ -1093,9 +1093,9 @@ _cs_usage(void)
 		"        -l     : Log all events.\n"\
 		"        -o     : Print events to stdout (turns on -l).\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"\
-		"        -h     : Print this help\n\n");
+		"        -h     : Print this help.\n\n");
 }
 
 int
diff --git a/tools/corosync-quorumtool.c b/tools/corosync-quorumtool.c
index ea5ca28..5fa937d 100644
--- a/tools/corosync-quorumtool.c
+++ b/tools/corosync-quorumtool.c
@@ -157,15 +157,16 @@ static void show_usage(const char *name)
 	printf("  options:\n");
 	printf("\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("  -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("  -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("  -H             show nodeids in hexadecimal rather than decimal\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("  -h             show this help text\n");
 	printf("  -V             show version and exit\n");
-- 
1.7.1