Clearing GaussDB Run Logs

The GaussDB database generates a large volume of run logs during operation. You are advised to retain run logs generated in the latest one month only and clear other logs to prevent disk space waste.

Prerequisites

Context

Procedure

  1. Use PuTTY to log in to the UltraVR management server as user root.
  2. Run the TMOUT=0 command to prevent PuTTY from exiting due to session timeout.

    After you run this command, the system continues to run when no operation is performed, resulting a risk. For security purposes, you are advised to run exit to exit the system after completing your operations.

  3. Clear logs.

    1. Run the cd /opt/gs/app/data/pg_log command to go to the directory where the logs reside.
    2. Back up logs that are generated more than one month ago.
    3. Run the rm log name command to delete logs.


Copyright © Huawei Technologies Co., Ltd.