Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

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

0

0

Article ID: KB22281 KB Last Updated: 05 Oct 2019Version: 4.0
Summary:

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

Symptoms:

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
Cause:

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.

Solution:

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
          [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
    
Modification History:
2019-10-05: Minor, non-technical updates.
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search