DEV Community

AntDB
AntDB

Posted on

Manager Handbook for Distributed AntDB-T - P22

Inspection tool
AntDB provides the inspection tool to inspect the current database. The tool provides binary runtime software for both linux x86 and windows x86 environments; help for use is as follows:

[root@adb01 atool]# ./adb_tool_linux_x64 -h
Usage of ./adb_tool_linux_x64:
  -adblog int
        Check the AntDB database log for ERROR|FATAL|PANIC level information and output: 0: Not enabled by default 1: Enabled
        This parameter is not valid when adbtype is set to the centralized version
  -adbtype int
        AntDB type: 0 (default centralized version) 1 (distributed version)
  -command string
        The node executes the command of the OS: default ls -l
        This parameter is used with oscmd (default "ls -l")
  -dbname string
        Database name (default "postgres")
  -host string
        Host IP (distributed version connects to GTMC nodes) (default "10.1.194.37")
  -oscmd int
        The node executes the OS command: 0: Not enabled by default 1: Enabled
        When this parameter is enabled, none of the other parameters are valid
  -password string
        User password (default "123123")
  -port int
        Database port (default 6432)
  -querynode int
        DISTRIBUTED VERSION QUERY NODE: 0 (DEFAULT CN&GTM) 1(DN) 2(ALL)
        This parameter is not valid when adbtype is set to the centralized version
        This parameter is not valid when the distributed version generates inspection reports
  -sqltext string
        The default blank of the executed SQL statement represents the generation of inspection reports
        Non-null represents the execution of the entered SQL statement
  -user string
        Database user(default "antdb")
Enter fullscreen mode Exit fullscreen mode

The example of generated inspection report is as follows:

./adb_tool_linux_x64 -host 10.1.194.37 -port 6432 -dbname tpcc -adbtype 1  -user antdb -password "123123" -querynode 1 > report.log 
Enter fullscreen mode Exit fullscreen mode

Check the overall status of the database by viewing the logs.

Top comments (0)