DEV Community

leo
leo

Posted on

OpenGauss common log introduction: system log

system log
The logs generated by the openGauss runtime database node and the openGauss installation and deployment are collectively called system logs. If openGauss fails during operation, you can use these system logs to locate the cause of the failure in time, and formulate a method to restore openGauss according to the log content.

Log file storage path

The running logs of the database nodes are placed in the corresponding directories in "/var/log/gaussdb/username/pg_log".

The logs generated during the installation and uninstallation of OM openGauss are placed in the "/var/log/gaussdb/username/om" directory.

Log file naming format

Naming rules for database node running logs:

postgresql-creation time.log

By default, a new log file will be generated at 0 o'clock every day or when the log file is larger than 16MB or the database instance (database node) is restarted.

Naming rules for CM operation logs:

The log of cm_agent: cm_agent-creation time.log, cm_agent-creation time-current.log, system_call-creation time.log, system_call-creation time-current.log.
The log of cm_server: cm_server-creation time.log, cm_server-creation time-current.log; key_event-creation time.log, key_event-creation time-current.log.
om_monitor logs: om_monitor-creation time.log, om_monitor-creation time-current.log.
Among them, the file without the current identifier is the historical log file, and the file with the current identifier is the current log file. When the process is initially called, the process will first create a log file with the current identifier. When the size of the log file exceeds 16MB, the current log file will be renamed to a historical log file, and a new current log file will be generated at the current time .

Description of log content

The default format of the log content of each line of the database node:

Date + time + time zone + user name + database name + session ID + log level + log content

The default format of each line of log content of cm_agent, cm_server, and om_monitor:

Time + time zone + session ID + log content The SYSTEM_CALL system call log records the CM_AGENT calling tool commands during operation. The default format of each line of key_event log content: time + thread number + thread name: key event type + arbitration object instance ID + arbitration details.

Top comments (0)