From 3821fbfeffff4e7489f65ce0227b0823335ef5b2 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Tue, 16 Feb 2010 22:23:09 +0000 Subject: [PATCH] Update transformations. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910732 13f79535-47bb-0310-9956-ffa450edef68 --- docs/man/htcacheclean.8 | 7 ++++-- docs/man/rotatelogs.8 | 16 +++++++++++-- docs/manual/programs/htcacheclean.html.en | 5 ++++ docs/manual/programs/rotatelogs.html.en | 28 +++++++++++++++++++---- 4 files changed, 47 insertions(+), 9 deletions(-) diff --git a/docs/man/htcacheclean.8 b/docs/man/htcacheclean.8 index da8b4fc9c5..371c8e9288 100644 --- a/docs/man/htcacheclean.8 +++ b/docs/man/htcacheclean.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTCACHECLEAN" 8 "2008-04-21" "Apache HTTP Server" "htcacheclean" +.TH "HTCACHECLEAN" 8 "2010-02-16" "Apache HTTP Server" "htcacheclean" .SH NAME htcacheclean \- Clean up the disk cache @@ -30,7 +30,7 @@ htcacheclean \- Clean up the disk cache \fBhtcacheclean\fR [ -\fBD\fR ] [ -\fBv\fR ] [ -\fBt\fR ] [ -\fBr\fR ] [ -\fBn\fR ] -\fBp\fR\fIpath\fR -\fBl\fR\fIlimit\fR .PP -\fBhtcacheclean\fR [ -\fBn\fR ] [ -\fBt\fR ] [ -\fBi\fR ] -\fBd\fR\fIinterval\fR -\fBp\fR\fIpath\fR -\fBl\fR\fIlimit\fR +\fBhtcacheclean\fR [ -\fBn\fR ] [ -\fBt\fR ] [ -\fBi\fR ] [ -\fBP\fR\fIpidfile\fR ] -\fBd\fR\fIinterval\fR -\fBp\fR\fIpath\fR -\fBl\fR\fIlimit\fR .SH "SUMMARY" @@ -64,6 +64,9 @@ Delete all empty directories\&. By default only cache files are removed, however -p\fIpath\fR Specify \fIpath\fR as the root directory of the disk cache\&. This should be the same value as specified with the CacheRoot directive\&. .TP +-P\fIpidfile\fR +Specify \fIpidfile\fR as the name of the file to write the process ID to when daemonized\&. +.TP -l\fIlimit\fR Specify \fIlimit\fR as the total disk cache size limit\&. The value is expressed in bytes by default (or attaching B to the number)\&. Attach K for Kbytes or M for MBytes\&. .TP diff --git a/docs/man/rotatelogs.8 b/docs/man/rotatelogs.8 index 84f19af933..a653c83859 100644 --- a/docs/man/rotatelogs.8 +++ b/docs/man/rotatelogs.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ROTATELOGS" 8 "2009-02-02" "Apache HTTP Server" "rotatelogs" +.TH "ROTATELOGS" 8 "2010-02-16" "Apache HTTP Server" "rotatelogs" .SH NAME rotatelogs \- Piped logging program to rotate Apache logs @@ -46,11 +46,14 @@ Causes the use of local time rather than GMT as the base for the interval or for -f Causes the logfile to be opened immediately, as soon as rotatelogs starts, instead of waiting for the first logfile entry to be read (for non-busy sites, there may be a substantial delay between when the server is started and when the first request is handled, meaning that the associated logfile does not "exist" until then, which causes problems from some automated logging tools) .TP +-t +Causes the logfile to be truncated instead of rotated\&. This is useful when a log is processed in real time by a command like tail, and there is no need for archived data\&. No suffix will be added to the filename, however format strings containing '%' characters will be respected\&. +.TP -v Produce verbose output on STDERR\&. The output contains the result of the configuration parsing, and all file open and close actions\&. .TP \fIlogfile\fR -The path plus basename of the logfile\&. If \fIlogfile\fR includes any '%' characters, it is treated as a format string for strftime(3)\&. Otherwise, the suffix \fI\&.nnnnnnnnnn\fR is automatically added and is the time in seconds\&. Both formats compute the start time from the beginning of the current period\&. For example, if a rotation time of 86400 is specified, the hour, minute, and second fields created from the strftime(3) format will all be zero, referring to the beginning of the current 24-hour period (midnight)\&. +The path plus basename of the logfile\&. If \fIlogfile\fR includes any '%' characters, it is treated as a format string for strftime(3)\&. Otherwise, the suffix \fI\&.nnnnnnnnnn\fR is automatically added and is the time in seconds (unless the -t option is used)\&. Both formats compute the start time from the beginning of the current period\&. For example, if a rotation time of 86400 is specified, the hour, minute, and second fields created from the strftime(3) format will all be zero, referring to the beginning of the current 24-hour period (midnight)\&. .TP \fIrotationtime\fR The time between log file rotations in seconds\&. The rotation occurs at the beginning of this interval\&. For example, if the rotation time is 3600, the log file will be rotated at the beginning of every hour; if the rotation time is 86400, the log file will be rotated every night at midnight\&. (If no data is logged during an interval, no file will be created\&.) @@ -99,6 +102,15 @@ This configuration will rotate the logfile whenever it reaches a size of 5 megab .PP This configuration will rotate the error logfile whenever it reaches a size of 5 megabytes, and the suffix to the logfile name will be created of the form errorlog\&.YYYY-mm-dd-HH_MM_SS\&. +.nf + + CustomLog "|bin/rotatelogs -t /var/logs/logfile 86400" common + +.fi + +.PP +This creates the file /var/logs/logfile, truncating the file at startup and then truncating the file once per day\&. It is expected in this scenario that a separate process (such as tail) would process the file in real time\&. + .SH "PORTABILITY" .PP diff --git a/docs/manual/programs/htcacheclean.html.en b/docs/manual/programs/htcacheclean.html.en index 9bce21834b..69abaab883 100644 --- a/docs/manual/programs/htcacheclean.html.en +++ b/docs/manual/programs/htcacheclean.html.en @@ -50,6 +50,7 @@ [ -n ] [ -t ] [ -i ] + [ -Ppidfile ] -dinterval -ppath -llimit

