summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyle Bader <kyle.bader@dreamhost.com>2012-07-03 11:20:38 -0700
committerSage Weil <sage@inktank.com>2012-07-03 11:20:43 -0700
commit32833e88a1ad793fa4be86101ce9c22b6f677c06 (patch)
treec76344f79192e05e039531f0607c3d3976969912 /src
parent67455c21879c9c117f6402259b5e2da84524e169 (diff)
downloadceph-32833e88a1ad793fa4be86101ce9c22b6f677c06.tar.gz
ceph: better usage
Signed-off-by: Kyle Bader <kyle.bader@dreamhost.com>
Diffstat (limited to 'src')
-rw-r--r--src/common/ceph_argparse.cc14
-rw-r--r--src/tools/ceph.cc79
2 files changed, 74 insertions, 19 deletions
diff --git a/src/common/ceph_argparse.cc b/src/common/ceph_argparse.cc
index a6ef1d31a22..4444040415d 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 b799a0610d1..caa338cf69c 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-ip-or-host> mon_status\n";
+ cout << "\n";
+ cout << "AUTHENTICATION (AUTH) COMMANDS\n";
+ cout << " ceph auth get-or-create[-key] <name> [capsys1 capval1 [...]]\n";
+ cout << " ceph auth del <name>\n";
+ cout << " ceph auth list\n";
+ cout << "\n";
+ cout << "METADATA SERVER (MDS) COMMANDS\n";
+ cout << " ceph mds stat\n";
+ cout << " ceph mds tell <mds-id or *> injectargs '--<switch> <value> [--<switch> <value>...]'\n";
+ cout << "\n";
+ cout << "MONITOR (MON) COMMANDS\n";
+ cout << " ceph mon add <name> <ip>[:<port>]\n";
+ cout << " ceph mon delete <name>\n";
+ cout << " ceph mon stat\n";
+ cout << " ceph mon tell <mon-id or *> injectargs '--<switch> <value> [--<switch> <value>...]'\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 <osd-id>\n";
+ cout << " ceph osd in <osd-id>\n";
+ cout << " ceph osd out <osd-id>\n";
+ cout << " ceph osd set <noout|noin|nodown|noup>\n";
+ cout << " ceph osd unset <noout|noin|nodown|noup>\n";
+ cout << " ceph osd pause\n";
+ cout << " ceph osd unpause\n";
+ cout << " ceph osd tell <osd-id or *> injectargs '--<switch> <value> [--<switch> <value>...]'\n";
+ cout << " ceph osd getcrushmap -o <file>\n";
+ cout << " ceph osd getmap -o <file>\n";
+ cout << " ceph osd crush set <osd-id> <name> <weight> [<loc1> [<loc2> ...]]\n";
+ cout << " ceph osd crush move <bucketname> <loc1> [<loc2> ...]\n";
+ cout << " ceph osd crush reweight <name> <weight>\n";
+ cout << " ceph osd create [<osd-id>]\n";
+ cout << " ceph osd rm <osd-id> [<osd-id>...]\n";
+ cout << " ceph osd lost [--yes-i-really-mean-it]\n";
+ cout << " ceph osd reweight <osd-id> <weight>\n";
+ cout << " ceph osd blacklist add <address>[:source_port] [time]\n";
+ cout << " ceph osd blacklist rm <address>[:source_port]\n";
+ cout << " ceph osd pool mksnap <pool> <snapname>\n";
+ cout << " ceph osd pool rmsnap <pool> <snapname>\n";
+ cout << " ceph osd pool create <pool> [<pg_num> [<pgp_num>]]\n";
+ cout << " ceph osd pool delete <pool>\n";
+ cout << " ceph osd pool rename <pool> <new pool name>\n";
+ cout << " ceph osd pool set <pool> <field> <value>\n";
+ cout << " ceph osd scrub <osd-id>\n";
+ cout << " ceph osd repair <osd-id>\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 <pg-id> query\n";
+ cout << " ceph pg scrub <pg-id>\n";
+ cout << " ceph pg map <pg-id>\n";
+ cout << "\n";
+ cout << "OPTIONS\n";
+ cout << " -o <file> Write out to <file>\n";
+ cout << " -i <file> Read input from <file> (for some commands)\n";
generic_client_usage(); // Will exit()
}