]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/mon/mds: unify usage text, always use stdout 15176/head
authorTim Serong <tserong@suse.com>
Fri, 19 May 2017 12:23:54 +0000 (22:23 +1000)
committerTim Serong <tserong@suse.com>
Fri, 19 May 2017 12:44:22 +0000 (22:44 +1000)
This unifies the first line of usage text: angle brackets
to indicate a mandatory option, and uppercase ID to match
the output from generic_server_usage().  It also ensures
ceph-mon prints all of its usage information to stdout,
same as the other daemons.

Signed-off-by: Tim Serong <tserong@suse.com>
src/ceph_mds.cc
src/ceph_mon.cc
src/ceph_osd.cc

index 7c2a9503478ec8259a33c64d3ca7b6de2838db89..b6cff8348ebaa4ab7b751a60b700778619a3d312 100644 (file)
@@ -53,7 +53,7 @@ using namespace std;
 
 static void usage()
 {
-  cout << "usage: ceph-mds -i name [flags] [[--hot-standby][rank]]\n"
+  cout << "usage: ceph-mds -i <ID> [flags] [[--hot-standby][rank]]\n"
        << "  -m monitorip:port\n"
        << "        connect to monitor at given address\n"
        << "  --debug_mds n\n"
index 6e8fd1d5749e54bb32d7958695c0d7055b68b11e..a7be9694a922a631a4f183b21b050e776823821f 100644 (file)
@@ -158,25 +158,26 @@ int check_mon_data_empty()
 
 static void usage()
 {
-  cerr << "usage: ceph-mon -i monid [flags]" << std::endl;
-  cerr << "  --debug_mon n\n";
-  cerr << "        debug monitor level (e.g. 10)\n";
-  cerr << "  --mkfs\n";
-  cerr << "        build fresh monitor fs\n";
-  cerr << "  --force-sync\n";
-  cerr << "        force a sync from another mon by wiping local data (BE CAREFUL)\n";
-  cerr << "  --yes-i-really-mean-it\n";
-  cerr << "        mandatory safeguard for --force-sync\n";
-  cerr << "  --compact\n";
-  cerr << "        compact the monitor store\n";
-  cerr << "  --osdmap <filename>\n";
-  cerr << "        only used when --mkfs is provided: load the osdmap from <filename>\n";
-  cerr << "  --inject-monmap <filename>\n";
-  cerr << "        write the <filename> monmap to the local monitor store and exit\n";
-  cerr << "  --extract-monmap <filename>\n";
-  cerr << "        extract the monmap from the local monitor store and exit\n";
-  cerr << "  --mon-data <directory>\n";
-  cerr << "        where the mon store and keyring are located\n";
+  cout << "usage: ceph-mon -i <ID> [flags]\n"
+       << "  --debug_mon n\n"
+       << "        debug monitor level (e.g. 10)\n"
+       << "  --mkfs\n"
+       << "        build fresh monitor fs\n"
+       << "  --force-sync\n"
+       << "        force a sync from another mon by wiping local data (BE CAREFUL)\n"
+       << "  --yes-i-really-mean-it\n"
+       << "        mandatory safeguard for --force-sync\n"
+       << "  --compact\n"
+       << "        compact the monitor store\n"
+       << "  --osdmap <filename>\n"
+       << "        only used when --mkfs is provided: load the osdmap from <filename>\n"
+       << "  --inject-monmap <filename>\n"
+       << "        write the <filename> monmap to the local monitor store and exit\n"
+       << "  --extract-monmap <filename>\n"
+       << "        extract the monmap from the local monitor store and exit\n"
+       << "  --mon-data <directory>\n"
+       << "        where the mon store and keyring are located\n"
+       << std::endl;
   generic_server_usage();
 }
 
index f4d28751a1688c90f850bd15498d0a5129fa6726..16c4dc231e59bf361259035da51a447314ae4343 100644 (file)
@@ -69,7 +69,7 @@ void handle_osd_signal(int signum)
 
 static void usage()
 {
-  cout << "usage: ceph-osd -i <osdid>\n"
+  cout << "usage: ceph-osd -i <ID> [flags]\n"
        << "  --osd-data PATH data directory\n"
        << "  --osd-journal PATH\n"
        << "                    journal file or block device\n"