pcp_node_info
Options
-
-n
node_id
--node-id= node_id -
The index of backend node to get information of.
- Other options
-
See pcp_common_options .
Example
Here is an example output:
$ pcp_node_info -h localhost -U postgres 1
/tmp 11003 2 0.500000 up standby 208 2018-07-03 08:26:39
The result is in the following order:
1. hostname 2. port number 3. status 4. load balance weight 5. status name 6. backend role 7. replication delay 8. last status change time
Status is represented by a digit from [0 to 3].
-
0 - This state is only used during the initialization. PCP will never display it.
-
1 - Node is up. No connections yet.
-
2 - Node is up. Connections are pooled.
-
3 - Node is down.
The load balance weight is displayed in normalized format.
The --verbose option can help understand the output. For example:
$ pcp_node_info --verbose -h localhost -U postgres 1
Hostname : /tmp
Port : 11003
Status : 2
Weight : 0.500000
Status Name : up
Role : standby
Replication Delay : 208
Last Status Change: 2018-07-03 08:26:39