Operation Logs
Operation logs are generated when database tools are used by a database administrator or called by a cluster. If the cluster is faulty, you can backtrack user operations on the database and reproduce the fault based on the operation logs.
Log Storage Directory
The default paths are $GAUSSLOG/om and $GAUSSLOG/bin. If the environment variable $GAUSSLOG does not exist or its value is empty, the logs generated for a tool will be displayed, but not recorded in the log file of the tool.
Log Naming Rules
The log file name format is as follows:
- tool name-log creation time.log
- tool name-log creation time-current.log
tool name-log creation time.log is a historical log file, and tool name-log creation time-current.log is a current log file.
If the size of a log file exceeds 16 MB, the next time the tool is called, the log file is renamed in the historical log file name format, and a new log file is generated at the current time point. For example, gs_guc-2015-01-16_183728-current.log is renamed as gs_guc-2015-01-16_183728.log, and gs_guc-2015-01-17_142216-current.log is generated.
Log Content Description
- Logs of OM tools, including gs_install, gs_preinstall, gs_om, gs_expand, gs_replace, gs_local, checkRunStatus (API for checking O&M operating status), JsonToDbclusterInfo (a tool used to convert cluster topology files in JSON format to XML files), killall_log, uploader (PSCP tool), and cmd_sender (PSSH tool). The content of each log line is as follows: Call chain ID+Date and time+Thread ID+Location where the log is reported+Thread name+Log level+[Step*]+Log content
Table 1 Log parameters of tools or components contained in the OM Column
Description
Call chain ID
ID of the call chain.
Date and time
Date and time when a log is generated. The format is yyyy-mm-dd hh:mm:ss.ms.
Thread ID
ID of the thread that generates the log.
Location where the log is reported
Number of the line where the log content is located in the executed file. The current log may contain multiple lines.
Thread name
Name of the thread that generates the log.
Log level
Different log levels, such as LOG, DEBUG, WARNING, and ERROR, indicate different severities.
Step*
ID of the step executed at the current time.
Log content
Log content.
- Content of a line in a gs_initdb log:
Date+Time+Log level+Log content
Table 2 gs_initdb log parameters Column
Description
Date
Date when a log is generated. The format is yyyy-mm-dd.
Time
Time when a log is generated. The format is hh:mm:ss.
Log level
Different log levels, such as LOG, WARNING, ERROR, and FATAL, indicate different severities.
Log content
Log content.
- Content of a line in a gs_guc log:
Table 3 gs_guc log parameters Column
Description
Date
Date when a log is generated. The format is yyyy-mm-dd.
Time
Time when a log is generated. The format is hh:mm:ss.
Log content
Log content.
- Content of a line in a gs_cgroup log:
Call chain ID+Date and time+Thread ID+Location where the log is reported+Thread name+Log level+Log content
Table 4 gs_cgroup log parameters Column
Description
Call chain ID
ID of the call chain.
Date and time
Date and time when a log is generated. The format is yyyy-mm-dd hh:mm:ss.ms.
Thread ID
ID of the thread that generates the log.
Location where the log is reported
Number of the line where the log content is located in the executed file. The current log may contain multiple lines.
Thread name
Name of the thread that generates the log.
Log level
Different log levels, such as LOG, DEBUG, WARNING, and ERROR, indicate different severities.
Log content
Log content.
- Content of a line in a gs_clean log:
Table 5 gs_clean log parameters Column
Description
Date
Date when a log is generated. The format is yyyy-mm-dd.
Time
Time when a log is generated. The format is hh:mm:ss.
Log content
Log content.
- Content of a line in a gs_ctl log:
Date+Time+Thread ID+node_name+Thread name+Log content
Table 6 gs_ctl log parameters Column
Description
Date
Date when a log is generated. The format is yyyy-mm-dd.
Time
Time when a log is generated. The format is hh:mm:ss.ms.
Thread ID
ID of the thread that generates the log.
node_name
Instance name.
Thread name
Name of the thread that generates the log.
Log content
Log content.
- Content of a line in a gs_initgtm log:
Table 7 gs_initgtm log parameters Column
Description
Date
Date when a log is generated. The format is yyyy-mm-dd.
Time
Time when a log is generated. The format is hh:mm:ss.
Log content
Log content.
- Content of a line in a gs_obs log:
Date+Time+Log level+Thread ID+Log content
Table 8 gs_obs log parameters Column
Description
Date
Date when a log is generated. The format is yyyy-mm-dd.
Time
Time when a log is generated. The format is hh:mm:ss.ms.
Log level
Different log levels, such as LOG, WARNING, ERROR, and FATAL, indicate different severities.
Thread ID
ID of the thread that generates the log.
Log content
Log content.
- Content of a line in a gtm_ctl log:
Table 9 gtm_ctl log parameters Column
Description
Date
Date when a log is generated. The format is yyyy-mm-dd.
Time
Time when a log is generated. The format is hh:mm:ss.
Log content
Log content.
- Content of a line in a gs_redis log:
Date+Time+Timestamp+Thread name+Thread ID+Location where the log is reported+step[*]+Log content
Table 10 gs_redis log parameters Column
Description
Date
Date when a log is generated. The format is yyyy-mm-dd.
Time
Time when a log is generated. The format is hh:mm:ss:ms.
Timestamp
Timestamp of the current time.
Thread name
Name of the thread that generates the log.
Thread ID
ID of the thread that generates the log.
step[*]
ID of the step executed at the current time.
Log content
Log content.
Log Examples
- A typical OM tool log is as follows:
[220822164bc111ee9466fa163e8dd000][2023-09-05 08:02:11.098083][11214][InstallImpl.py(doStart:864)][gs_install][DEBUG][Step7]:Successfully started the cluster.
- A typical gs_initdb log is as follows:
[2023-09-05 07:57:01] WARNING: enabling "trust" authentication for local connections You can change this by editing gs_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run gs_initdb.
- A typical gs_guc log is as follows:
[2023-09-05 09:05:06] Begin to perform the total nodes: 3. Popen count is 3, Popen success count is 3, Popen failure count is 0. Begin to perform gs_guc for datanodes. [2023-09-05 09:05:07] expected instance path: [/var/lib/engine/data1/data/dn_6001/gaussdb.conf] expected instance path: [/var/lib/engine/data1/data/dn_6005/gaussdb.conf] gs_guc reload: key=value: [/var/lib/engine/data1/data/dn_6001/gaussdb.conf] server signaled gs_guc reload: key=value: [/var/lib/engine/data1/data/dn_6005/gaussdb.conf] server signaled Total instances: 2. Failed instances: 0. Success to perform gs_guc! Command count is 3, Command success count is 3, Command failure count is 0. Total instances: 6. Failed instances: 0. ALL: Success to perform gs_guc!
- A typical gs_cgroup log is as follows:
[de86987e4bc011eeb3befa163e8dd000][2023-09-05 15:51:49.372997][947][PreInstallUtility.py(setCgroup:1793)][gs_cgroup][DEBUG]:The gs_cgroup run with the following arguments: [/var/chroot/usr/local/package/dependency/bin/gs_cgroup -U Ruby --upgrade -c -H /var/chroot/usr/local/tool/Ruby ]. '/sys/fs/cgroup/cpu,cpuacct/CM:Ruby' exists, omit to create this cgroup. '/sys/fs/cgroup/cpu,cpuacct/CM:Ruby' exists, omit to create this cgroup.
- A typical gs_clean log is as follows:
2023-09-05 09:06:57 gs_clean: connected successfully
- A typical gs_ctl log is as follows:
[2023-09-05 08:00:59.538][4053][dn_6004_6005_6006][gs_ctl]: finish fsync all files.
- A typical gs_initgtm log is as follows:
[2023-09-05 09:05:06] gs_initgtm: input file location must be an absolute path.
- A typical gs_obs log is as follows:
2025-01-21 11:06:42.867| INFO|[140565224322816]|Enter complete_multi_part_upload successfully !
- A typical gtm_ctl log is as follows:
[2023-09-05 08:00:40] Set GTM syncmode succeeded.
- A typical gs_redis log is as follows:
2023-09-05 08:53:01 1693903981339 worker 140463824475904 [snapshot.snap_summary_stat_all_indexes] step[2]: END successfully
Maintenance Suggestion
You are advised to dump expired logs periodically to save disk space and prevent important logs from being lost.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot