<!--
doc/src/sgml/ref/pcp_node_info.sgml
Pgpool-II documentation
-->

<refentry id="PCP-NODE-INFO">
 <indexterm zone="pcp-node-info">
  <primary>pcp_node_info</primary>
 </indexterm>

 <refmeta>
  <refentrytitle>pcp_node_info</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo>PCP Command</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>pcp_node_info</refname>
  <refpurpose>
	displays the information on the given node ID</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis>
   <command>pcp_node_info</command>
   <arg rep="repeat"><replaceable>option</replaceable></arg>
   <arg><replaceable>node_id</replaceable></arg>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1 id="R1-PCP-NODE-INFO-1">
  <title>Description</title>
  <para>
  <command>pcp_node_info</command>
	displays the information on the given node ID.
  </para>
 </refsect1>

 <refsect1>
  <title>Options</title>
   <para>
    <variablelist>

     <varlistentry>
      <term><option>-n <replaceable class="parameter">node_id</replaceable></option></term>
      <term><option>--node-id=<replaceable class="parameter">node_id</replaceable></option></term>
      <listitem>
       <para>
	 The index of backend node to get information of.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>Other options </option></term>
      <listitem>
       <para>
	 See <xref linkend="pcp-common-options">.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
 </refsect1>

 <refsect1>
  <title>Example</title>
   <para>
	Here is an example output:
    <programlisting>
$ pcp_node_info -h localhost -U postgres 0
host1 5432 1 1073741823.500000
    </programlisting>
  </para>
  <para>
	The result is in the following order:
<literallayout class="monospaced">
1. hostname
2. port number
3. status
4. load balance weight
</literallayout>
  </para>
  <para>
	Status is represented by a digit from [0 to 3].
	<itemizedlist>
	  <listitem><para>0 - This state is only used during the initialization. PCP will never display it. </para></listitem>
	  <listitem><para>1 - Node is up. No connections yet. </para></listitem>
	  <listitem><para>2 - Node is up. Connections are pooled. </para></listitem>
	  <listitem><para>3 - Node is down. </para></listitem>
	</itemizedlist>
  </para>
  <para>
	The load balance weight is displayed in normalized format.
  </para>
  <para>
	The <option>--verbose</option> option can help understand the output. For example:
  </para>
    <programlisting>
$ pcp_node_info --verbose -h localhost -U postgres 0
Hostname: host1
Port    : 5432
Status  : 1
Weight  : 0.5
    </programlisting>
 </refsect1>

</refentry>
