rotatelogs.html revision e932497ec59b2d85786df84a406303a89003e85e
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<html xmlns="http://www.w3.org/1999/xhtml">
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<head><title>Manual Page: rotatelogs - Apache HTTP Server</title></head>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<body bgcolor="#ffffff" text="#000000" link="#0000ff"
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkvlink="#000080" alink="#ff0000">
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<!--#include virtual="header.html" -->
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<h1 align="center">Manual Page: rotatelogs</h1>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<!-- This document was autogenerated from the man page -->
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<pre><strong>NAME</strong>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk rotatelogs - rotate Apache logs without having to kill the
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk server
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<strong>SYNOPSIS</strong>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk <strong>rotatelogs </strong><em>logfile </em>[<em>rotationtime </em>[<em>offset</em>]] | [<em>filesize</em>M]
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<strong>DESCRIPTION</strong>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk <strong>rotatelogs </strong>is a simple program for use in conjunction with
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk Apache's piped logfile feature, which can be used like this:
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk or
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk CustomLog &quot;|bin/rotatelogs /var/logs/logfile 5M&quot; common
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk This creates the files /var/logs/logfile.nnnn where nnnn is
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk the system time at which the log nominally starts (this time
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk will always be a multiple of the rotation time, so you can
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk synchronize cron scripts with it). At the end of each rota-
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk tion time (here after 24 hours) a new log is started.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk<strong>OPTIONS</strong>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk <em>logfile</em>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk The path plus basename of the logfile. If <strong>logfile</strong>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk includes any '%' characters, it is treated as a format
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk string for <em>strftime</em>(<em>3</em>). Otherwise, the suffix
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk .nnnnnnnnnn is automatically added and is the time in
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk seconds. Both formats compute the start time from the
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk beginning of the current period.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk <em>rotationtime</em>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk The rotation time in seconds.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk <em>offset</em>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk The number of minutes offset from UTC. If omitted,
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk zero is assumed and UTC is used. For example, to use
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk local time in the zone UTC -5 hours, specify a value of
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk -<em>300 </em>for this argument.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk or
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk <em>filesize</em>M
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk The maximum file size in megabytes followed by the
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk letter 'M' to specify size rather than time. Use this
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk parameter in place of both rotationtime and offset.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk<strong>PORTABILITY</strong>
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk The following logfile format string substitutions should be
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk supported by all <em>strftime</em>(<em>3</em>) implementations, see the
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk <em>strftime</em>(<em>3</em>) man page for library-specific extensions.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %A full weekday name (localized)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %a 3-character weekday name (localized)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %B full month name (localized)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %b 3-character month name (localized)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %c date and time (localized)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %d 2-digit day of month
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %H 2-digit hour (24 hour clock)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %I 2-digit hour (12 hour clock)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %j 3-digit day of year
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %M 2-digit minute
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %m 2-digit month
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %p am/pm of 12 hour clock (localized)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %S 2-digit second
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %U 2-digit week of year (Sunday first day of week)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %W 2-digit week of year (Monday first day of week)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %w 1-digit weekday (Sunday first day of week)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %X time (localized)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %x date (localized)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk %Y 4-digit year
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
%y 2-digit year
%Z time zone name
%% literal `%'
<strong>SEE ALSO</strong>
<strong>httpd(8)</strong>
</pre>
<!--#include virtual="footer.html" -->
</body></html>