]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | :orphan: |
2 | ||
3 | ================================== | |
4 | ceph-conf -- ceph conf file tool | |
5 | ================================== | |
6 | ||
7 | .. program:: ceph-conf | |
8 | ||
9 | Synopsis | |
10 | ======== | |
11 | ||
12 | | **ceph-conf** -c *conffile* --list-all-sections | |
13 | | **ceph-conf** -c *conffile* -L | |
14 | | **ceph-conf** -c *conffile* -l *prefix* | |
15 | | **ceph-conf** *key* -s *section1* ... | |
16 | | **ceph-conf** [-s *section* ] [-r] --lookup *key* | |
17 | | **ceph-conf** [-s *section* ] *key* | |
18 | ||
19 | ||
20 | Description | |
21 | =========== | |
22 | ||
11fdf7f2 | 23 | **ceph-conf** is a utility for getting information from a ceph |
7c673cae FG |
24 | configuration file. As with most Ceph programs, you can specify which |
25 | Ceph configuration file to use with the ``-c`` flag. | |
26 | ||
11fdf7f2 TL |
27 | Note that unlike other ceph tools, **ceph-conf** will *only* read from |
28 | config files (or return compiled-in default values)--it will *not* | |
29 | fetch config values from the monitor cluster. For this reason it is | |
30 | recommended that **ceph-conf** only be used in legacy environments | |
31 | that are strictly config-file based. New deployments and tools should | |
32 | instead rely on either querying the monitor explicitly for | |
33 | configuration (e.g., ``ceph config get <daemon> <option>``) or use | |
34 | daemons themselves to fetch effective config options (e.g., | |
35 | ``ceph-osd -i 123 --show-config-value osd_data``). The latter option | |
36 | has the advantages of drawing from compiled-in defaults (which | |
37 | occasionally vary between daemons), config files, and the monitor's | |
38 | config database, providing the exact value that that daemon would be | |
39 | using if it were started. | |
7c673cae FG |
40 | |
41 | Actions | |
42 | ======= | |
43 | ||
44 | **ceph-conf** performs one of the following actions: | |
45 | ||
46 | .. option:: -L, --list-all-sections | |
47 | ||
48 | list all sections in the configuration file. | |
49 | ||
50 | .. option:: -l, --list-sections *prefix* | |
51 | ||
52 | list the sections with the given *prefix*. For example, ``--list-sections mon`` | |
53 | would list all sections beginning with ``mon``. | |
54 | ||
55 | .. option:: --lookup *key* | |
56 | ||
57 | search and print the specified configuration setting. Note: ``--lookup`` is | |
58 | the default action. If no other actions are given on the command line, we will | |
59 | default to doing a lookup. | |
60 | ||
61 | .. option:: -h, --help | |
62 | ||
63 | print a summary of usage. | |
64 | ||
65 | ||
66 | Options | |
67 | ======= | |
68 | ||
69 | .. option:: -c *conffile* | |
70 | ||
71 | the Ceph configuration file. | |
72 | ||
73 | .. option:: --filter-key *key* | |
74 | ||
75 | filter section list to only include sections with given *key* defined. | |
76 | ||
77 | .. option:: --filter-key-value *key* ``=`` *value* | |
78 | ||
79 | filter section list to only include sections with given *key*/*value* pair. | |
80 | ||
81 | .. option:: --name *type.id* | |
82 | ||
83 | the Ceph name in which the sections are searched (default 'client.admin'). | |
84 | For example, if we specify ``--name osd.0``, the following sections will be | |
85 | searched: [osd.0], [osd], [global] | |
86 | ||
f67539c2 TL |
87 | .. option:: --pid *pid* |
88 | ||
89 | override the ``$pid`` when expanding options. For example, if an option is | |
90 | configured like ``/var/log/$name.$pid.log``, the ``$pid`` portion in its | |
20effc67 TL |
91 | value will be substituted using the PID of **ceph-conf** instead of the |
92 | PID of the process specified using the ``--name`` option. | |
f67539c2 | 93 | |
7c673cae FG |
94 | .. option:: -r, --resolve-search |
95 | ||
96 | search for the first file that exists and can be opened in the resulted | |
97 | comma delimited search list. | |
98 | ||
99 | .. option:: -s, --section | |
100 | ||
101 | additional sections to search. These additional sections will be searched | |
102 | before the sections that would normally be searched. As always, the first | |
103 | matching entry we find will be returned. | |
104 | ||
105 | ||
106 | Examples | |
107 | ======== | |
108 | ||
109 | To find out what value osd 0 will use for the "osd data" option:: | |
110 | ||
111 | ceph-conf -c foo.conf --name osd.0 --lookup "osd data" | |
112 | ||
113 | To find out what value will mds a use for the "log file" option:: | |
114 | ||
115 | ceph-conf -c foo.conf --name mds.a "log file" | |
116 | ||
117 | To list all sections that begin with "osd":: | |
118 | ||
119 | ceph-conf -c foo.conf -l osd | |
120 | ||
121 | To list all sections:: | |
122 | ||
123 | ceph-conf -c foo.conf -L | |
124 | ||
125 | To print the path of the "keyring" used by "client.0":: | |
126 | ||
127 | ceph-conf --name client.0 -r -l keyring | |
128 | ||
129 | ||
130 | Files | |
131 | ===== | |
132 | ||
133 | ``/etc/ceph/$cluster.conf``, ``~/.ceph/$cluster.conf``, ``$cluster.conf`` | |
134 | ||
135 | the Ceph configuration files to use if not specified. | |
136 | ||
137 | ||
138 | Availability | |
139 | ============ | |
140 | ||
141 | **ceph-conf** is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer | |
20effc67 | 142 | to the Ceph documentation at https://docs.ceph.com for more |
7c673cae FG |
143 | information. |
144 | ||
145 | ||
146 | See also | |
147 | ======== | |
148 | ||
149 | :doc:`ceph <ceph>`\(8), |