1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head><title>Manual Page: rotatelogs - Apache HTTP Server</title></head>
5 <body bgcolor="#ffffff" text="#000000" link="#0000ff"
6 vlink="#000080" alink="#ff0000">
7 <!--#include virtual="header.html" -->
8 <h1 align="center">Manual Page: rotatelogs</h1>
9 <!-- This document was autogenerated from the man page -->
10 <pre><strong>NAME</strong>
11 rotatelogs - rotate Apache logs without having to kill the
14 <strong>SYNOPSIS</strong>
15 <strong>rotatelogs </strong><em>logfile </em>[<em>rotationtime </em>[<em>offset</em>]] | [<em>filesize</em>M]
17 <strong>DESCRIPTION</strong>
18 <strong>rotatelogs </strong>is a simple program for use in conjunction with
19 Apache's piped logfile feature, which can be used like this:
21 CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common
25 CustomLog "|bin/rotatelogs /var/logs/logfile 5M" common
27 This creates the files /var/logs/logfile.nnnn where nnnn is
28 the system time at which the log nominally starts (this time
29 will always be a multiple of the rotation time, so you can
30 synchronize cron scripts with it). At the end of each rota-
31 tion time (here after 24 hours) a new log is started.
33 <strong>OPTIONS</strong>
35 The path plus basename of the logfile. If <strong>logfile</strong>
36 includes any Otherwise, the suffix .nnnnnnnnnn is
37 automatically added and is the time in seconds. Both
38 formats compute the start time from the beginning of
42 The rotation time in seconds.
45 The number of minutes offset from UTC. If omitted,
46 zero is assumed and UTC is used. For example, to use
47 local time in the zone UTC -5 hours, specify a value of
48 -<em>300 </em>for this argument.
53 The maximum file size in megabytes followed by the
54 letter 'M' to specify size rather than time. Use this
55 parameter in place of both rotationtime and offset.
57 <strong>PORTABILITY</strong>
58 The following logfile format string substitutions should be
59 supported by all <em>strftime</em>(<em>3</em>) implementations, see the
60 <em>strftime</em>(<em>3</em>) man page for library-specific extensions.
62 %A full weekday name (localized)
64 %a 3-character weekday name (localized)
66 %B full month name (localized)
68 %b 3-character month name (localized)
70 %c date and time (localized)
72 %d 2-digit day of month
74 %H 2-digit hour (24 hour clock)
76 %I 2-digit hour (12 hour clock)
78 %j 3-digit day of year
84 %p am/pm of 12 hour clock (localized)
88 %U 2-digit week of year (Sunday first day of week)
90 %W 2-digit week of year (Monday first day of week)
92 %w 1-digit weekday (Sunday first day of week)
106 <strong>SEE ALSO</strong>
107 <strong>httpd(8)</strong>
110 <!--#include virtual="footer.html" -->