cmap_keys.7 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. .\"/*
  2. .\" * Copyright (c) 2012-2020 Red Hat, Inc.
  3. .\" *
  4. .\" * All rights reserved.
  5. .\" *
  6. .\" * Author: Jan Friesse (jfriesse@redhat.com)
  7. .\" *
  8. .\" * This software licensed under BSD license, the text of which follows:
  9. .\" *
  10. .\" * Redistribution and use in source and binary forms, with or without
  11. .\" * modification, are permitted provided that the following conditions are met:
  12. .\" *
  13. .\" * - Redistributions of source code must retain the above copyright notice,
  14. .\" * this list of conditions and the following disclaimer.
  15. .\" * - Redistributions in binary form must reproduce the above copyright notice,
  16. .\" * this list of conditions and the following disclaimer in the documentation
  17. .\" * and/or other materials provided with the distribution.
  18. .\" * - Neither the name of the Red Hat, Inc. nor the names of its
  19. .\" * contributors may be used to endorse or promote products derived from this
  20. .\" * software without specific prior written permission.
  21. .\" *
  22. .\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  23. .\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24. .\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  25. .\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  26. .\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  27. .\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  28. .\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  29. .\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  30. .\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  31. .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  32. .\" * THE POSSIBILITY OF SUCH DAMAGE.
  33. .\" */
  34. .TH "CMAP_KEYS" 7 "2018-10-08" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
  35. .SH NAME
  36. .P
  37. cmap_keys \- Overview of keys stored in the Configuration Map
  38. .SH OVERVIEW
  39. .P
  40. There are 3 main types of keys stored in CMAP:
  41. .PP
  42. * Mapping of values stored in the config file.
  43. .PP
  44. * Runtime statistics.
  45. .PP
  46. * Other user created values.
  47. In this man page, wild-cards have the usual meaning.
  48. .SH ICMAP KEYS
  49. These keys are in the icmap (default) map
  50. .TP
  51. internal_configuration.*
  52. Internal configuration data. All keys in this prefix are read only.
  53. It's only useful for getting a list of loaded services.
  54. .TP
  55. logging.*
  56. Values read from the configuration file. It's possible to change them at runtime.
  57. If subsystem specific configuration is needed, the key must be in the form
  58. logging.logger_subsys.SERVICE.key, where SERVICE is upper case name of the service and
  59. key is same as in the configuration file. All values are of string type.
  60. .TP
  61. nodelist.*
  62. Values are read from the configuration file only (dynamic updates are not allowed).
  63. Each node element in the configuration file gets
  64. assigned its position starting from zero. So the first node from the config file has
  65. nodelist.node.0. prefix. To be a valid entry, each node must have
  66. .B ring0_addr
  67. key.
  68. To change the
  69. .B nodeid
  70. key, use a u32 data type.
  71. Local node position is stored in
  72. .B local_node_pos
  73. key (RO), so it's easy to find
  74. out nodeid/ring addresses of the local node directly from cmap.
  75. .TP
  76. runtime.blackbox.*
  77. Trigger keys for storing fplay data. It's recommended that you use the corosync-blackbox command
  78. to change keys in this prefix.
  79. .TP
  80. runtime.force_gather
  81. Set to 'yes' to force the processor to move into the GATHER state. This operation
  82. is dangerous and is not recommended.
  83. .TP
  84. runtime.config.*
  85. Contains the values actually in use by the totem membership protocol.
  86. Values here are either taken from the Corosync configuration file,
  87. defaults or computed from entries in the config file. For information
  88. on individual keys please refer to the man page
  89. .BR corosync.conf (5).
  90. .TP
  91. runtime.services.*
  92. Prefix with statistics for service engines. Each service has its own
  93. .B service_id
  94. key in the prefix with the name runtime.services.SERVICE., where SERVICE is the lower case
  95. name of the service. Inside the service prefix is the number of messages received and sent
  96. by the corosync engine in the format runtime.services.SERVICE.EXEC_CALL.rx and
  97. runtime.services.SERVICE.EXEC_CALL.tx, where EXEC_CALL is the internal id of the service
  98. call (so for example 3 in cpg service is receive of multicast message from other
  99. nodes).
  100. .TP
  101. runtime.totem.members.*
  102. Prefix containing members of the totem single ring protocol. Each member
  103. keys has format runtime.totem.members.NODEID.KEY, where key is
  104. one of:
  105. .B config_version
  106. Config version of the member node.
  107. .TP
  108. resources.process.PID.*
  109. Prefix created by applications using SAM with CMAP integration.
  110. It contains the following keys:
  111. .B recovery
  112. Recovery policy of the process. Can be one of quit or restart.
  113. .B poll_period
  114. Value passed in sam_initialize as a time_interval.
  115. .B last_updated
  116. Last time SAM received a heartbeat from the client.
  117. .B state
  118. State of the client. Can be one of failed, stopped, running and waiting for quorum.
  119. .TP
  120. uidgid.*
  121. Information about users/groups which are allowed to make IPC connections to
  122. corosync. Entries loaded from configuration file are stored with
  123. uidgid.config.* prefix and are pruned on configuration file reload. Dynamic
  124. entries has uidgid.* prefix and a configuration file reload doesn't affect them.
  125. .TP
  126. quorum.cancel_wait_for_all
  127. Tells votequorum to cancel waiting for all nodes at cluster startup. Can be used
  128. to unblock quorum if notes are known to be down. For pcs use only.
  129. .TP
  130. config.reload_in_progress
  131. This value will be set to 1 (or created) when a corosync.conf reload is started,
  132. and set to 0 when the reload is completed. This allows interested subsystems
  133. to do atomic reconfiguration rather than changing each key. Note that
  134. individual add/change/delete notifications will still be sent during a reload.
  135. .TP
  136. config.totemconfig_reload_in_progress
  137. This key is similar to
  138. .B config.totemconfig_reload_in_progress
  139. but changed after the totem config trigger is processed. It is useful (mainly)
  140. for situations when
  141. .B nodelist.local_node_pos
  142. must be correctly reinstated before anything else.
  143. .SH STATS KEYS
  144. These keys are in the stats map. All keys in this map are read-only.
  145. Modification tracking of individual keys is supported in the stats map, but not
  146. prefixes. Add/Delete operations are supported on prefixes though so you can track
  147. for new ipc connections or knet interfaces.
  148. .TP
  149. stats.srp.*
  150. Prefix containing statistics about totem.
  151. Typical key prefixes:
  152. .B commit_entered
  153. Number of times the processor entered COMMIT state.
  154. .B commit_token_lost
  155. Number of times the processor lost token in COMMIT state.
  156. .B consensus_timeouts
  157. How many times the processor timed out forming a consensus about membership.
  158. .B continuous_gather
  159. How many times the processor was not able to reach consensus.
  160. .B firewall_enabled_or_nic_failure
  161. Set to 1 when processor was not able to reach consensus for long time. The usual
  162. reason is a badly configured firewall or connection failure.
  163. .B gather_entered
  164. Number of times the processor entered GATHER state.
  165. .B gather_token_lost
  166. Number of times the processor lost token in GATHER state.
  167. .B mcast_retx
  168. Number of retransmitted messages.
  169. .B mcast_rx
  170. Number of received multicast messages.
  171. .B mcast_tx
  172. Number of transmitted multicast messages.
  173. .B memb_commit_token_rx
  174. Number of received commit tokens.
  175. .B memb_commit_token_tx
  176. Number of transmitted commit tokens.
  177. .B memb_join_rx
  178. Number of received join messages.
  179. .B memb_join_tx
  180. Number of transmitted join messages.
  181. .B memb_merge_detect_rx
  182. Number of received member merge messages.
  183. .B memb_merge_detect_tx
  184. Number of transmitted member merge messages.
  185. .B orf_token_rx
  186. Number of received orf tokens.
  187. .B orf_token_tx
  188. Number of transmitted orf tokens.
  189. .B recovery_entered
  190. Number of times the processor entered recovery.
  191. .B recovery_token_lost
  192. Number of times the token was lost in recovery state.
  193. .B rx_msg_dropped
  194. Number of received messages which were dropped because they were not expected
  195. (as example multicast message in commit state).
  196. .B token_hold_cancel_rx
  197. Number of received token hold cancel messages.
  198. .B token_hold_cancel_tx
  199. Number of transmitted token hold cancel messages.
  200. .B mtt_rx_token
  201. Mean transit time of token in milliseconds. In other words, time between
  202. two consecutive token receives.
  203. .B avg_token_workload
  204. Average time in milliseconds of holding time of token on the current processor.
  205. .B avg_backlog_calc
  206. Average number of not yet sent messages on the current processor.
  207. .TP
  208. stats.knet.nodeX.linkY.*
  209. Statistics about the network traffic to and from each node and link when using
  210. tke kronosnet transport
  211. .B connected
  212. Whether the link is connected or not
  213. .B up_count
  214. Number of times this link has changed state to UP
  215. .B down_count
  216. Number of times this link has changed state to DOWN
  217. .B latency_ave / latency_max / latency_max
  218. Calculated latencies of this link. Note that if there has been no traffic
  219. on the link then latency_min will show a very large number.
  220. .B latency_samples
  221. The number of samples used to calculate the latency figures, so you have
  222. some idea of their precision.
  223. .B rx_data_packets / tx_data_packets
  224. The number of packets sent/received on this link
  225. .B rx_data_bytes / tx_data_bytes
  226. The number of bytes sent/received on this link
  227. .B rx_pmtu_packets / tx_pmtu_packets
  228. The number of packets sent/received by the PMTUd subsystem
  229. .B rx_pmtu_bytes / tx_pmtu_bytes
  230. The number of bytes sent/received by the PMTUd subsystem
  231. .B rx_ping_packets / tx_ping_packets
  232. The number of packets sent/received as pings
  233. .B rx_ping_bytes / tx_ping_bytes
  234. The number of bytes sent/received as pings
  235. .B rx_pong_packets / tx_pong_packets
  236. The number of packets sent/received as pongs
  237. .B rx_pong_bytes / tx_pong_bytes
  238. The number of bytes sent/received as pongs
  239. .B rx_total_packets / tx_total_packets
  240. The total number of packets sent/received. The aggregate of all of the above packet stats
  241. .B rx_total_bytes / tx_total_bytes
  242. The total number of bytes sent/received. The aggregate of all of the above bytes stats
  243. .B tx_data_retries / tx_pmtu_retries / tx_ping_retries / tx_pong_retries / tx_total_retries
  244. Number of times a transmit operation had to be retried due to the socket returning EAGAIN
  245. .TP
  246. stats.ipcs.*
  247. There is information about total number of active connections from client programs
  248. at the time the request was made.
  249. .B active
  250. number of closed connections during whole runtime of corosync
  251. .B closed
  252. Total number of connections that have been made since corosync was started
  253. .TP
  254. stats.ipcs.ID.*
  255. Each IPC connection has a unique ID. This is in the form [[serviceX:][PID:]internal_id.
  256. Typical keys in this prefix are:
  257. .B proc_name
  258. process name of connected process (unavailable on some platforms)
  259. .B dispatched
  260. number of dispatched messages.
  261. .B invalid_request
  262. number of requests made by IPC which are invalid (calling non-existing call, ...).
  263. .B name
  264. contains short name of the IPC connection (unavailable on some platforms).
  265. .B overload
  266. is number of requests which were not processed because of overload.
  267. .B queue_size
  268. contains the number of messages in the queue waiting for send.
  269. .B recv_retries
  270. is the total number of interrupted receives.
  271. .B requests
  272. contains the number of requests made by IPC.
  273. .B responses
  274. is the number of responses sent to the IPC client.
  275. .B send_retries
  276. contains the total number of interrupted sends.
  277. .B service_id
  278. contains the ID of service which the IPC is connected to.
  279. .TP
  280. stats.schedmiss.<n>.*
  281. If corosync is not scheduled after the required period of time it will
  282. log this event and also write an entry to the stats cmap under this key.
  283. There can be up to 10 entries (0..9) in here, when an 11th event happens
  284. the earliest will be removed.
  285. These events will always be in reverse order, so stats.schedmiss.0.* will
  286. always be the latest event kept and 9 the oldest. If you want to listen
  287. for notifications then you are recommended to listen for changes
  288. to stats.schedmiss.0.timestamp or stats.schedmiss.0.delay.
  289. .B timestamp
  290. The time of the event in ms since the Epoch (ie time_t * 1000 but with
  291. valid milliseconds).
  292. .B delay
  293. The time that corosync was paused (in ms, float value).
  294. .TP
  295. stats.clear.*
  296. These are write-only keys used to clear the stats for various subsystems
  297. .B totem
  298. Clears the pg & srp totem stats.
  299. .B knet
  300. Clears the knet stats
  301. .B ipc
  302. Clears the ipc stats
  303. .B schedmiss
  304. Clears the schedmiss stats
  305. .B all
  306. Clears all of the above stats
  307. .SH DYNAMIC CHANGE USER/GROUP PERMISSION TO USE COROSYNC IPC
  308. Is the same as in the configuration file. eg: to add UID 500 use
  309. .br
  310. # corosync-cmapctl -s uidgid.uid.500 u8 1
  311. GID is similar, so to add a GID use
  312. .br
  313. # corosync-cmapctl -s uidgid.gid.500 u8 1
  314. For removal of permissions, simply delete the key
  315. .br
  316. # corosync-cmapctl -d uidgid.gid.500
  317. .SH "SEE ALSO"
  318. .BR corosync_overview (7),
  319. .BR corosync.conf (5),
  320. .BR corosync-cmapctl (8)