]> granicus.if.org Git - apache/blob - docs/manual/programs/rotatelogs.html
- removed obs_* files
[apache] / docs / manual / programs / rotatelogs.html
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
12      server
13
14 <strong>SYNOPSIS</strong>
15      <strong>rotatelogs </strong><em>logfile </em>[<em>rotationtime </em>[<em>offset</em>]] | [<em>filesize</em>M]
16
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:
20
21      CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common
22          
23      or
24          
25      CustomLog &quot;|bin/rotatelogs /var/logs/logfile 5M&quot; common
26          
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.
32
33 <strong>OPTIONS</strong>
34      <em>logfile</em>
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
39           the current period.
40
41      <em>rotationtime</em>
42           The rotation time in seconds.
43
44      <em>offset</em>
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.
49                   
50           or
51           
52      <em>filesize</em>M
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.
56
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.
61
62      %A   full weekday name (localized)
63
64      %a   3-character weekday name (localized)
65
66      %B   full month name (localized)
67
68      %b   3-character month name (localized)
69
70      %c   date and time (localized)
71
72      %d   2-digit day of month
73
74      %H   2-digit hour (24 hour clock)
75
76      %I   2-digit hour (12 hour clock)
77
78      %j   3-digit day of year
79
80      %M   2-digit minute
81
82      %m   2-digit month
83
84      %p   am/pm of 12 hour clock (localized)
85
86      %S   2-digit second
87
88      %U   2-digit week of year (Sunday first day of week)
89
90      %W   2-digit week of year (Monday first day of week)
91
92      %w   1-digit weekday (Sunday first day of week)
93
94      %X   time (localized)
95
96      %x   date (localized)
97
98      %Y   4-digit year
99
100      %y   2-digit year
101
102      %Z   time zone name
103
104      %%   literal `%'
105
106 <strong>SEE ALSO</strong>
107      <strong>httpd(8)</strong>
108
109 </pre>
110 <!--#include virtual="footer.html" -->
111 </body></html>