Rotate Log Files

Enhanced PTP User Guide (UG1602)

Document ID
Release Date
1.1 English

The sfptpdctl logrotate command causes the sfptpd daemon to close and reopen the log file, creating the file if it does not already exist, and overwriting the file if it does already exist.

Note: This command does not move or rename an existing log file.

To ensure any existing log file is kept, do one of the following:

  • Call the sfptpdctl logrotate command from the postrotate section of a standard Linux logrotate configuration file. For example:
        <path>/sfptpdctl logrotate || true
  • Move/rename the current log file before invoking the sfptpdctl logrotate command.