repmgr daemon statusrepmgrddisplaying daemon statusrepmgr daemon statusrepmgr daemon statusdisplay information about the status of repmgrd on each node in the clusterDescription
This command provides an overview over all active nodes in the cluster and the state
of each node's repmgrd instance. It can be used to check
the result of and
operations.
Executionrepmgr daemon status can be executed on any active node in the
replication cluster. A valid repmgr.conf file is required.
If PostgreSQL is not running on a node, &repmgr; will not be able to determine the
status of that node's repmgrd instance.
After restarting PostgreSQL on any node, the repmgrd instance
will take a second or two before it is able to update its status. Until then,
repmgrd will be shown as not running.
Examplesrepmgrd running normally on all nodes:
$ repmgr -f /etc/repmgr.conf daemon status
ID | Name | Role | Priority | Status | repmgrd | PID | Paused? | Upstream last seen
----+-------+---------+----------+---------+---------+-------+---------+--------------------
1 | node1 | primary | 100 | running | running | 71987 | no | n/a
2 | node2 | standby | 100 | running | running | 71996 | no | 1 second(s) ago
3 | node3 | standby | 100 | running | running | 72042 | no | 1 second(s) ago
repmgrd paused on all nodes (using ):
$ repmgr -f /etc/repmgr.conf daemon status
ID | Name | Role | Priority | Status | repmgrd | PID | Paused? | Upstream last seen
----+-------+---------+----------+---------+---------+-------+---------+--------------------
1 | node1 | primary | 100 | running | running | 71987 | yes | n/a
2 | node2 | standby | 100 | running | running | 71996 | yes | 0 second(s) ago
3 | node3 | standby | 100 | running | running | 72042 | yes | 0 second(s) ago
repmgrd not running on one node:
$ repmgr -f /etc/repmgr.conf daemon status
ID | Name | Role | Priority | Status | repmgrd | PID | Paused? | Upstream last seen
----+-------+---------+----------+---------+-------------+-------+---------+--------------------
1 | node1 | primary | 100 | running | running | 71987 | yes | n/a
2 | node2 | standby | 100 | running | not running | n/a | n/a | n/a
3 | node3 | standby | 100 | running | running | 72042 | yes | 0 second(s) agoOptionsrepmgr daemon status accepts an optional parameter --csv, which
outputs the replication cluster's status in a simple CSV format, suitable for
parsing by scripts, e.g.:
$ repmgr -f /etc/repmgr.conf daemon status --csv
1,node1,primary,1,1,5722,1,100,-1
2,node2,standby,1,0,-1,1,100,1
3,node3,standby,1,1,5779,1,100,1
The columns have following meanings:
node ID
node name
node type (primary or standby)
PostgreSQL server running (1 = running, 0 = not running)
repmgrd running (1 = running, 0 = not running, -1 = unknown)
repmgrd PID (-1 if not running or status unknown)
repmgrd paused (1 = paused, 0 = not paused, -1 = unknown)
repmgrd node priority
interval in seconds since the node's upstream was last seen (this will be -1 if the value could not be retrieved, or the node is primary)
Display the full text of any database connection error messages
See also, ,