pgxc_monitor

Postgres-XC 1.1 Documentation
Prev | Up | Appendix F. Additional Supplied Modules | Next

# F.34. pgxc_monitor

## F.34.1. Overview

> Note: The following description applies only to Postgres-XC

pgxc_monitor has the following synopsis.

    pgxc_monitor [ option ]

pgxc_monitor is a Postgres-XC utility to test if the target node is running.

The target node is specified by option.

If the target node is running, it exits with exit code zero. If not, it exits with non-zero exit code.

If invalid options are specified, it exits with exit code 3.

## F.34.2. Options

`-Z `nodetype``

  Type of node type to test. Specify `gtm` as `nodetype` for gtm and gtm_proxy and `node` as `nodetype` for a Coordinator or a Datanode.

`-h `hostname``

  Hostname of the test target.

`-n `nodename``

  Node name to use when testing gtm or gtm_proxy. Default value is `pgxc_monitor`.

`-p `port_number``

  Specifies the port number to test target.

`-U `username``

  Specifies the database username to connect as.

`-d `database``

  Specifies the database name to connect to. Default is "postgres".

`-q`

  Quiet mode. Supress messages as much as possible.

`-v`

  Verbose mode. Prints as many messages as possible.

`--help`

  Show help about pgxc_monitor command line arguments, and exit.

## F.34.3. Options

When monitoring Coordinator or Datanode, `-p` and `-h` options can be supplied using `.pgpass` file. If you use non-default target database name, and username, as well as password, they must also be supplied using `.pgpass` file.

If password is needed, it must also be supplied using `.pgpass` file too.

Monitoring Coordinator and Datanode uses system(3) function. Therefore,you should not use set-userid bit or set-groupid bit. Also, because this uses psql command, psql must be in your PATH.

The username and database name can be specified via command line options too. If password is needed, it must be supplied via `.pgpass` file though.

If invalid parameters are given, error message will be printed even if `-q` is specified.

Prev | Home | Next
pgxc_ddl | Up | seg