From dad9e8d40adecf5a7d2a2e3b77aa2548996ddf7b Mon Sep 17 00:00:00 2001 From: Rich Bowen Date: Thu, 12 Apr 2012 14:23:33 +0000 Subject: [PATCH] Move split-logfile and log_server_status into their own doc file, rather than having "other". Update index accordingly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1325282 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/programs/index.html.en | 4 +- docs/manual/programs/index.xml | 5 +- docs/manual/programs/log_server_status.xml | 61 ++++++++++++++++++++++ docs/manual/programs/split-logfile.xml | 59 +++++++++++++++++++++ 4 files changed, 124 insertions(+), 5 deletions(-) create mode 100644 docs/manual/programs/log_server_status.xml create mode 100644 docs/manual/programs/split-logfile.xml diff --git a/docs/manual/programs/index.html.en b/docs/manual/programs/index.html.en index e9045ee1c1..5348a71df7 100644 --- a/docs/manual/programs/index.html.en +++ b/docs/manual/programs/index.html.en @@ -93,7 +93,7 @@
Resolve hostnames for IP-addresses in Apache logfiles
-
log_server_status
+
log_server_status
Periodically log the server's status
@@ -101,7 +101,7 @@
Rotate Apache logs without having to kill the server
-
split-logfile
+
split-logfile
Split a multi-vhost logfile into per-host logfiles
diff --git a/docs/manual/programs/index.xml b/docs/manual/programs/index.xml index 1e518e51f6..14ba1526b1 100644 --- a/docs/manual/programs/index.xml +++ b/docs/manual/programs/index.xml @@ -93,8 +93,7 @@
Resolve hostnames for IP-addresses in Apache logfiles
-
log_server_status
+
log_server_status
Periodically log the server's status
@@ -102,7 +101,7 @@
Rotate Apache logs without having to kill the server
-
split-logfile
+
split-logfile
Split a multi-vhost logfile into per-host logfiles
diff --git a/docs/manual/programs/log_server_status.xml b/docs/manual/programs/log_server_status.xml new file mode 100644 index 0000000000..dd88089751 --- /dev/null +++ b/docs/manual/programs/log_server_status.xml @@ -0,0 +1,61 @@ + + + + + + + + +Programs + +log_server_status - Log periodic status summaries + + +

This perl script is designed to be run at a frequent interval by + something like cron. It connects to the server and downloads the status + information. It reformats the information to a single line and logs it to + a file. Adjust the variables at the top of the script to specify the + location of the resulting logfile. mod_status will + need to be loaded and configured in order for this script to do its + job.

+
+ +
Usage + +

The script contains the following section.

+ + +
+my $wherelog = "/usr/local/apache2/logs/";  # Logs will be like "/var/log/graph/19960312"
+my $server   = "localhost";        # Name of server, could be "www.foo.com"
+my $port     = "80";               # Port on server
+my $request = "/server-status/?auto";    # Request to send
+
+
+ +

You'll need to ensure that these variables have the correct values, +and you'll need to have the /server-status handler +configured at the location specified, and the specified log location +needs to be writable by the user which will run the script.

+ +

Run the script periodically via cron to produce a daily log file, +which can then be used for statistical analysis.

+ +
+ +
diff --git a/docs/manual/programs/split-logfile.xml b/docs/manual/programs/split-logfile.xml new file mode 100644 index 0000000000..2f2317a00a --- /dev/null +++ b/docs/manual/programs/split-logfile.xml @@ -0,0 +1,59 @@ + + + + + + + + +Programs + +split-logfile - Split up multi-vhost logfiles + + +

This perl script will take a combined Web server access log file and + break its contents into separate files. It assumes that the first field of + each line is the virtual host identity, put there using the "%v" + variable in LogFormat. +

+
+ +
Usage + +

Create a log file with virtual host information in it:

+ + + LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" + combined_plus_vhost
+ CustomLog logs/access_log combined_plus_vhost +
+ +

Log files will be created, in the directory where you run the + script, for each virtual host name that appears in the combined log file. + These logfiles will named after the hostname, with a + .log file extension.

+ +

The combined log file is read from stdin. Records read will be appended + to any existing log files.

+ + split-logfile < access_log + + +
+ +
-- 2.40.0