26939c25250ad2d889339c3389684e5b961df942rbowen<?xml version='1.0' encoding='UTF-8' ?>
26939c25250ad2d889339c3389684e5b961df942rbowen<!DOCTYPE manualpage SYSTEM "/style/manualpage.dtd">
26939c25250ad2d889339c3389684e5b961df942rbowen<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
28124998a7472a188feee6496dd6f42f9b96b0ednd<!-- $LastChangedRevision$ -->
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen<!--
26939c25250ad2d889339c3389684e5b961df942rbowen Licensed to the Apache Software Foundation (ASF) under one or more
26939c25250ad2d889339c3389684e5b961df942rbowen contributor license agreements. See the NOTICE file distributed with
26939c25250ad2d889339c3389684e5b961df942rbowen this work for additional information regarding copyright ownership.
26939c25250ad2d889339c3389684e5b961df942rbowen The ASF licenses this file to You under the Apache License, Version 2.0
26939c25250ad2d889339c3389684e5b961df942rbowen (the "License"); you may not use this file except in compliance with
26939c25250ad2d889339c3389684e5b961df942rbowen the License. You may obtain a copy of the License at
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen http://www.apache.org/licenses/LICENSE-2.0
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen Unless required by applicable law or agreed to in writing, software
26939c25250ad2d889339c3389684e5b961df942rbowen distributed under the License is distributed on an "AS IS" BASIS,
26939c25250ad2d889339c3389684e5b961df942rbowen WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26939c25250ad2d889339c3389684e5b961df942rbowen See the License for the specific language governing permissions and
26939c25250ad2d889339c3389684e5b961df942rbowen limitations under the License.
26939c25250ad2d889339c3389684e5b961df942rbowen-->
26939c25250ad2d889339c3389684e5b961df942rbowen
ae382386f18506586972cdd63c09bb27a1685062nd<manualpage metafile="log_server_status.xml.meta">
26939c25250ad2d889339c3389684e5b961df942rbowen<parentdocument href="./">Programs</parentdocument>
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen<title>log_server_status - Log periodic status summaries</title>
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen<summary>
26939c25250ad2d889339c3389684e5b961df942rbowen <p>This perl script is designed to be run at a frequent interval by
26939c25250ad2d889339c3389684e5b961df942rbowen something like cron. It connects to the server and downloads the status
26939c25250ad2d889339c3389684e5b961df942rbowen information. It reformats the information to a single line and logs it to
26939c25250ad2d889339c3389684e5b961df942rbowen a file. Adjust the variables at the top of the script to specify the
26939c25250ad2d889339c3389684e5b961df942rbowen location of the resulting logfile. <module>mod_status</module> will
26939c25250ad2d889339c3389684e5b961df942rbowen need to be loaded and configured in order for this script to do its
26939c25250ad2d889339c3389684e5b961df942rbowen job.</p>
26939c25250ad2d889339c3389684e5b961df942rbowen</summary>
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen<section id="configure"><title>Usage</title>
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen<p>The script contains the following section.</p>
26939c25250ad2d889339c3389684e5b961df942rbowen
08bb23be3a4b8a7956668b0f3301541c69a5c0f1humbedooh<highlight language="perl">
9f63060b0f4231438f82a6b8056ffb2e5befcc2drbowenmy $wherelog = "/usr/local/apache2/logs/"; # Logs will be like "/usr/local/apache2/logs/19960312"
26939c25250ad2d889339c3389684e5b961df942rbowenmy $server = "localhost"; # Name of server, could be "www.foo.com"
26939c25250ad2d889339c3389684e5b961df942rbowenmy $port = "80"; # Port on server
26939c25250ad2d889339c3389684e5b961df942rbowenmy $request = "/server-status/?auto"; # Request to send
08bb23be3a4b8a7956668b0f3301541c69a5c0f1humbedooh</highlight>
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen<p>You'll need to ensure that these variables have the correct values,
26939c25250ad2d889339c3389684e5b961df942rbowenand you'll need to have the <code>/server-status</code> handler
26939c25250ad2d889339c3389684e5b961df942rbowenconfigured at the location specified, and the specified log location
26939c25250ad2d889339c3389684e5b961df942rbowenneeds to be writable by the user which will run the script.</p>
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen<p>Run the script periodically via cron to produce a daily log file,
26939c25250ad2d889339c3389684e5b961df942rbowenwhich can then be used for statistical analysis.</p>
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen</section>
26939c25250ad2d889339c3389684e5b961df942rbowen
26939c25250ad2d889339c3389684e5b961df942rbowen</manualpage>