|
1 | 1 | CLI API Commands Module |
2 | 2 | ======================= |
3 | 3 |
|
4 | | -The CLI API module exposes most ceph-mgr python API via CLI. Furthermore, this API can be |
5 | | -benchmarked for further testing. |
| 4 | +The CLI API module exposes most of the ceph-mgr Python API via CLI. This API |
| 5 | +can be benchmarked for further testing. |
6 | 6 |
|
7 | 7 | Enabling |
8 | 8 | -------- |
9 | 9 |
|
10 | | -The *cli api commands* module is enabled with:: |
| 10 | +Enable the ``cli api commands`` module by running the following command: |
11 | 11 |
|
12 | | - ceph mgr module enable cli_api |
| 12 | +.. prompt:: bash # |
13 | 13 |
|
14 | | -To check that it is enabled, run:: |
| 14 | + ceph mgr module enable cli_api |
15 | 15 |
|
16 | | - ceph mgr module ls | grep cli_api |
| 16 | +Ensure that the ``cli api commands`` module is enabled by running the following |
| 17 | +command: |
| 18 | + |
| 19 | +.. prompt:: bash # |
| 20 | + |
| 21 | + ceph mgr module ls | grep cli_api |
17 | 22 |
|
18 | 23 | Usage |
19 | 24 | -------- |
20 | 25 |
|
21 | | -To run a mgr module command, run:: |
| 26 | +This the the general form of Manager module commands: |
| 27 | + |
| 28 | +.. prompt:: bash # |
| 29 | + |
| 30 | + ceph mgr cli <command> <param> |
| 31 | + |
| 32 | +Print the list of servers by running the following command: |
| 33 | + |
| 34 | +.. prompt:: bash # |
| 35 | + |
| 36 | + ceph mgr cli list_servers |
22 | 37 |
|
23 | | - ceph mgr cli <command> <param> |
| 38 | +List all available mgr module commands by running the following command: |
24 | 39 |
|
25 | | -For example, use the following command to print the list of servers:: |
| 40 | +.. prompt:: bash # |
26 | 41 |
|
27 | | - ceph mgr cli list_servers |
| 42 | + ceph mgr cli --help |
28 | 43 |
|
29 | | -List all available mgr module commands with:: |
| 44 | +Benchmark a command, by running a command of the following form: |
30 | 45 |
|
31 | | - ceph mgr cli --help |
| 46 | +.. prompt:: bash # |
32 | 47 |
|
33 | | -To benchmark a command, run:: |
| 48 | + ceph mgr cli_benchmark <number of calls> <number of threads> <command> <param> |
34 | 49 |
|
35 | | - ceph mgr cli_benchmark <number of calls> <number of threads> <command> <param> |
| 50 | +For example, run the following command to benchmark the command to get |
| 51 | +``osd_map``: |
36 | 52 |
|
37 | | -For example, use the following command to benchmark the command to get osd_map:: |
| 53 | +.. prompt:: bash # |
38 | 54 |
|
39 | | - ceph mgr cli_benchmark 100 10 get osd_map |
| 55 | + ceph mgr cli_benchmark 100 10 get osd_map |
0 commit comments