Supported Platforms
Related Documentation
- EX, M, MX, PTX, T Series, QFX Series standalone switches
- Specifying Log File Size, Number, and Archiving Properties
archive (All System Log Files)
Syntax
<binary-data | no-binary-data>;
<world-readable | no-world-readable> ;
Hierarchy Level
Release Information
Statement introduced before Junos OS Release 7.4.
Statement introduced in Junos OS Release 9.0 for EX Series switches.
Statement introduced in Junos OS Release 11.1 for the QFX Series.
Description
Configure archiving properties for all system log files.
Options
files number—Maximum number of archived log files to retain. When the Junos
OS logging utility has written a defined maximum amount of data to
a log file logfile
, it closes the file, compresses it, and renames it logfile.0.gz
(the amount of
data is determined by the size statement at this hierarchy
level). The utility then opens and writes to a new file called logfile
. When the new file
reaches the maximum size, the logfile.0.gz
file is renamed to logfile.1.gz
, and the new file is closed,
compressed, and renamed logfile.0.gz
. By default, the logging facility creates
up to ten archive files in this manner. Once the maximum number of
archive files exists, each time the active log file reaches the maximum
size, the contents of the oldest archive file are lost (overwritten
by the next oldest file).
Range: 1 through 1000
Default: 10 files
size size—Maximum
amount of data that the Junos OS logging utility writes to a log file logfile
before archiving it
(closing it, compressing it, and changing its name to logfile.0.gz
). The utility
then opens and writes to a new file called logfile
.
Syntax: x k to specify the number of kilobytes, x m for the number of megabytes, or x g for the number of gigabytes
Range: 64 KB through 1 GB
Default:
- 128 KB for EX Series switches and J Series routers
- 1 MB for M Series, MX Series, and T Series routers, and the QFX3500 switch
- 10 MB for TX Matrix and TX Matrix Plus routers
binary-data | no-binary-data—Mark file as containing binary data. This allows proper archiving of binary files, such as WTMP files (login records for UNIX based systems)..
Default: no-binary-data
world-readable | no-world-readable—Grant all users permission to read archived log files, or restrict the permission only to the root user and users who have the Junos OS maintenance permission.
Default: no-world-readable
Required Privilege Level
system—To view this statement in the configuration.
system-control—To add this statement to the configuration.
Related Documentation
- EX, M, MX, PTX, T Series, QFX Series standalone switches
- Specifying Log File Size, Number, and Archiving Properties
Published: 2014-07-23
Supported Platforms
Related Documentation
- EX, M, MX, PTX, T Series, QFX Series standalone switches
- Specifying Log File Size, Number, and Archiving Properties