@@ -95,6 +96,10 @@
Specify path as the root directory of the disk cache. This should be the same value as specified with the CacheRoot directive.
+
-Ppidfile
+
Specify pidfile as the name of the file to write the + process ID to when daemonized.
+
-llimit
Specify limit as the total disk cache size limit. The value is expressed in bytes by default (or attaching B to the diff --git a/docs/manual/programs/rotatelogs.html.en b/docs/manual/programs/rotatelogs.html.en index 317859861c..d74f7449dc 100644 --- a/docs/manual/programs/rotatelogs.html.en +++ b/docs/manual/programs/rotatelogs.html.en @@ -65,6 +65,14 @@ and when the first request is handled, meaning that the associated logfile does not "exist" until then, which causes problems from some automated logging tools)
+
-t
+
Causes the logfile to be truncated instead of rotated. This is +useful when a log is processed in real time by a command like tail, +and there is no need for archived data. No suffix will be added to +the filename, however format strings containing '%' characters +will be respected. +
+
-v
Produce verbose output on STDERR. The output contains the result of the configuration parsing, and all file open and @@ -76,11 +84,12 @@ close actions.
includes any '%' characters, it is treated as a format string for strftime(3). Otherwise, the suffix .nnnnnnnnnn is automatically added and is the time in -seconds. Both formats compute the start time from the beginning of -the current period. For example, if a rotation time of 86400 is -specified, the hour, minute, and second fields created from the -strftime(3) format will all be zero, referring to the -beginning of the current 24-hour period (midnight). +seconds (unless the -t option is used). Both formats compute the +start time from the beginning of the current period. For example, +if a rotation time of 86400 is specified, the hour, minute, and +second fields created from the strftime(3) format will +all be zero, referring to the beginning of the current 24-hour +period (midnight).
rotationtime
@@ -148,6 +157,15 @@ an offset. will be created of the form errorlog.YYYY-mm-dd-HH_MM_SS.

+

+ CustomLog "|bin/rotatelogs -t /var/logs/logfile 86400" common +

+ +

This creates the file /var/logs/logfile, truncating the file at + startup and then truncating the file once per day. It is expected + in this scenario that a separate process (such as tail) would + process the file in real time.

+
top

Portability

-- 2.40.0