Technical Documentation

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:
    [edit] user@host# edit system syslog or[edit]user@host# edit system syslog filename
  2. Configure the number and size of the archive files:
    user@host# set archive files number size size

    For example:

    [edit system syslog]user@host# set archive files 10 size 65536
  3. Verify the configuration:
    user@host# show

    For example:

    [edit system syslog] user@host# show archive size 64k files 10
  4. Commit the configuration:
    user@host# commit

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


Published: 2010-01-25