259 lines
13 KiB
HTML
259 lines
13 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="topic" />
|
|
<meta name="DC.Title" content="Log formats for HTTP Server (powered by Apache)" />
|
|
<meta name="abstract" content="This topic provides information about log formats and log files." />
|
|
<meta name="description" content="This topic provides information about log formats and log files." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzaieconcepts.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2002,2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2002,2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzaielogformat" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Log formats for HTTP Server (powered by Apache)</title>
|
|
</head>
|
|
<body id="rzaielogformat"><a name="rzaielogformat"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Log formats for HTTP Server (powered by Apache)</h1>
|
|
<div><p>This topic provides information about log formats and log files.</p>
|
|
<div class="important"><span class="importanttitle">Important:</span> Information
|
|
for this topic supports the latest PTF levels for HTTP Server for i5/OS .
|
|
It is recommended that you install the latest PTFs to upgrade to the latest
|
|
level of the HTTP Server for i5/OS. Some of the topics documented here are
|
|
not available prior to this update. See <a href="http://www-03.ibm.com/servers/eserver/iseries/software/http/services/service.html" target="_blank">http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm</a> <img src="www.gif" alt="Link outside Information Center" /> for more information. </div>
|
|
<p>Use the following information to understand log formats. For information
|
|
on how to configure logs, see <a href="rzaieconfiglogs.htm">Set up logs on HTTP Server (powered by Apache)</a>.
|
|
</p>
|
|
<p>Log files contain one line for each request. A line is composed of several
|
|
tokens separated by spaces. If a token does not have a value then it is represented
|
|
by a hyphen (-). A line in a log file might look like the following: </p>
|
|
<pre class="block">192.168.1.3 - - [18/Feb/2000:13:33:37 -0600] "GET / HTTP/1.0" 200 5073</pre>
|
|
<p>The following log file types are supported: </p>
|
|
<dl><dt class="dlterm">Common (Access) </dt>
|
|
<dd>This format is the common log file format defined by the W3C working group.
|
|
This format is compatible with many industry standard log tools. For more
|
|
information see the W3C common log format web site at <a href="http://www.w3.org/Daemon/User/Config/Logging.html" target="_blank">http://www.w3.org/Daemon/User/Config/Logging.html</a> <img src="www.gif" alt="Link outside Information Center" />. <p>The common
|
|
log format is defined by the following string: </p>
|
|
<pre>"%h %l %u %t \"%r\" %>s %b" </pre>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm">Extended (Access, Referer, and Agent) </dt>
|
|
<dd>This format has two types: NCSA extended log format and the W3C extended
|
|
log format. The NCSA extended log format is the common log format appended
|
|
with the agent and referer information. The W3C extended log format is defined
|
|
by the W3C working group and allows you to determine the format of the log
|
|
entry. For more information see the W3C extended log format web site at <a href="http://www.w3.org/TR/WD-logfile" target="_blank">http://www.w3.org/TR/WD-logfile</a> <img src="www.gif" alt="Link outside Information Center" />. <p>NCSA's extended
|
|
format is defined by the following string: </p>
|
|
<pre>"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"\%{User-agent}i\" </pre>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm">Data Description Specification (DDS) </dt>
|
|
<dd>This format is an iSeries™ database (physical) file in QSYS.LIB. This
|
|
format allows you to write a database query program to generate reports. This
|
|
format contains the same information as the common log format. </dd>
|
|
</dl>
|
|
<div class="section"><h4 class="sectiontitle">Tokens used to define log file formats</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" width="27.77777777777778%" id="d0e81">Token</th>
|
|
<th valign="top" width="72.22222222222221%" id="d0e83">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...a </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The remote client IP address. Example: <tt>192.168.1.3</tt> </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...A </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The local client IP address. Example: <tt>192.168.1.3 </tt></p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...b </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The number of bytes transmitted, excluding HTTP headers
|
|
in common log format. Example: <tt>- = no bytes transmitted </tt></p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...B </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The number of bytes transmitted, excluding HTTP headers
|
|
in extended log format. Example: <tt>0 = no bytes transmitted </tt></p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...{var}e </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The contents of the environment variable named var. </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...f </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The requested file name. Example: <tt>/www/index.htm</tt> </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...h </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The remote host name or IP address. Example: <tt>hal.ibm.com
|
|
or 192.168.1.3 </tt></p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...H </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The requested protocol. </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...{var}i </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The contents of the HTTP header line named var. Example: <tt>%{User-agent}i
|
|
= Mozilla/4.5 [en] (WinNT; U)</tt></p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...l </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The remote logname.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...m </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The request method.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...{var}n</pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The contents of the note named <tt>var</tt>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...{var}o </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The contents of the header lines named <tt>var</tt> in
|
|
the reply.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...p </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The canonical Port of the server serving the request.
|
|
Example: <tt>80</tt> </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...P </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The process ID that serviced the request. Example: <tt>837</tt> </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...q </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The query string (or search argument) prepended with
|
|
a "?". Example: <tt>?name=hal </tt></p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...r </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The first line of the request. Example: <tt>GET /
|
|
HTTP/1.0 </tt></p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...s </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The server response status. Example: <tt>200</tt> </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...t </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The time in common log format. Example: <tt>[21/Mar/2000:14:08:03
|
|
-0600] </tt></p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...{strftime}t</pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The time in <a href="rzaiestrftime.htm">strftime
|
|
format</a>. </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...T </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The time (in seconds) taken to serve the request.
|
|
Example: <tt>1</tt> </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...u </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The name of the authenticated remote user. Example: <tt>hal</tt> </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...U </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The requested URL path. Example:<tt> /</tt> </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...v </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The canonical server name of the server serving the
|
|
request. </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.77777777777778%" headers="d0e81 "><pre>%...V </pre>
|
|
</td>
|
|
<td valign="top" width="72.22222222222221%" headers="d0e83 "><p>The server name according to the UseCanonicalName
|
|
setting.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="note"><span class="notetitle">Note:</span> <ul><li>Logformat %D is not supported.</li>
|
|
<li>The "..." can be replaced with a condition for inclusion or it can be
|
|
omitted. The character < determines if the original value is logged. The
|
|
greater than character (>) determines if the redirected value is logged. The
|
|
condition may be preceded by a ! to reverse the condition. For example:
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" width="27.411167512690355%" id="d0e322">Condition</th>
|
|
<th valign="top" width="72.58883248730965%" id="d0e324">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="27.411167512690355%" headers="d0e322 "><pre>%>s </pre>
|
|
</td>
|
|
<td valign="top" width="72.58883248730965%" headers="d0e324 "><p>Logs the returned status.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.411167512690355%" headers="d0e322 "><pre>%{User-agent}i </pre>
|
|
</td>
|
|
<td valign="top" width="72.58883248730965%" headers="d0e324 "><p>Logs User-agent on all requests.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.411167512690355%" headers="d0e322 "><pre>%400,501{User-agent}i </pre>
|
|
</td>
|
|
<td valign="top" width="72.58883248730965%" headers="d0e324 "><p>Logs User-agent only when a 400 error (Bad Request)
|
|
or a 501 error (Not Implemented) is encountered.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="27.411167512690355%" headers="d0e322 "><pre>%!200,304,302{Referer}i</pre>
|
|
</td>
|
|
<td valign="top" width="72.58883248730965%" headers="d0e324 "><p>Logs Referer on all requests which did not return
|
|
some sort of normal status.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaieconcepts.htm" title="This topic provides concepts of functions on HTTP Server and IBM Web Administration for i5/OS interface.">Concepts of functions of HTTP Server</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |