---
name: "cmannotifyd"
section: "8"
platform: "linux"
package: "cman"
version: "3.1.8-1.2+b1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/cmannotifyd"
---

# cmannotifyd(8)

CMAN Notification Daemon

## NAME

cmannotifyd - CMAN Notification Daemon

## SYNOPSIS

**cmannotifyd \[-f\] \[-d\]**

## DESCRIPTION

**The cmannotifyd daemon talks to CMAN and provides a mechanism to notify** **external entities about cluster changes.**

**CMAN dispatches 3 kind of notifications:**

**- CMAN\_REASON\_TRY\_SHUTDOWN when cman requests to all clients if it is allowed** **to shutdown.**

**- CMAN\_REASON\_STATECHANGE when cman detects a node joining or leaving the** **cluster.**

**- CMAN\_REASON\_CONFIG\_UPDATE when a configuration change event has been** **detected/requested.**

**These notifications are then dispatched to the shell script**  **cman\_notify** **in the environment variable CMAN\_NOTIFICATION.**

**cman\_notify** **will then execute all the scripts in the configured notification** **directory (default: /etc/cluster/cman-notify.d) passing a very minimal set of** **envvars including, of course, the CMAN\_NOTIFICATION= type.** **The execution order is set by the filename as shown by "LC\_ALL=C ls -las".**

**cmannotifyd** **logs are stored in the default log file** **(/var/log/cluster/cmannotifyd.log).**

**cman\_notify** **logs are stored in the default log file** **(/var/log/cluster/cman\_notify.log). By default the output from the scripts** **executed by**  **cman\_notify** **is redirected to /dev/null.** **Users can either set CMAN\_NOTIFICATION\_DEBUG=1 in their environment or** **set proper debug configuration in cluster.conf to redirect scripts output** **to the cman\_notify log file.**

## NOTES

**cmannotifyd does not block on cman\_notify nor check the exit** **status of the script.**

**Notifications are dispatched in the same order as they** **arrive, one by one.**

**CMAN\_REASON\_TRY\_SHUTDOWN is passed to scripts for information only, they** **can not influence cman's decsion about whether or not to shut down.**

**CMAN\_REASON\_STATECHANGE also implies CMAN\_NOTIFICATION\_QUORUM exported** **in the environment. CMAN\_NOTIFICATION\_QUORUM will be set to 1 (when the node** **is part of a quorate cluster) or 0 (otherwise).**

**A template for cman\_notify scripts can be found in the doc/ directory.**

## OPTIONS

- \-f

  **Run in the foreground (do not fork / daemonize).**

- \-d

  **Enable debug output.**
