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:
Example: 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.
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
[edit] root# set system syslog log-rotate-frequency 2
[edit] root# commit commit complete
root> file show /var/etc/crontab | match newsyslog */2 * * * * root newsyslog <---Time value based on configuration
2019-10-05: Minor, non-technical updates.