Restarting Log Processes

After modifying the device-side log configuration file, restart the log processes for the modification to take effect.

After the processes are restarted, the system checks whether the previous system log file has reached its capacity limit. If it has not reached the limit, the newly generated system logs will continue to be written into the previous log file. App logs are directly written into a new log file even if the previous log file has not reached the specified capacity limit.

To restart device-side log processes, you must have the permission to log in to the device.

Ascend RC Form

  1. Run the following command to terminate a log process (slogd, sklogd, or log-daemon):

    kill -15 PID

    You can run the ps -elf | grep log command to query the corresponding PID.

    Run the kill -15 command to terminate the slogd process. When the slogd process receives the termination signal, the system frees the shared memory. If you run the kill -9 command, the slogd process is forcibly terminated. In this case, no termination signal is received, which means that the shared memory (old log level information) will be retained to the next boot, resulting in inconsistency between the log level of flushed logs and the modified log level in the configuration file. If execution of the kill -15 command fails repeatedly, run the kill -9 command to forcibly terminate the log process.

  2. Restart the log process.

    For the Atlas 200/300/500 Inference Product, you need to manually start the log process.

    1. Switch to a common user (for example, the HwHiAiUser user):
      su HwHiAiUser
    2. Run the following commands to manually start a process:
      • Start the slogd process.
        nohup /var/slogd > /dev/null 2>&1 &
      • Start the sklogd process.
        nohup /var/sklogd > /dev/null 2>&1 &
      • Start the log-daemon process.
        nohup /var/log-daemon > /dev/null 2>&1 &
    3. Check that the log process (slogd, sklogd, or log-daemon) is started:
      ps -elf | grep log

    After a period of time, you are advised to run the ps -elf | grep log command to check whether the restart is successful. If the restart fails: After obtaining the logs, click here to contact technical support.

Restart Exception Handling

If the manual restart of a log process fails, the possible causes are as follows:
  • Abnormal slogd.pid owner

    Go to the /usr/slog directory and run the ls -l command to check whether the owner of slogd.pid is the root user. If yes, delete the file and then start the log process.

  • Drive space usage of the /var directory reaching 100%

    Go to the root directory and run the df -h command. If the drive space of the /var directory has reached 100%, delete some large old log files from the /var/log/npu/slog directory. After the deletion, start the log process.