Help Center/ MapReduce Service/ Component Operation Guide (LTS) (Ankara Region)/ Using MOTService/ Introduction to the MOTService Maintenance Tool gs_om
Updated on 2024-11-29 GMT+08:00

Introduction to the MOTService Maintenance Tool gs_om

Scenario

MOTService inherits the features of the gs_om tool provided by GaussDB(for openGauss) to help database administrators perform management and maintenance.

gs_om can be used to start or stop a cluster, query status, query static configurations, generate static configuration files, query MOTService status details, generate dynamic configuration files, replace SSL certificates, and display help information and version number.

Prerequisites

Before using gs_om, log in to the MOTService node as user omm and run the following command to load environment variables:

source "$MOTSERVER_HOME"/.motservice_profile

Basic Syntax

Command

Description

Description

gs_om -t status [-h HOSTNAME] [--all]

-h: name of the server to be queried

--all: displays information about all MOTService nodes.

Queries the MOTService status.

gs_om -t start [-h HOSTNAME] [-D dataDir] [--time-out=SECS] [--security-mode=MODE] [--cluster-number=None] [-l LOGFILE]

-h: name of the server to be queried

-D: path of the database node

–time-out=SECS: timeout period

–security-mode: whether to start the database in security mode

–cluster-number: kernel version during startup

-l: log file and its storage path

Starts MOTService.

gs_om -t stop [-h HOSTNAME] [-D dataDir] [--time-out=SECS] [-m MODE] [-l LOGFILE]

-h: name of the server to be queried

-D: path of the database node

–time-out=SECS: timeout period

-m MODE: stop mode

-l: log file and its storage path

Stops MOTService.

gs_om -t restart [-h HOSTNAME] [-D dataDir] [--time-out=SECS] [--security-mode=MODE] [-l LOGFILE] [-m MODE]

-h: name of the server to be queried

-D: path of the database node

–time-out=SECS: timeout period

–security-mode: whether to start the database in security mode

–cluster-number: kernel version during startup

-l: log file and its storage path

-m MODE: stop mode

Restarts MOTService.

gs_om -? | --help

-

Displays help information.

gs_om -V | --version

-

Displays the version number.

Use Example

  • Stopping GaussDB(for openGauss)
    [omm@192-168-64-4 FusionInsight-MOTService-2.7.0]$ gs_om -t stop
    Stopping cluster.
    =========================================
    Successfully stopped cluster.
    =========================================
    End stop cluster.
  • Querying the GaussDB(for openGauss) status
    [omm@192-168-64-4 FusionInsight-MOTService-2.7.0]$  gs_om -t status --all
    -----------------------------------------------------------------------
    
    cluster_state             : Normal
    redistributing            : No
    
    -----------------------------------------------------------------------
    
    node                      : 1
    node_name                 : 192-168-64-12
    instance_id               : 6001
    node_ip                   : 192.168.64.12
    data_path                 : /srv/BigData/MOTService/data
    instance_port             : 20105
    type                      : Datanode
    instance_state            : Normal
    az_name                   : AZ1
    instance_role             : Standby
    HA_state                  : Streaming
    sender_sent_location      : 0/5DE4958
    sender_write_location     : 0/5DE4958
    sender_flush_location     : 0/5DE4958
    sender_replay_location    : 0/5DE4958
    receiver_received_location: 0/5DE4958
    receiver_write_location   : 0/5DE4958
    receiver_flush_location   : 0/5DE4958
    receiver_replay_location  : 0/5DE4958
    sync_percent              : 100%
    sync_state                : Async
    
    -----------------------------------------------------------------------
    
    node                      : 2
    node_name                 : 192-168-64-4
    instance_id               : 6002
    node_ip                   : 192.168.64.4
    data_path                 : /srv/BigData/MOTService/data
    instance_port             : 20105
    type                      : Datanode
    instance_state            : Normal
    az_name                   : AZ1
    static_connections        : 1
    HA_state                  : Normal
    instance_role             : Primary
    
    -----------------------------------------------------------------------