Querying Status

Background

You can query the status of openGauss in openGauss. The query result shows whether openGauss or a single host is running properly.

Prerequisites

openGauss has been started.

Procedure

  1. Log in as the OS user omm to the primary node of the database.

  2. Run the following command to query the openGauss status:

    gs_om -t status --detail
    

    Table 1 describes parameters in the query result.

    To query the status of instances on a host and the status of other instances which form a primary/secondary relationship with instances on the host, add -h to the command. For example:

    gs_om -t status -h plat2 --detail
    

    plat2 indicates the name of the host to be queried.

    To query the status of instances on the host you logged in to, run the following command:

    gs_om -t status -h plat1
    

Parameter Description

Table 1 Status description

Field

Description

Value

cluster_state

openGauss status, which indicates whether openGauss is running properly.

  • Normal: openGauss is available and the data has redundancy backup. All the processes are running and the primary/standby relationship is normal.
  • Unavailable: openGauss is unavailable.
  • Degraded: openGauss is available and faulty database nodes and primary database nodes exist.

node

Host name.

Specifies the name of the host where the instance is located. If multiple AZs exist, the AZ IDs will be displayed.

node_ip

Host IP Address.

Specifies the IP address of the host where the instance is located.

instance

Instance ID.

Specifies the instance ID.

state

Instance status.

  • Primary: The instance is a primary instance.
  • Standby: The instance is a standby instance.
  • Secondary: The instance is a secondary instance.
  • Pending: The instance is in the quorum phase.
  • Unknown: The instance status is unknown.
  • Down: The instance is down.

Examples

View openGauss status details, including instance status.

gs_om -t status --detail
[   Cluster State   ]

cluster_state   : Normal
redistributing  : No
current_az      : AZ_ALL

[  Datanode State   ]

node               node_ip         instance                                 state            | node               node_ip         instance                                 state
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1  pekpopgsci00235 10.244.62.204   6001 /opt/gaussdb/cluster/data/dn1 P Primary Normal | 2  pekpopgsci00238 10.244.61.81    6002 /opt/gaussdb/cluster/data/dn1 S Standby Normal
Feedback
编组 3备份
    openGauss 2024-05-24 00:42:44
    cancel