Knowledge Search


[SRX] Syslog rotation interval behavior across different Junos OS versions

  [KB22281] Show Article Properties


This article provides information about the syslog rotation interval over different Junos versions.


Junos OS runs a process for checking the syslog file size to archive old files and start new ones at specific intervals. This is referred to as syslog file rotation.

The interval is preset and varies on Junos OS versions:

Excerpt from Junos OS 10.4R1:

# Rotate log files every 15mins, if necessary.
*/15 * * * * root newsyslog

Excerpt from Junos OS 10.4R3:

# Rotate log files every 1 min, if necessary.
*/1 * * * * root Excerpt

Prior to Junos OS 11.3, the interval for checking for syslog file rotation was hard-coded. Adding the ability to adjust the interval improves the usage of internal storage space as it can archive syslog files sooner. This also makes better use of space in /var/log partition.


Rotation times are as follows.

  •    Junos OS 10.4R2 and earlier:        15 minutes
  •    Junos OS 10.4R3 through 11.2:       1 minute
  •    Junos OS 11.3 and later codes:   User configurable (default 15 minutes)

To set log rotation times:

     #set system syslog log-rotate-frequency <minutes>

Junos OS 11.4 Example:

          root> file show /var/etc/crontab | match newsyslog
          */15 * * * * root newsyslog                           <---Default time
          root# set system syslog log-rotate-frequency 2

          root# commit
          commit complete
          root> file show /var/etc/crontab | match newsyslog
          */2 * * * * root newsyslog                            <---Time value based on configuration
Modification History:
2019-10-05: Minor, non-technical updates.
Related Links: