CMAP_KEYS(7)
π CMAP_KEYS(7) π
okay so bestie, welcome to cmap_keys β a whole tour of the keys chillin' inside the Configuration Map. it's giving "backstage pass to corosync's brain" and honestly? iconic. π
β¨ NAME β¨
cmap_keys β Overview of keys stored in the Configuration Map πΊοΈπ
πΈ OVERVIEW πΈ
so there are 3 main types of keys stored in CMAP, and they're all serving different vibes:
- Mapping of values stored in the config file. π
- Runtime statistics. π
- Other user created values. π§
and just so we're clear, in this man page, wild-cards have the usual meaning. no cap. * does * things. π¦
π ICMAP KEYS π
these keys are in the icmap (default) map, bestie. the main character map. π
internal_configuration.*β Internal configuration data. every single key in this prefix is read only π«βοΈ. it's only useful for getting a list of loaded services. that's it, that's the whole job.logging.*β Values read from the configuration file. it's possible to change them at runtime π«. if you need subsystem specific configuration, the key must be in the formlogging.logger_subsys.SERVICE.key, where SERVICE is the upper case name of the service and key is same as in the configuration file. all values are of string type. π§΅nodelist.*β Values are read from the configuration file only (dynamic updates are <b>not</b> allowed, sorry bestie π). Each node element in the configuration file gets assigned its position starting from zero. So the first node from the config file hasnodelist.node.0.prefix. To be a valid entry, each node must havering0_addrkey. To change thenodeidkey, use au32data type. π’
Local node position is stored in local_node_pos key (RO), so it's easy to find out nodeid/ring addresses of the local node directly from cmap. so convenient, we love her π«Ά
runtime.blackbox.*β Trigger keys for storingfplaydata. it's recommended that you use thecorosync-blackboxcommand to change keys in this prefix. let the tool do it, pls πruntime.force_gatherβ Set to'yes'to force the processor to move into the GATHER state.
β οΈ bestie this operation is dangerous and is <b>not recommended</b>. like, genuinely. not me warning you twice. π
runtime.config.*β Contains the values actually in use by the totem membership protocol. Values here are either taken from the Corosync configuration file, defaults or computed from entries in the config file. For information on individual keys please refer to the man pagecorosync.conf(5). πruntime.services.*β Prefix with statistics for service engines. Each service has its ownservice_idkey in the prefix with the nameruntime.services.SERVICE., where SERVICE is the lower case name of the service. Inside the service prefix is the number of messages received and sent by the corosync engine in the formatruntime.services.SERVICE.EXEC_CALL.rxandruntime.services.SERVICE.EXEC_CALL.tx, where EXEC_CALL is the internal id of the service call (so for example3in cpg service is receive of multicast message from other nodes). π₯runtime.totem.members.*β Prefix containing members of the totem single ring protocol. Each member keys has formatruntime.totem.members.NODEID.KEY, where key is one of:config_versionβ Config version of the member node. π
resources.process.PID.*β Prefix created by applications using SAM with CMAP integration. It contains the following keys:recoveryβ Recovery policy of the process. Can be one ofquitorrestart. πpoll_periodβ Value passed insam_initializeas atime_interval. β±οΈlast_updatedβ Last time SAM received a heartbeat from the client. πstateβ State of the client. Can be one offailed,stopped,runningandwaiting for quorum. π‘οΈ
uidgid.*β Information about users/groups which are allowed to make IPC connections to corosync. Entries loaded from configuration file are stored withuidgid.config.*prefix and are pruned on configuration file reload. Dynamic entries hasuidgid.*prefix and a configuration file reload doesn't affect them. two whole species of keys, living their own lives π¦quorum.cancel_wait_for_allβ Tells votequorum to cancel waiting for all nodes at cluster startup. Can be used to unblock quorum if notes are known to be down. Forpcsuse only. πcfg.shutdown_timeoutβ Sets the timeout within which daemons that are registered for cfg callbacks must respond to acorosync_cfg_try_shutdown()request. the default is5000 mS. β³config.reload_in_progressβ This value will be set to1(or created) when acorosync.confreload is started, and set to0when the reload is completed. This allows interested subsystems to do atomic reconfiguration rather than changing each key. Note that individual add/change/delete notifications will still be sent during a reload. πβ¨config.totemconfig_reload_in_progressβ This key is similar toconfig.totemconfig_reload_in_progressbut changed after the totem config trigger is processed. It is useful (mainly) for situations whennodelist.local_node_posmust be correctly reinstated before anything else. π―
to be continued, bestieβ¦ π
Okay so stats map time bestie β and the vibe check here is important: every single key in this map is read-only. You're not writing, you're observing. π
Tracking modifications of individual keys is supported in the stats map, but not prefixes. However β plot twist β Add/Delete operations ARE supported on prefixes, so you can totally track new ipc connections or knet interfaces. β¨
STATS KEYS
stats.srp.*
Prefix containing statistics about totem. Typical key prefixes:
commit_enteredβ Number of times the processor entered COMMIT state.commit_token_lostβ Number of times the processor lost token in COMMIT state.consensus_timeoutsβ How many times the processor timed out forming a consensus about membership.continuous_gatherβ How many times the processor was not able to reach consensus.firewall_enabled_or_nic_failureβ Set to 1 when processor was not able to reach consensus for long time. The usual reason is a badly configured firewall or connection failure.gather_enteredβ Number of times the processor entered GATHER state.gather_token_lostβ Number of times the processor lost token in GATHER state.mcast_retxβ Number of retransmitted messages.mcast_rxβ Number of received multicast messages.mcast_txβ Number of transmitted multicast messages.memb_commit_token_rxβ Number of received commit tokens.memb_commit_token_txβ Number of transmitted commit tokens.memb_join_rxβ Number of received join messages.memb_join_txβ Number of transmitted join messages.memb_merge_detect_rxβ Number of received member merge messages.memb_merge_detect_txβ Number of transmitted member merge messages.orf_token_rxβ Number of received orf tokens.orf_token_txβ Number of transmitted orf tokens.recovery_enteredβ Number of times the processor entered recovery.recovery_token_lostβ Number of times the token was lost in recovery state.rx_msg_droppedβ Number of received messages which were dropped because they were not expected (as example multicast message in commit state).token_hold_cancel_rxβ Number of received token hold cancel messages.token_hold_cancel_txβ Number of transmitted token hold cancel messages.mtt_rx_tokenβ Mean transit time of token in milliseconds. In other words, time between two consecutive token receives.avg_token_workloadβ Average time in milliseconds of holding time of token on the current processor.avg_backlog_calcβ Average number of not yet sent messages on the current processor.
stats.knet.nodeX.linkY.*
Statistics about the network traffic to and from each node and link when using tke kronosnet transport
connectedβ Whether the link is connected or notup_countβ Number of times this link has changed state to UPdown_countβ Number of times this link has changed state to DOWNlatency_ave/latency_max/latency_maxβ Calculated latencies of this link. Note that if there has been no traffic on the link thenlatency_minwill show a very large number.latency_samplesβ The number of samples used to calculate the latency figures, so you have some idea of their precision.rx_data_packets/tx_data_packetsβ The number of packets sent/received on this linkrx_data_bytes/tx_data_bytesβ The number of bytes sent/received on this linkrx_pmtu_packets/tx_pmtu_packetsβ The number of packets sent/received by the PMTUd subsystemrx_pmtu_bytes/tx_pmtu_bytesβ The number of bytes sent/received by the PMTUd subsystemrx_ping_packets/tx_ping_packetsβ The number of packets sent/received as pingsrx_ping_bytes/tx_ping_bytesβ The number of bytes sent/received as pingsrx_pong_packets/tx_pong_packetsβ The number of packets sent/received as pongsrx_pong_bytes/tx_pong_bytesβ The number of bytes sent/received as pongsrx_total_packets/tx_total_packetsβ The total number of packets sent/received. The aggregate of all of the above packet statsrx_total_bytes/tx_total_bytesβ The total number of bytes sent/received. The aggregate of all of the above bytes statstx_data_retries/tx_pmtu_retries/tx_ping_retries/tx_pong_retries/tx_total_retriesβ Number of times a transmit operation had to be retried due to the socket returningEAGAIN
stats.ipcs.*
There is information about total number of active connections from client programs at the time the request was made. active number of closed connections during whole runtime of corosync closed Total number of connections that have been made since corosync was started
stats.ipcs.ID.*
Each IPC connection has a unique ID. This is in the form [[serviceX:][PID:]internal_id.
Typical keys in this prefix are:
proc_nameβ process name of connected process (unavailable on some platforms)dispatchedβ number of dispatched messages.invalid_requestβ number of requests made by IPC which are invalid (calling non-existing call, ...).nameβ contains short name of the IPC connection (unavailable on some platforms).overloadβ is number of requests which were not processed because of overload.queue_sizeβ contains the number of messages in the queue waiting for send.recv_retriesβ is the total number of interrupted receives.requestsβ contains the number of requests made by IPC.responsesβ is the number of responses sent to the IPC client.send_retriesβ contains the total number of interrupted sends.service_idβ contains the ID of service which the IPC is connected to.
stats.schedmiss.<n>.*
If corosync is not scheduled after the required period of time it will log this event and also write an entry to the stats cmap under this key. There can be up to 10 entries (0..9) in here, when an 11th event happens the earliest will be removed. π
These events will always be in reverse order, so stats.schedmiss.0.* will always be the latest event kept and 9 the oldest. If you want to listen for notifications then you are recommended to listen for changes to stats.schedmiss.0.timestamp or stats.schedmiss.0.delay. π
timestampβ The time of the event in ms since the Epoch (ietime_t * 1000but with valid milliseconds).delayβ The time that corosync was paused (in ms, float value).
stats.clear.*
These are write-only keys used to clear the stats for various subsystems
totemβ Clears the pg & srp totem stats.knetβ Clears the knet statsipcβ Clears the ipc statsschedmissβ Clears the schedmiss statsallβ Clears all of the above stats
DYNAMIC CHANGE USER/GROUP PERMISSION TO USE COROSYNC IPC
Is the same as in the configuration file. eg: to add UID 500 use
# corosync-cmapctl -s uidgid.uid.500 u8 1
GID is similar, so to add a GID use
# corosync-cmapctl -s uidgid.gid.500 u8 1
For removal of permissions, simply delete the key ποΈ
# corosync-cmapctl -d uidgid.gid.500
SEE ALSO
corosync_overview(7), corosync.conf(5), corosync-cmapctl(8)
and that's the whole page bestie, you made it to the end π«Ά this lil masterpiece is a corosync Man Page, dated 2018-10-08, filed under CMAP_KEYS(7) β go forth and cmapctl responsibly, ily πβ¨
π¦ where this page comes from
- debian bookworm: corosync 3.1.7-1+deb12u2 Β· BSD-3-Clause
- debian trixie: corosync 3.1.9-2+deb13u1 Β· BSD-3-Clause
- epel 9: corosync 3.1.10-0.2.el9.1 Β· BSD-3-Clause
- fedora 43: corosync 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 43: corosync 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 44: corosync 3.1.10-4.fc44 Β· BSD-3-Clause
- fedora 44: corosync 3.1.10-6.fc44 Β· BSD-3-Clause
- nixos 26.05: corosync 3.1.9
- nixpkgs unstable: corosync 3.1.9
- opensuse-leap 16.0: corosync 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync 3.1.9-160000.4.1 Β· BSD-3-Clause
- ubuntu jammy: corosync 3.1.6-1ubuntu1 Β· BSD-3-Clause
- ubuntu jammy: corosync 3.1.6-1ubuntu1.2 Β· BSD-3-Clause
- ubuntu noble: corosync 3.1.7-1ubuntu3 Β· BSD-3-Clause
- ubuntu noble: corosync 3.1.7-1ubuntu3.2 Β· BSD-3-Clause
- ubuntu questing: corosync 3.1.9-2ubuntu1
- ubuntu questing: corosync 3.1.9-2ubuntu1.1
- ubuntu resolute: corosync 3.1.9-2ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: corosync 3.1.10-3ubuntu1 Β· BSD-3-Clause
- Copyright (c) 2012-2020 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms