mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
171 lines
4.9 KiB
Plaintext
171 lines
4.9 KiB
Plaintext
<refentry id="repmgr-daemon-status">
|
|
<indexterm>
|
|
<primary>repmgr daemon status</primary>
|
|
</indexterm>
|
|
|
|
<indexterm>
|
|
<primary>repmgrd</primary>
|
|
<secondary>displaying daemon status</secondary>
|
|
</indexterm>
|
|
|
|
<refmeta>
|
|
<refentrytitle>repmgr daemon status</refentrytitle>
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
<refname>repmgr daemon status</refname>
|
|
<refpurpose>display information about the status of <application>repmgrd</application> on each node in the cluster</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<para>
|
|
This command provides an overview over all active nodes in the cluster and the state
|
|
of each node's <application>repmgrd</application> instance. It can be used to check
|
|
the result of <xref linkend="repmgr-daemon-pause"> and <xref linkend="repmgr-daemon-unpause">
|
|
operations.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Execution</title>
|
|
<para>
|
|
<command>repmgr daemon status</command> can be executed on any active node in the
|
|
replication cluster. A valid <filename>repmgr.conf</filename> file is required.
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
After restarting PostgreSQL on any node, the <application>repmgrd</application> instance
|
|
will take a second or two before it is able to update its status. Until then,
|
|
<application>repmgrd</application> will be shown as not running.
|
|
</para>
|
|
</note>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Examples</title>
|
|
<para>
|
|
<application>repmgrd</application> running normally on all nodes:
|
|
<programlisting>$ repmgr -f /etc/repmgr.conf daemon status
|
|
ID | Name | Role | Status | repmgrd | PID | Paused?
|
|
----+-------+---------+---------+---------+------+---------
|
|
1 | node1 | primary | running | running | 7851 | no
|
|
2 | node2 | standby | running | running | 7889 | no
|
|
3 | node3 | standby | running | running | 7918 | no</programlisting>
|
|
</para>
|
|
|
|
<para>
|
|
<application>repmgrd</application> paused on all nodes (using <xref linkend="repmgr-daemon-pause">):
|
|
<programlisting>$ repmgr -f /etc/repmgr.conf daemon status
|
|
ID | Name | Role | Status | repmgrd | PID | Paused?
|
|
----+-------+---------+---------+---------+------+---------
|
|
1 | node1 | primary | running | running | 7851 | yes
|
|
2 | node2 | standby | running | running | 7889 | yes
|
|
3 | node3 | standby | running | running | 7918 | yes</programlisting>
|
|
</para>
|
|
|
|
<para>
|
|
<application>repmgrd</application> not running on one node:
|
|
<programlisting>$ repmgr -f /etc/repmgr.conf daemon status
|
|
ID | Name | Role | Status | repmgrd | PID | Paused?
|
|
----+-------+---------+---------+-------------+------+---------
|
|
1 | node1 | primary | running | running | 7851 | yes
|
|
2 | node2 | standby | running | not running | n/a | n/a
|
|
3 | node3 | standby | running | running | 7918 | yes</programlisting>
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Options</title>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
<term><option>--csv</option></term>
|
|
<listitem>
|
|
<para>
|
|
<command>repmgr daemon status</command> accepts an optional parameter <literal>--csv</literal>, which
|
|
outputs the replication cluster's status in a simple CSV format, suitable for
|
|
parsing by scripts, e.g.:
|
|
<programlisting>
|
|
$ repmgr -f /etc/repmgr.conf daemon status --csv
|
|
1,node1,primary,1,1,10204,1
|
|
2,node2,standby,1,0,-1,1
|
|
3,node3,standby,1,1,10225,1</programlisting>
|
|
</para>
|
|
<para>
|
|
The columns have following meanings:
|
|
<itemizedlist spacing="compact" mark="bullet">
|
|
<listitem>
|
|
<simpara>
|
|
node ID
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
node name
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
node type (primary or standby)
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
PostgreSQL server running
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
<application>repmgrd</application> running (1 = running, 0 = not running)
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
<application>repmgrd</application> PID (-1 if not running)
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
<application>repmgrd</application> paused (1 = paused, 0 = not paused)
|
|
</simpara>
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>--verbose</option></term>
|
|
<listitem>
|
|
<para>
|
|
Display the full text of any database connection error messages
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
<title>See also</title>
|
|
<para>
|
|
<xref linkend="repmgr-daemon-pause">, <xref linkend="repmgr-daemon-unpause">, <xref linkend="repmgr-cluster-show">
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|