logrotate maxsize

Syntax

logrotate maxsize<最大尺寸>没有logrotate maxsize

描述

Specifies the maximum allowed log file size.

The没有form of this command resets the size of the log file to the default (100 MB).

Command context

config

Parameters

<最大尺寸>

Specifies the allowed size the log file can reach before it is compressed and stored locally or transferred to a remote host. The size is a value in the range of 10- 200 MB, and it cannot exceed 32 MB for transferred files.

Authority

Administrators or local user group members with execution rights for this command.

Usage

A log file that exceeds either the configured<MAX-SIZE>value or thelogrotate period, triggers rotation for that log file. Log rotation occurs during the next hourly maintenance cycle.

日志存储在本地(event logs in the/var/log/event.logfile, and authentication logs in the/var/log/auth.logfile) or transferred to the configured remote destination target using TFTP.

Examples

switch(config)#logrotate maxsize 32
switch(config)#没有logrotate maxsize