Vyatta Network OS Documentation

Learn how to install, configure and operate the Vyatta NOS, which helps drive our virtual networking & physical platforms portfolio.

Log file locations and archiving

Messages are written either to the main log file (the default) or a file that you specify. User-defined log files are written to the /var/log/user directory under the user-specified file name.

The system uses standard UNIX log rotation to prevent the file system from filling with log files. When log messages are written to a file, the system writes up to 250 KB of log messages into the logfile file, where logfile is either the main log file or a name you have assigned to a user-defined file. When the log file reaches its maximum size, the system closes it and compresses it into an archive file. The archive file is named logfile.1.gz.

At this point, the logging utility opens a new log file and begins to write system messages to it. When the new log file is full, the first archive file is renamed logfile.2.gz and the new archive file is named logfile.1.gz.

The system archives log files in this way until a maximum number of log files exist. By default, the maximum number of archive files is five (that is, up to logfile.5.gz), where logfile.1.gz always represents the most recent file. After the fifth file, the oldest archive log file is deleted as it is overwritten by the next oldest file.

To change the properties of log file archiving, configure the system syslog archive node with the following parameters.

  • Use the size parameter to specify the maximum size of each archive log file.
  • Use the files parameter to specify the maximum number of archive files to be maintained.