summaryrefslogtreecommitdiffstats
path: root/doc/man/8/ceph-conf.rst
blob: b8b99c2aab163ba32e618410a38ae3c3f8127ed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
:orphan:

==================================
 ceph-conf -- ceph conf file tool
==================================

.. program:: ceph-conf

Synopsis
========

| **ceph-conf** -c *conffile* --list-all-sections
| **ceph-conf** -c *conffile* -L
| **ceph-conf** -c *conffile* -l *prefix*
| **ceph-conf** *key* -s *section1* ...
| **ceph-conf** [-s *section* ] [-r] --lookup *key*
| **ceph-conf** [-s *section* ] *key*


Description
===========

**ceph-conf** is a utility for getting information from a ceph
configuration file. As with most Ceph programs, you can specify which
Ceph configuration file to use with the ``-c`` flag.

Note that unlike other ceph tools, **ceph-conf** will *only* read from
config files (or return compiled-in default values)--it will *not*
fetch config values from the monitor cluster.  For this reason it is
recommended that **ceph-conf** only be used in legacy environments
that are strictly config-file based.  New deployments and tools should
instead rely on either querying the monitor explicitly for
configuration (e.g., ``ceph config get <daemon> <option>``) or use
daemons themselves to fetch effective config options (e.g.,
``ceph-osd -i 123 --show-config-value osd_data``).  The latter option
has the advantages of drawing from compiled-in defaults (which
occasionally vary between daemons), config files, and the monitor's
config database, providing the exact value that that daemon would be
using if it were started.

Actions
=======

**ceph-conf** performs one of the following actions:

.. option:: -L, --list-all-sections

   list all sections in the configuration file.

.. option:: -l, --list-sections *prefix*

   list the sections with the given *prefix*. For example, ``--list-sections mon``
   would list all sections beginning with ``mon``.

.. option:: --lookup *key*

   search and print the specified configuration setting. Note:  ``--lookup`` is
   the default action. If no other actions are given on the command line, we will
   default to doing a lookup.

.. option:: -h, --help

   print a summary of usage.


Options
=======

.. option:: -c *conffile*

   the Ceph configuration file.

.. option:: --filter-key *key*

   filter section list to only include sections with given *key* defined.

.. option:: --filter-key-value *key* ``=`` *value*

   filter section list to only include sections with given *key*/*value* pair.

.. option:: --name *type.id*

   the Ceph name in which the sections are searched (default 'client.admin').
   For example, if we specify ``--name osd.0``, the following sections will be
   searched: [osd.0], [osd], [global]

.. option:: --pid *pid*

   override the ``$pid`` when expanding options. For example, if an option is
   configured like ``/var/log/$name.$pid.log``, the ``$pid`` portion in its
   value will be substituded using the PID of **ceph-conf** instead of the
   PID of the process specfied using the ``--name`` option.

.. option:: -r, --resolve-search

   search for the first file that exists and can be opened in the resulted
   comma delimited search list.

.. option:: -s, --section

   additional sections to search.  These additional sections will be searched
   before the sections that would normally be searched. As always, the first
   matching entry we find will be returned.


Examples
========

To find out what value osd 0 will use for the "osd data" option::

        ceph-conf -c foo.conf  --name osd.0 --lookup "osd data"

To find out what value will mds a use for the "log file" option::

        ceph-conf -c foo.conf  --name mds.a "log file"

To list all sections that begin with "osd"::

        ceph-conf -c foo.conf -l osd

To list all sections::

        ceph-conf -c foo.conf -L

To print the path of the "keyring" used by "client.0"::

       ceph-conf --name client.0 -r -l keyring


Files
=====

``/etc/ceph/$cluster.conf``, ``~/.ceph/$cluster.conf``, ``$cluster.conf``

the Ceph configuration files to use if not specified.


Availability
============

**ceph-conf** is part of Ceph, a massively scalable, open-source, distributed storage system.  Please refer
to the Ceph documentation at http://ceph.com/docs for more
information.


See also
========

:doc:`ceph <ceph>`\(8),