[Contents] [Prev] [Next] [Index] [Report an Error]


Step 5: Configure the Number and Size of Log Files

Purpose

By default, the JUNOS logging facility stops writing messages to a log file when the file reaches 128 KB in size. It closes the file and adds a numerical suffix, then opens and directs messages to a new file with the original name. By default, the JUNOS logging facility creates up to 10 files before it begins overwriting the contents of the oldest file.

Action

To configure the number and size of the log files, follow these steps:

  1. In configuration mode, go to one of the following hierarchy levels:
  2. [edit]
    
    user@host# edit system syslog 
    
    
    
    or
    
    
    
    [edit]
    
    user@host# edit system syslog filename
    
    
    
  3. Configure the number and size of the archive files:
  4. user@host# set archive files number size size
    
    
    

For example:

[edit system syslog]
user@host# set archive files 10 size 65536 

  1. Verify the configuration:
  2. user@host# show
    
    
    

For example:

[edit system syslog] 
user@host# show
archive size 64k files 10

  1. Commit the configuration:
  2. user@host# commit
    

See Also

See the JUNOS System Basics Configuration Guide for more detailed explanations and examples of log file configurations.


[Contents] [Prev] [Next] [Index] [Report an Error]