DEV Community

leo
leo

Posted on

OpenGauss common log introduction: operation log

operation log
The operation log refers to the log generated when the database administrator uses the tool to operate the database and when the tool is called by openGauss. If openGauss fails, you can use these log information to track what operations the user has performed on the database and reproduce the failure scenario.

Log file storage path

By default, it is in the "$GAUSSLOG/bin" directory. If the environment variable $GAUSSLOG does not exist or the variable value is empty, the tool log information will not be recorded in the corresponding tool log file, and the log information will only be printed to the screen.

Among them, $GAUSSLOG is "/var/log/gaussdb/ username " by default.

Note: If the om script is used to deploy, the log path is "/var/log/gaussdb/ username ".

Log file naming format

The log file naming format is:

tool name-log creation time.log
Tool name-log creation time-current.log
Among them, "tool name-log creation time.log" is the historical log file, and "tool name-log creation time-current.log" is the current log file.

If the log size exceeds 16MB, the current log file will be renamed as a historical log file and a new current log file will be generated at the current time when the tool is invoked next time.

For example, rename "gs_guc-2015-01-16_183728-current.log" to "gs_guc-2015-01-16_183728.log", and then regenerate "gs_guc-2015-01-17_142216-current.log".

maintenance advice

It is recommended to dump expired log files regularly to avoid a large number of logs occupying too much disk space and avoid loss of important logs.

Top comments (0)