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 messages at the ERROR|FATAL|PANIC level 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
Commands for node execution 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 to connect to GTMC nodes) (default "10.1.194.37")
-oscmd int
Node executes OS commands: 0:not enabled by default 1:enabled
When this parameter is enabled, all other parameters are invalid
-password string
user password (default "123123")
-port int
database port (default 6432)
-querynode int
Distributed version query node:0(default CN>M) 1(DN) 2(ALL)
This parameter is not valid when adbtype is set to the centralized version
This parameter is not valid for the distributed version when generating the inspection report
-sqltext string
Executed SQL statement, the default is empty represents the generation of the inspection report
Not null represents the execution of the input SQL statement
-user string
database user (default "antdb")
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
Check the overall status of the database by viewing the logs.