Configuring Logrotate

Logrotate is a utility that rotates Web and FTP server log files based on the settings you choose. You can set your server log files to rotate four times a day, once a day, or once a week. You can also change the Logrotate settings at any time.

To configure Logrotate:

  1. In the System Menu, click Log Manager (Web Server section). The Logrotate window and the Automated Log Rotation Parameters form is displayed.

  2. In the Frequency field, choose the rate at which you want to rotate the log. Frequency options include:

  • 4 times daily. The log file will be rotated every 6 hours.

  • Daily. The log file will be rotated once every day.

  • Weekly. The log file will be rotated once a week.

  • Note: This schedule is kept unless the log file has not reached the size specified in the Log File Size field. In that case, rotation is deferred until the next scheduled rotation or until the log file reaches the specified limit.

  1. In the Log File Size field, enter the maximum size of the log file (in bytes, kilobytes, or megabytes). When log files reach this size, log rotation occurs even if no rotation is scheduled.

  2. In the Number of Archives field, enter the maximum number of archives you want to retain on the server. You can retain up to 5 archives. When the number of archives exceeds the number you specify, the oldest archive is rotated out-of-existence and emailed to the address you entered in the Email field.

  1. Important: When the number of log archives exceed the set value, the archive is deleted.

  1. In the Compression field, choose one of the following options:

  1. On - Select On to reduce the size of the log file and conserve disk space when it is archived. If you choose On, the file is compressed as a targz file, access-log.gz; to view the file later, you need to uncompress it using the gunzip and tar utilities.

  2. Note: To uncompress, use the gunzip utility (on Linux) or the WinZip utility (on Windows).
    If you are using the gunzip utility, you need to use the following command to uncompress the file.

    gunzip <filename>

    where
    <filename> is the name of the log file.

  1. Off- Select Off to archive the without compressing. The file will be saved as access-log.1.

In both cases, the system writes fresh log data to the empty access-log file, which is the current log file.

  1. Click Rotate Logs. The log is purged into an archive file, enabling the empty file to receive fresh logs.

Related Topics

!almost free webhosting, super sized account great features Sitemap 9 1 4 6 7