From 32833e88a1ad793fa4be86101ce9c22b6f677c06 Mon Sep 17 00:00:00 2001 From: Kyle Bader Date: Tue, 3 Jul 2012 11:20:38 -0700 Subject: [PATCH] ceph: better usage Signed-off-by: Kyle Bader --- src/common/ceph_argparse.cc | 14 +++---- src/tools/ceph.cc | 79 +++++++++++++++++++++++++++++++------ 2 files changed, 74 insertions(+), 19 deletions(-) diff --git a/src/common/ceph_argparse.cc b/src/common/ceph_argparse.cc index a6ef1d31a2294..4444040415d6f 100644 --- a/src/common/ceph_argparse.cc +++ b/src/common/ceph_argparse.cc @@ -423,16 +423,16 @@ CephInitParameters ceph_argparse_early_args static void generic_usage(bool is_server) { cout << "\ ---conf/-c Read configuration from the given configuration file\n\ --d Run in foreground, log to stderr.\n\ --f Run in foreground, log to usual location.\n\ ---id/-i set ID portion of my name\n\ ---name/-n set name (TYPE.ID)\n\ ---version show version and quit\n\ + --conf/-c Read configuration from the given configuration file\n\ + -d Run in foreground, log to stderr.\n\ + -f Run in foreground, log to usual location.\n\ + --id/-i set ID portion of my name\n\ + --name/-n set name (TYPE.ID)\n\ + --version show version and quit\n\ " << std::endl; if (is_server) { - cout << " --debug_ms N\n"; + cout << " --debug_ms N\n"; cout << " set message debug level (e.g. 1)\n"; } } diff --git a/src/tools/ceph.cc b/src/tools/ceph.cc index b799a0610d183..caa338cf69cad 100644 --- a/src/tools/ceph.cc +++ b/src/tools/ceph.cc @@ -43,19 +43,74 @@ void do_status(CephToolCtx *ctx, bool shutdown = false); static void usage() { - cout << "usage: ceph [options] [commands]\n"; + cout << "usage:\n"; + cout << " ceph [options] [command]\n"; + cout << " ceph -s cluster status summary\n"; + cout << " ceph -w running cluster summary and events\n"; + cout << "\n"; cout << "If no commands are specified, enter interactive mode.\n"; - cout << "Commands:\n"; - cout << " (osd|pg|mds) stat -- get monitor subsystem status\n" - << " ...\n"; - cout << "Options:\n"; - cout << " -i infile\n" - << " -o outfile\n" - << " specify input or output file (for certain commands)\n" - << " -s or --status\n" - << " print current system status\n" - << " -w or --watch\n" - << " watch system status changes in real time (push)\n"; + cout << "\n"; + cout << "CLUSTER COMMANDS\n"; + cout << " ceph health [detail]\n"; + cout << " ceph quorum_status\n"; + cout << " ceph -m mon_status\n"; + cout << "\n"; + cout << "AUTHENTICATION (AUTH) COMMANDS\n"; + cout << " ceph auth get-or-create[-key] [capsys1 capval1 [...]]\n"; + cout << " ceph auth del \n"; + cout << " ceph auth list\n"; + cout << "\n"; + cout << "METADATA SERVER (MDS) COMMANDS\n"; + cout << " ceph mds stat\n"; + cout << " ceph mds tell injectargs '-- [-- ...]'\n"; + cout << "\n"; + cout << "MONITOR (MON) COMMANDS\n"; + cout << " ceph mon add [:]\n"; + cout << " ceph mon delete \n"; + cout << " ceph mon stat\n"; + cout << " ceph mon tell injectargs '-- [-- ...]'\n"; + cout << "\n"; + cout << "OBJECT STORAGE DEVICE (OSD) COMMANDS\n"; + cout << " ceph osd dump [--format=json]\n"; + cout << " ceph osd tree\n"; + cout << " ceph osd down \n"; + cout << " ceph osd in \n"; + cout << " ceph osd out \n"; + cout << " ceph osd set \n"; + cout << " ceph osd unset \n"; + cout << " ceph osd pause\n"; + cout << " ceph osd unpause\n"; + cout << " ceph osd tell injectargs '-- [-- ...]'\n"; + cout << " ceph osd getcrushmap -o \n"; + cout << " ceph osd getmap -o \n"; + cout << " ceph osd crush set [ [ ...]]\n"; + cout << " ceph osd crush move [ ...]\n"; + cout << " ceph osd crush reweight \n"; + cout << " ceph osd create []\n"; + cout << " ceph osd rm [...]\n"; + cout << " ceph osd lost [--yes-i-really-mean-it]\n"; + cout << " ceph osd reweight \n"; + cout << " ceph osd blacklist add
[:source_port] [time]\n"; + cout << " ceph osd blacklist rm
[:source_port]\n"; + cout << " ceph osd pool mksnap \n"; + cout << " ceph osd pool rmsnap \n"; + cout << " ceph osd pool create [ []]\n"; + cout << " ceph osd pool delete \n"; + cout << " ceph osd pool rename \n"; + cout << " ceph osd pool set \n"; + cout << " ceph osd scrub \n"; + cout << " ceph osd repair \n"; + cout << " ceph osd tell N bench [bytes per write] [total bytes]\n"; + cout << "\n"; + cout << "PLACEMENT GROUP (PG) COMMANDS\n"; + cout << " ceph pg dump\n"; + cout << " ceph pg query\n"; + cout << " ceph pg scrub \n"; + cout << " ceph pg map \n"; + cout << "\n"; + cout << "OPTIONS\n"; + cout << " -o Write out to \n"; + cout << " -i Read input from (for some commands)\n"; generic_client_usage(); // Will exit() } -- 2.39.5