cmap_keys.8 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. .\"/*
  2. .\" * Copyright (c) 2012-2017 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" 8 "10/10/2012" "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 read from the configuration file. Each node element in the configuration file gets
  63. assigned it's position starting from zero. So the first node from the config file has
  64. nodelist.node.0. prefix. To be a valid entry, each node must have
  65. .B ring0_addr
  66. key.
  67. To change the
  68. .B nodeid
  69. key, use a u32 data type.
  70. Local node position is stored in
  71. .B local_node_pos
  72. key (RO), so it's easy to find
  73. out nodeid/ring addresses of the local node directly from cmap.
  74. .TP
  75. runtime.blackbox.*
  76. Trigger keys for storing fplay data. It's recommended that you the corosync-blackbox command
  77. to change keys in this prefix.
  78. .TP
  79. runtime.config.*
  80. Contains the values actually in use by the totem membership protocol.
  81. Values here are either taken from the Corosync configuration file,
  82. defaults or computed from entries in the config file. For information
  83. on individual keys please refer to the man page
  84. .BR corosync.conf (5).
  85. .TP
  86. runtime.services.*
  87. Prefix with statistics for service engines. Each service has it's own
  88. .B service_id
  89. key in the prefix with the name runtime.services.SERVICE., where SERVICE is the lower case
  90. name of the service. Inside the service prefix is the number of messages received and sent
  91. by the corosync engine in the format runtime.services.SERVICE.EXEC_CALL.rx and
  92. runtime.services.SERVICE.EXEC_CALL.tx, where EXEC_CALL is the internal id of the service
  93. call (so for example 3 in cpg service is receive of multicast message from other
  94. nodes).
  95. .TP
  96. runtime.totem.members.*
  97. Prefix containing members of the totem single ring protocol. Each member
  98. keys has format runtime.totem.members.NODEID.KEY, where key is
  99. one of:
  100. .B config_version
  101. Config version of the member node.
  102. .TP
  103. resources.process.PID.*
  104. Prefix created by applications using SAM with CMAP integration.
  105. It contains the following keys:
  106. .B recovery
  107. Recovery policy of the process. Can be one of quit or restart.
  108. .B poll_period
  109. Value passed in sam_initialize as a time_interval.
  110. .B last_updated
  111. Last time SAM received a heartbeat from the client.
  112. .B state
  113. State of the client. Can be one of failed, stopped, running and waiting for quorum.
  114. .TP
  115. uidgid.*
  116. Information about users/groups which are allowed to make IPC connections to
  117. corosync. Entries loaded from configuration file are stored with
  118. uidgid.config.* prefix and are pruned on configuration file reload. Dynamic
  119. entries has uidgid.* prefix and a configuration file reload doesn't affect them.
  120. .TP
  121. quorum.cancel_wait_for_all
  122. Tells votequorum to cancel waiting for all nodes at cluster startup. Can be used
  123. to unblock quorum if notes are known to be down. For pcs use only.
  124. .TP
  125. config.reload_in_progress
  126. This value will be set to 1 (or created) when a corosync.conf reload is started,
  127. and set to 0 when the reload is completed. This allows interested subsystems
  128. to do atomic reconfiguration rather than changing each key. Note that
  129. individual add/change/delete notifications will still be sent during a reload.
  130. .TP
  131. config.totemconfig_reload_in_progress
  132. This key is similar to
  133. .B config.totemconfig_reload_in_progress
  134. but changed after the totem config trigger is processed. It is useful (mainly)
  135. for situations when
  136. .B nodelist.local_node_pos
  137. must be correctly reinstated before anything else.
  138. .SH STATS KEYS
  139. These keys are in the stats map. All keys in this map are read-only.
  140. Modification tracking of individual keys is supported in the stats map, but not
  141. prefixes. Add/Delete operations are supported on prefixes though so you can track
  142. for new ipc connections or knet interfaces.
  143. .TP
  144. stats.srp.*
  145. Prefix containing statistics about totem.
  146. Typical key prefixes:
  147. .B commit_entered
  148. Number of times the processor entered COMMIT state.
  149. .B commit_token_lost
  150. Number of times the processor lost token in COMMIT state.
  151. .B consensus_timeouts
  152. How many times the processor timed out forming a consensus about membership.
  153. .B continuous_gather
  154. How many times the processor was not able to reach consensus.
  155. .B firewall_enabled_or_nic_failure
  156. Set to 1 when processor was not able to reach consensus for long time. The usual
  157. reason is a badly configured firewall or connection failure.
  158. .B gather_entered
  159. Number of times the processor entered GATHER state.
  160. .B gather_token_lost
  161. Number of times the processor lost token in GATHER state.
  162. .B mcast_retx
  163. Number of retransmitted messages.
  164. .B mcast_rx
  165. Number of received multicast messages.
  166. .B mcast_tx
  167. Number of transmitted multicast messages.
  168. .B memb_commit_token_rx
  169. Number of received commit tokens.
  170. .B memb_commit_token_tx
  171. Number of transmitted commit tokens.
  172. .B memb_join_rx
  173. Number of received join messages.
  174. .B memb_join_tx
  175. Number of transmitted join messages.
  176. .B memb_merge_detect_rx
  177. Number of received member merge messages.
  178. .B memb_merge_detect_tx
  179. Number of transmitted member merge messages.
  180. .B orf_token_rx
  181. Number of received orf tokens.
  182. .B orf_token_tx
  183. Number of transmitted orf tokens.
  184. .B recovery_entered
  185. Number of times the processor entered recovery.
  186. .B recovery_token_lost
  187. Number of times the token was lost in recovery state.
  188. .B rx_msg_dropped
  189. Number of received messages which were dropped because they were not expected
  190. (as example multicast message in commit state).
  191. .B token_hold_cancel_rx
  192. Number of received token hold cancel messages.
  193. .B token_hold_cancel_tx
  194. Number of transmitted token hold cancel messages.
  195. .B mtt_rx_token
  196. Mean transit time of token in milliseconds. In other words, time between
  197. two consecutive token receives.
  198. .B avg_token_workload
  199. Average time in milliseconds of holding time of token on the current processor.
  200. .B avg_backlog_calc
  201. Average number of not yet sent messages on the current processor.
  202. .TP
  203. stats.knet.nodeX.linkY.*
  204. Statistics about the network traffic to and from each node and link when using
  205. tke kronosnet transport
  206. .B connected
  207. Whether the link is connected or not
  208. .B up_count
  209. Number of times this link has changed state to UP
  210. .B down_count
  211. Number of times this link has changed state to DOWN
  212. .B latency_ave / latency_max / latency_max
  213. Calculated latencies of this link. Note that if there has been no traffic
  214. on the link then latency_min will show a very large number.
  215. .B latency_samples
  216. The number of samples used to calculate the latency figures, so you have
  217. some idea of their precision.
  218. .B rx_data_packets / tx_data_packets
  219. The number of packets sent/received on this link
  220. .B rx_data_bytes / tx_data_bytes
  221. The number of bytes sent/received on this link
  222. .B rx_pmtu_packets / tx_pmtu_packets
  223. The number of packets sent/received by the PMTUd subsystem
  224. .B rx_pmtu_bytes / tx_pmtu_bytes
  225. The number of bytes sent/received by the PMTUd subsystem
  226. .B rx_ping_packets / tx_ping_packets
  227. The number of packets sent/received as pings
  228. .B rx_ping_bytes / tx_ping_bytes
  229. The number of bytes sent/received as pings
  230. .B rx_pong_packets / tx_pong_packets
  231. The number of packets sent/received as pongs
  232. .B rx_pong_bytes / tx_pong_bytes
  233. The number of bytes sent/received as pongs
  234. .B rx_total_packets / tx_total_packets
  235. The total number of packets sent/received. The aggregate of all of the above packet stats
  236. .B rx_total_bytes / tx_total_bytes
  237. The total number of bytes sent/received. The aggregate of all of the above bytes stats
  238. .B tx_data_retries / tx_pmtu_retries / tx_ping_retries / tx_pong_retries / tx_total_retries
  239. Number of times a transmit operation had to be retried due to the socket returning EAGAIN
  240. .TP
  241. stats.ipcs.*
  242. There is information about total number of active connections from client programs
  243. at the time the request was made.
  244. .B active
  245. number of closed connections during whole runtime of corosync
  246. .B closed
  247. Total number of connnections that have been made since corosync was started
  248. .TP
  249. stats.ipcs.ID.*
  250. Each IPC connection has a unique ID. This is in the form [[serviceX:][PID:]internal_id.
  251. Typical keys in this prefix are:
  252. .B proc_name
  253. process name of connected process (unavailable on some platforms)
  254. .B dispatched
  255. number of dispatched messages.
  256. .B invalid_request
  257. number of requests made by IPC which are invalid (calling non-existing call, ...).
  258. .B name
  259. contains short name of the IPC connection (unavailable on some platforms).
  260. .B overload
  261. is number of requests which were not processed because of overload.
  262. .B queue_size
  263. contains the number of messages in the queue waiting for send.
  264. .B recv_retries
  265. is the total number of interrupted receives.
  266. .B requests
  267. contains the number of requests made by IPC.
  268. .B responses
  269. is the number of responses sent to the IPC client.
  270. .B send_retries
  271. contains the total number of interrupted sends.
  272. .B service_id
  273. contains the ID of service which the IPC is connected to.
  274. .TP
  275. stats.clear.*
  276. These are write-only keys used to clear the stats for various subsystems
  277. .B totem
  278. Clears the pg & srp totem stats.
  279. .B knet
  280. Clears the knet stats
  281. .B ipc
  282. Clears the ipc stats
  283. .B all
  284. Clears all of the above stats
  285. .SH DYNAMIC CHANGE USER/GROUP PERMISSION TO USE COROSYNC IPC
  286. Is the same as in the configuration file. eg: to add UID 500 use
  287. .br
  288. # corosync-cmapctl -s uidgid.uid.500 u8 1
  289. GID is similar, so to add a GID use
  290. .br
  291. # corosync-cmapctl -s uidgid.gid.500 u8 1
  292. For removal of permissions, simply delete the key
  293. .br
  294. # corosync-cmapctl -d uidgid.gid.500
  295. .SH DYNAMIC ADD/REMOVE OF UDPU NODE
  296. Eg. To add the node with address 10.34.38.108
  297. and nodeid 3. This node is called NEW and it's not running corosync yet.
  298. .PP
  299. * Find a node position in the node list which is not used yet. It's recommended that you
  300. use highest_number + 1. Let's say output of corosync-cmapctl looks like:
  301. .br
  302. nodelist.local_node_pos (u32) = 1
  303. .br
  304. nodelist.node.0.nodeid (u32) = 1
  305. .br
  306. nodelist.node.0.ring0_addr (str) = 10.34.38.106
  307. .br
  308. nodelist.node.1.nodeid (u32) = 2
  309. .br
  310. nodelist.node.1.ring0_addr (str) = 10.34.38.107
  311. So next node position will be 2.
  312. .PP
  313. * Add all entries needed for the node on all running nodes, as:
  314. .br
  315. # corosync-cmapctl -s nodelist.node.2.nodeid u32 3
  316. .br
  317. # corosync-cmapctl -s nodelist.node.2.ring0_addr str 10.34.38.108
  318. Always add the ring0_addr key last. The Corosync engine on all nodes should reply
  319. with
  320. .I notice [TOTEM ] adding new UDPU member {10.34.38.108}
  321. message.
  322. .PP
  323. * Add node information to the configuration file on all nodes so that it
  324. will survive a restart of corosync.
  325. .PP
  326. * Copy and edit configuration file to the NEW node.
  327. .PP
  328. * Start corosync on the NEW node.
  329. Removal of a UDPU node is a very similar, slightly reversed action, so
  330. .PP
  331. * Stop corosync on the OLD node.
  332. .PP
  333. * Remove the relevant entries from cmap on all nodes.
  334. .PP
  335. * Change the configuration file on all nodes.
  336. .SH "SEE ALSO"
  337. .BR corosync_overview (7),
  338. .BR corosync.conf (5),
  339. .BR corosync-cmapctl (8)