logrotate period

Syntax

logrotate period {daily | hourly | monthly | weekly}

no logrotate period

Description

Sets the rotate period for the event logs, stored in the /var/log/event.log file, and authentication logs, stored in the /var/log/auth.log file. Defaults to daily.

A log file that exceeds either the logrotate <MAX-SIZE> value or the logrotate period (whichever happens first), triggers rotation for that log file.

The no form of this command resets the log rotation period to the default.

Command context

config

Parameters

daily

Rotates log files on a daily basis (default) at 1:00 am local time.

hourly

Rotates log files every hour at the first second of the hour.

monthly

Rotates log files monthly on the first day of the month.

weekly

Rotates log files once a week on Sunday.

Authority

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

Examples

switch(config)# logrotate period weekly