This file is indexed.

/usr/share/doc/wwwstat/wwwstat.html is in wwwstat 2.0-7.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
<HTML><HEAD>
<TITLE>wwwstat manual</TITLE>
</HEAD><BODY>
<H1>wwwstat manual</H1>
<H2>NAME</H2>
wwwstat - summarize WWW server (httpd) access statistics
<H2>SYNOPSIS</H2>
<B>wwwstat</B> [<B>-F</B> <I>system_config</I>] [<B>-f</B> <I>user_config</I>] [<I>options</I>...] [<B>--</B>] [ <I>summary</I> | <I>logfile</I> |  <B>+</B> | <B>-</B> ]... <H2>DESCRIPTION</H2>
<B>wwwstat</B> reads a sequence of
<B>httpd</B> <a href="#CLF">common logfile format (CLF)</a> access_log files
and/or prior <B>wwwstat</B> output summary files and/or the standard input
and outputs a summary of the access statistics in HTML.
<P>
Since
<B>wwwstat</B> does not make any changes to the input files or write any files in the
server directories, it can be run by any user with read access to the input
logfile(s) and summary file(s).  This allows people other than the webmaster
to run specialized analyses of just the things they are interested in 
summarizing.
</P>
<P>
<B>wwwstat</B> provides World Wide Web (WWW) access statistics, which does not necessarily
correspond to statistics on individual users. It counts the number of
<B>HTTP</B> requests received by the server
and the amount of bytes transmitted in response to those requests,
according to what is in the logfile(s), and outputs those counts
as tables broken down by category of request.
</P>
<P>
<B>wwwstat</B> output summaries can be read by
<B>gwstat</B> to produce fancy graphs of the summarized statistics.
The <B>splitlog</B> program can be used to split a large logfile into separate
files by entry prefix or URL path.
</P>
<P>
<B>wwwstat</B> is a
<B>perl</B> script, which means you need to have a
<B>perl</B> interpreter to run the program.  It has been tested with 
<B>perl</B> versions 4.036 and 5.002.
</P>
<H3>Output Sections</H3>
<B>wwwstat</B>'s output consists of a set of cross-reference links,
the sum totals and averages for the processed data, and
a sequence of amount-by-category tables partitioned into sections.
The section categories are based on the characteristics evident from
the access request, as provided by the
<a href="#CLF">common logfile format</a>. These include:
<TABLE>
<TR align=left valign=top><TH NOWRAP>Request Date
<TD>e.g., &quot;Feb  2 1996&quot;
<TR align=left valign=top><TH NOWRAP>Request Hour
<TD>e.g., &quot;00&quot; through &quot;23&quot;
<TR align=left valign=top><TH NOWRAP>Client Domain
<TD>The Fully-Qualified Domain Name (FQDN) suffix that corresponds to
an organization type or country name.
<TR align=left valign=top><TH NOWRAP>Reversed Subdomain
<TD>The FQDN, usually minus the first (machine name) component,
and reversed so that it is easier to read when sorted.
<TR align=left valign=top><TH NOWRAP>URL/Archive
<TD>Grouping based on Request-URI or non-success status code.
<TR align=left valign=top><TH NOWRAP>Identity
<TD>The user identity based on IdentityCheck token or Authorization field.
</TABLE>
<P>
Each section can be enabled/disabled using the configuration files or
command-line options (see
<a href="#secopts">Section Display Options</a>). </P>
<H3>Output Table Format</H3>
Inside each section, the statistics are presented as a preformatted table.
<P>
<CODE>
%Reqs %Byte  Bytes Sent  Requests  
</CODE><I>category-type</I> <BR>
<CODE>
----- ----- ------------ -------- |---------------
<BR>
NN.NN NN.NN NNNNNNNNNNNN NNNNNNNN |
</CODE><I>category-value</I> <BR>
<CODE>
100.0 100.0 NNNNNNNNNNNN NNNNNNNN |
</CODE><I>category-value</I> </P>
<P>
</P>
<TABLE>
<TR align=left valign=top><TH NOWRAP>Requests
<TD>Requests received for this category-value.
<TR align=left valign=top><TH NOWRAP>Bytes Sent
<TD>Bytes transmitted for this category-value.
<TR align=left valign=top><TH NOWRAP>%Reqs
<TD>(&lt;Requests&gt;/&lt;Total Requests&gt;)*100.
<TR align=left valign=top><TH NOWRAP>%Byte
<TD>(&lt;Bytes Sent&gt;/&lt;Total Bytes&gt;)*100.
</TABLE>
<P>
The table can be sorted by category-value
(<B>-sort key</B>), number of requests received
(<B>-sort req</B>), or number of bytes received
(<B>-sort byte</B>). It can also be limited to the
<B>-top</B><I> N</I> entries.
</P>
<H2>OPTIONS</H2>
<H3>Configuration Options</H3>
These options define how
<B>wwwstat</B> should establish defaults and interpret the command-line.
<DL COMPACT>
<DT><B>-F</B> <I>filename</I>
<DD>Get system configuration defaults from the given file.  If used, this
<B>must</B> be the first argument on the command-line, since it needs to be
interpreted before the other command options.  The file <B>wwwstat.rc</B>
is included with the distribution as an example of this file; it contains
<B>perl</B> source code which directly sets the control and display options
provided by <B>wwwstat</B>.
If <I>filename</I> is not a pathname,
the include path (see <a href="#FILES">FILES</a>) is searched for 
<I>filename</I>. An empty string as <I>filename</I> will disable this feature.
[<B>-F</B> &quot;wwwstat.rc&quot;]

<DT><B>-f</B> <I>filename</I>
<DD>Get user configuration defaults from the given file. If used, this
<B>must</B> be the first argument on the command-line after
<B>-F</B> (if any). The file is the same format as for the <B>-F</B>
option (see <B>wwwstat.rc</B>).
If <I>filename</I> is not a pathname,
the include path (see <a href="#FILES">FILES</a>) is searched for 
<I>filename</I>. An empty string as <I>filename</I> will disable this feature.
[<B>-f</B> &quot;.wwwstatrc&quot;]
<DT><B>--</B> <DD>Last option (the remaining arguments are treated as input files).
</DL>
<H3>Diagnostic Options</H3>
These options provide information about
<B>wwwstat</B> usage or about some unusual aspects of the logfile(s) being processed.
<DL COMPACT>
<DT><B>-h</B> <DD>Help - display usage information to STDERR and then exit.
<DT><B>-v</B> <DD>Verbose display to STDERR of each log entry processed.
<DT><B>-x</B> <DD>Display to STDERR all requests resulting in HTTP error responses.
<DT><B>-e</B> <DD>Display to STDERR all invalid log entries. Invalid log entries can occur
if the server is miswriting or overwriting its own log, if the request is
made by a broken client or proxy, or if a malicious attacker is trying to
gain privileged access to your system.  For the latter reason, the webmaster
should run
<B>wwwstat</B> with this option on a regular basis.
</DL>
<H3>Display Options</H3>
These options modify the output format.
<DL COMPACT>
<DT><B>-H</B><I> string</I> <DD>Use the given string as the HTML title and heading for output.
<DT><B>-X</B><I> string</I> <DD>Use the given string as the cross-reference URL to the last summary output.
Any occurrence of the characters &quot;%M&quot; or &quot;%Y&quot; are replaced by the month
and year, respectively, of the month prior to the first log entry date.
The empty string will exclude any cross-reference.
<DT><B>-R</B> <DD>Display the daily stats table sorted in reverse. This option is primarily
for use with the
<B>gwstat</B> program for producing graphs of the output.
<DT><B>-l</B>
<DT><B>-L</B> <DD>Do
(<B>-l</B>) or don't
(<B>-L</B>) display the full DNS hostname of clients in your local domain (which is
determined by the configured value of $AppendToLocalhost) in the section
on subdomain statistics.  The default
[<B>-L</B>] is to strip the machine name from local addresses.
<DT><B>-o</B>
<DT><B>-O</B> <DD>Do
(<B>-o</B>) or don't
(<B>-O</B>) display the full DNS hostname of clients outside your local domain
in the section on subdomain statistics.  The default
[<B>-O</B>] is to strip the machine name from outside addresses.
<DT><B>-u</B>
<DT><B>-U</B> <DD>Do
(<B>-u</B>) or don't
(<B>-U</B>) display the IP address of clients with unresolved domain names in the section
on subdomain statistics. The
<B>-dns</B> option can be used to resolve some names, but not all IP hosts have
a DNS name (SLIP/PPP connections) and sometimes a host's DNS service
is inaccessible. The default
[<B>-U</B>] is to group all such addresses under the category &quot;Unresolved&quot;.
<DT><B>-dns</B>
<DT><B>-nodns</B> <DD>Do
(<B>-dns</B>) or don't
(<B>-nodns</B>) use the system's hostname lookup facilities to find the DNS hostname
associated with any unresolved IP addresses. Looking up a DNS name may be
<B>very</B> slow, particularly when the results are negative (no DNS name),
which is why a caching capability is included as well.
[<B>-nodns</B>] <DT><B>-cache</B><I> filename</I> <DD>Use the given DBM database as the read/write persistent DNS cache
(the .dir and .pag extensions are appended automatically). Cached entries
(including negative results) are removed after the time configured for
$DNSexpires [two months].  No caching is performed if
<I>filename</I> is the empty string, which may be needed if your system does not support
DBM or NDBM functionality. Running
<B>-dns</B> without a persistent cache is not recommended.
[<B>-cache</B> &quot;dnscache&quot;]
<DT><B>-trunc</B><I> N</I> <DD>Truncate the URLs listed in the archive section after the
<I>Nth</I> hierarchy level. This option is commonly used to reduce the output size
and memory requirements of
<B>wwwstat</B> by grouping the requests by directory tree instead of listing every URL.
The default
[<B>-trunc 0</B>] is to display every requested URL.
<DT><B>-files</B>
<DT><B>-nofiles</B> <DD>Do
(<B>-files</B>) or don't
(<B>-nofiles</B>) include the last component of a URL (usually the filename) in the
archive section. This option is commonly used to reduce the output size
and memory requirements of
<B>wwwstat</B> by grouping the requests by directory instead of listing every URL.
The default
[<B>-files</B>] is to display the entire requested URL.
<DT><B>-link</B>
<DT><B>-nolink</B> <DD>Do
(<B>-link</B>) or don't
(<B>-nolink</B>) add a hypertext link around each archive URL.  This option is useful for
local maintenance, but it is not recommended for publication of the HTML
results (it often results in links to temporary or nonexistant resources,
and leads people/robots to resources that might not be publically available).
[<B>-nolink</B>]
<DT><B>-cgi</B>
<DT><B>-nocgi</B> <DD>Do
(<B>-cgi</B>) or don't
(<B>-nocgi</B>) prefix the summary output with CGI header fields appropriate for use
with the HTTP common gateway interface.  Using
<B>wwwstat</B> as a CGI script is not recommended - it is usually better to simply
run the wwwstat program periodically and serve the static output file.
[<B>-nocgi</B>]
</DL>
<H3><a name="secopts">Section Display Options</a></H3>
These options change the display of entire sections (as opposed to the
entries within those sections).  They allow the user to enable or disable
an entire section, set the sorting method for that section, and limit the
number of displayed entries for that section.  These options are
context-sensitive and processed in the order given.
<DL COMPACT>
<DT><B>-all</B>
<DT><B>-noall</B> <DD>Include
(<B>-all</B>) or exclude
(<B>-noall</B>) all of the display sections. The
<B>-noall</B> option is commonly used just prior to one or more of the other section
options, such that only the listed sections are displayed.
<DT><B>-daily</B>
<DT><B>-nodaily</B> <DD>Include
(<B>-daily</B>) or exclude
(<B>-nodaily</B>) the section of statistics by
request date
and set the scope for later
<B>-sort</B> and <B>-top</B> options to this section.
<DT><B>-hourly</B>
<DT><B>-nohourly</B> <DD>Include
(<B>-hourly</B>) or exclude
(<B>-nohourly</B>) the section of statistics by
request hour
and set the scope for later
<B>-sort</B> and <B>-top</B> options to this section.
<DT><B>-domain</B>
<DT><B>-nodomain</B> <DD>Include
(<B>-domain</B>) or exclude
(<B>-nodomain</B>) the section of statistics by
the client's Internet domain
and set the scope for later
<B>-sort</B> and <B>-top</B> options to this section.
<DT><B>-subdomain</B>
<DT><B>-nosubdomain</B> <DD>Include
(<B>-subdomain</B>) or exclude
(<B>-nosubdomain</B>) the section of statistics by
the client's Internet subdomain (reversed for display)
and set the scope for later
<B>-sort</B> and <B>-top</B> options to this section.
<DT><B>-archive</B>
<DT><B>-noarchive</B> <DD>Include
(<B>-archive</B>) or exclude
(<B>-noarchive</B>) the section of statistics by
requested URL/archive
and set the scope for later
<B>-sort</B> and <B>-top</B> options to this section.
<DT><B>-r</B>
<DT><B>-ident</B>
<DT><B>-noident</B> <DD>Include
(<B>-r</B> or <B>-ident</B>) or exclude
(<B>-noident</B>) the section of statistics by
the identity of the user (if IdentityCheck is ON) or the authentication
userid (if supplied)
and set the scope for later
<B>-sort</B> and <B>-top</B> options to this section.
<B>DO NOT PUBLISH</B> this information, as that would reveal security-related identities
and be a violation of privacy.  This option is provided for administrative
purposes only.
<DT><B>-sort</B> (<B>key|byte|req</B>) <DD>Sort this section by its primary key, the number of bytes transmitted,
or the number of requests received.  [<b>-sort key</b>]
<DT><B>-top</B><I> N</I> <DD>Display only the top N entries for this section. This option assumes that
the
<B>-sort</B> option has been set to either bytes or requests.
<DT><B>-both</B> <DD>Display both the top N entries for this section [10, sorted by requests],
and then the full section (all entries) sorted by key.
</DL>
<H3>Search Options</H3>
These options are used to limit the analysis to requests matching a
pattern.  The pattern is supplied in the form of a
<B>perl regular expression</B>, except that the characters &quot;+&quot; and &quot;.&quot; are escaped automatically
unless the
<B>-noescape</B> option is given.
Enclose the pattern in single-quotes to prevent the command shell
from interpreting some special characters.
<P>
Multiple occurrences of the same option results in an OR-ing of the
regular expressions.  Search options are only applied to logfile entries;
any summary files input must have been created with the same search options.
</P>
<DL COMPACT>
<DT><B>-a</B><I> regexp</I>
<DT><B>-A</B><I> regexp</I> <DD>Include
(<B>-a</B>) or exclude
(<B>-A</B>) all requests containing a hostname/IP address
matching the given perl regular expression.
<DT><B>-c</B><I> regexp</I>
<DT><B>-C</B><I> regexp</I> <DD>Include
(<B>-c</B>) or exclude
(<B>-C</B>) all requests resulting in an
<B>HTTP</B> status code
matching the given perl regular expression.
<DT><B>-d</B><I> regexp</I>
<DT><B>-D</B><I> regexp</I> <DD>Include
(<B>-d</B>) or exclude
(<B>-D</B>) all requests occurring on a date (e.g., &quot;Feb  2 1994&quot;)
matching the given perl regular expression.
<DT><B>-t</B><I> regexp</I>
<DT><B>-T</B><I> regexp</I> <DD>Include
(<B>-t</B>) or exclude
(<B>-T</B>) all requests occurring during the hour (e.g., &quot;23&quot; is 11pm - 12pm)
matching the given perl regular expression.
<DT><B>-m</B><I> regexp</I>
<DT><B>-M</B><I> regexp</I> <DD>Include
(<B>-m</B>) or exclude
(<B>-M</B>) all requests using an HTTP method (e.g., &quot;HEAD&quot;)
matching the given perl regular expression.
<DT><B>-n</B><I> regexp</I>
<DT><B>-N</B><I> regexp</I> <DD>Include
(<B>-n</B>) or exclude
(<B>-N</B>) all requests on a URL (archive name)
matching the given perl regular expression.
<DT><B>-noescape</B> <DD>Do not escape the special characters (&quot;+&quot; and &quot;.&quot;) in the remaining
search options.
</DL>
<H2>INPUT</H2>
After parsing the options, the remaining arguments on the command-line
are treated as input arguments and are read in the order given.
If no input arguments are given, the configured default logfile is read
[<B>+</B>].
<DL COMPACT>
<DT><B>-</B> <DD>Read from standard input (STDIN).
<DT><B>+</B> <DD>Read the default logfile. [as configured]
<DT><I>filename</I>... <DD>Read the given file and determine from the first line whether it is a
previous output summary or a CLF logfile.  If the
<I>filename</I>'s extension indicates that is is compressed (gz|z|Z), then pipe it through
the configured decompression program
[<B>gunzip -c</B>] first. Summary files must have been created with the same (or similar)
configuration and command-line options as the currently running program;
if not, weird things will happen.
</DL>
<H2>USAGE</H2>
<B>wwwstat</B> is used for many purposes:
<UL COMPACT>
<LI>as a diagnostic utility for measuring server activity, finding incorrect
URL references, and detecting attempted misuse of the server;
<LI>as a public relations tool for measuring technology or information transfer
(i.e., Is the message getting out? To the right people?);
<LI>as an archival tool for tracking web usage over time without storing
the entire logfile; and,
<LI>most often, as an easy mechanism for justifying all the hard work that went
into creating the web content that people out there are requesting.
</UL>
<P>
In most cases,
<B>wwwstat</B> is run on a periodic basis (nightly, weekly, and/or monthly) by a wrapper
program as a
<B>crontab</B> entry shortly after midnight, typically in conjunction
with rotating the current logfile.  The output is usually directed
to a temporary file which can later be moved to a published location.
The temporary file is necessary to avoid erasing your published file
during wwwstat's processing (which would look very odd if someone tried
to GET it from your web).
</P>
<P>
<B>wwwstat</B> can be run as a CGI script
(<B>-cgi</B>), but that is not recommended unless the input logfile is very small.
</P>
<P>
All of the command-line options, and a few options that are not available
from the command-line, can be changed within the user and system configuration
files (see
<B>wwwstat.rc</B>). These files are actually
<B>perl</B> library modules which are executed as part of the program's initialization.
The example provided with the distribution includes complete documentation
on what variables can be set and their range of values.
</P>
<H3>Perl Regular Expressions</H3>
The Search Options and many of the configuration file settings
allow for full use of perl regular expressions
(with the exception that the -a, -A, -n and -N options treat '+' and '.'
characters as normal alphabetic characters unless they are preceded by the
<B>-noescape</B> option).  Most people only need to know the following special characters:
<P>
</P>
<DL COMPACT>
<DT><B>^</B> <DD>at start of pattern, means &quot;starts with pattern&quot;.
<DT><B>$</B> <DD>at end of pattern, means &quot;ends with pattern&quot;.
<DT><B>(...)</B> <DD>groups pattern elements as a single element.
<DT><B>?</B> <DD>matches preceding element zero or one times.
<DT><B>*</B> <DD>matches preceding element zero or more times.
<DT><B>+</B> <DD>matches preceding element one or more times.
<DT><B>.</B> <DD>matches any single character.
<DT><B>[...]</B> <DD>denotes a class of characters to match. [^...] negates the class.
Inside a class, '-' indicates a range of characters.
<DT><B>(A|B|C)</B> <DD>matches if A or B or C matches.
</DL>
<P>
Depending on your command shell, some special characters may need to be
escaped on the command line or enclosed in single-quotes to avoid shell
interpretation.
</P>
<H2>EXAMPLES</H2>
<DL COMPACT>
<DT>Summarize requests from commercial domains.
<DD><B>wwwstat -a '.com$'</B> <DT>Summarize requests from the host kiwi.ics.uci.edu
<DD><B>wwwstat -a '^kiwi.ics.uci.edu$'</B> <DT>Summarize requests not from kiwi.ics.uci.edu
<DD><B>wwwstat -A '^kiwi.ics.uci.edu$'</B> <DT>Summarize requests resulting in temporary redirects
<DD><B>wwwstat -c '302'</B> <DT>Summarize requests resulting in server errors
<DD><B>wwwstat -c '^5'</B> <DT>Summarize unsuccessful requests
<DD><B>wwwstat -C '^2' -C '304'</B> <DT>Summarize requests in first week of the month
<DD><B>wwwstat -d ' [1-7] '</B> <DT>Summarize requests in second week of the month
<DD><B>wwwstat -d ' ([89]|1[0-4]) '</B> <DT>Summarize requests in third week of the month
<DD><B>wwwstat -d ' (1[5-9]|2[01]) '</B> <DT>Summarize requests in fourth week of the month
<DD><B>wwwstat -d ' 2[2-8] '</B> <DT>Summarize requests in leftover days of the month
<DD><B>wwwstat -d ' (29|30|31) '</B> <DT>Summarize requests in February
<DD><B>wwwstat -d 'Feb'</B> <DT>Summarize requests in year 1994
<DD><B>wwwstat -d '1994'</B> <DT>Summarize requests not in April
<DD><B>wwwstat -D 'Apr'</B> <DT>Summarize requests between midnight and 1am
<DD><B>wwwstat -t '00'</B> <DT>Summarize requests not received between noon and 1pm
<DD><B>wwwstat -T '12'</B> <DT>Summarize requests with a gif extension
<DD><B>wwwstat -n '.gif$'</B> <DT>Summarize requests under user's URL
<DD><B>wwwstat -n '^/~user/'</B> <DT>Summarize requests not under &quot;hidden&quot; paths
<DD><B>wwwstat -N '/hidden/'</B>
</DL>
<H2>ENVIRONMENT</H2>
<DL COMPACT>
<DT><B>HOME</B> <DD>Location of user's home directory, placed on INC path.
<DT><B>LOGDIR</B> <DD>Used instead of HOME if latter is undefined.
<DT><B>PERLLIB</B>
<DD>A colon-separated list of directories in which to look for
include and configuration files.
</DL>
<H2><a name="FILES">FILES</a></H2>
Unless a pathname is supplied, the configuration files are
obtained from the current directory, the user's home
directory (HOME or LOGDIR), the standard library path
(PERLLIB), and the directory indicated by the command
pathname (in that order).
<DL COMPACT>
<DT><B>.wwwstatrc</B> <DD>User configuration file.
<DT><B>wwwstat.rc</B> <DD>System configuration file.
<DT><B>domains.pl</B> <DD>Mapping of Internet domain to country or organization.
<DT><B>dnscache.dir</B>
<DT><B>dnscache.pag</B> <DD>DBM files for persistent DNS cache.
</DL>
<H2>SEE ALSO</H2>
<B>crontab</B>(1), <B>gwstat</B>(1), <B>httpd</B>(1m), <B>perl</B>(1),
<B>splitlog</B>(1)
<DL>
<DT><a name="more">More info</a> and the latest version of wwwstat
can be obtained from
<DD><a href="http://www.ics.uci.edu/pub/websoft/wwwstat/">http://www.ics.uci.edu/pub/websoft/wwwstat/</a><BR>
<a href="ftp://www.ics.uci.edu/pub/websoft/wwwstat/">ftp://www.ics.uci.edu/pub/websoft/wwwstat/</a>
</DL>
If you have any suggestions, bug reports, fixes, or enhancements,
please join the &lt;wwwstat-users@ics.uci.edu&gt; mailing list by sending
e-mail with &quot;subscribe&quot; in the subject of the message to the request
address &lt;wwwstat-users-request@ics.uci.edu&gt;.  The list is archived at
the above address.
</P>
<H3>More About HTTP</H3>
<DL>
<DT>HTTP/1.1 Proposed Standard
<DD>R. Fielding, J. Gettys, J. C. Mogul, H. Frystyk, and T. Berners-Lee.
&quot;Hypertext Transfer Protocol -- HTTP/1.1&quot;, U.C. Irvine, DEC, MIT/LCS,
August 1996.
<BR>
<a href="http://www.ics.uci.edu/pub/ietf/http/">http://www.ics.uci.edu/pub/ietf/http/</a>
</DL>
<H3>More About Perl</H3>
<DL>
<DT>The Perl Language Home Page
<DD><a href="http://www.perl.com/perl/index.html">http://www.perl.com/perl/index.html</a>
<DT>Johan Vromans' Perl Reference Guide
<DD><a href="http://www.xs4all.nl/~jvromans/perlref.html">http://www.xs4all.nl/~jvromans/perlref.html</a>
</DL>
<H2>DIAGNOSTICS</H2>
See also the
<B>Diagnostic Options</B> above.
<DL>
<DT>&quot;[none] to [none]&quot; dates
<DD><B>wwwstat</B> did not find any matching data to summarize.  If you get such an empty
summary, it means that either:
1) there was no valid data (the input files are all invalid or empty), or
2) none of the data matched the search options given.  Try using the
<B>-e</B> option to show invalid data.
<DT>100% unresolved
<DD>If the subdomain section indicates that all of the client requests come
from unresolved hostnames (IP addresses), this probably means that your
server is running without DNS resolution (common for very busy sites).
You can use the
<B>-dns</B> option to have
<B>wwwstat</B> perform the hostname lookups.  If 100% of the hosts are still unresolved
with the 
<B>-dns</B> option in effect, then it may be that all of the clients accessing your
server are doing so from temporary SLIP/PPP addresses without DNS names, or
it may be a problem with wwwstat's DNS cache (delete the cache files),
with your system's DNS software (contact your system administrator),
or with your network connection.
</DL>
<H2><a name="NOTES">NOTES</a></H2>
<H3>Hits vs Requests vs Visitors</H3>
<B>wwwstat</B> counts HTTP requests received by the server.  When a request is successful,
it is often referred to as a &quot;hit&quot;. Retrieving a single image is one GET
request. Retrieving an HTML page is also one GET request, but that does not
include the separate requests made for in-line images or related objects.
Checking to see if a cached image is still valid (a HEAD or conditional GET)
is also one request.
<P>
In all sections except the archive section,
<B>wwwstat</B> shows the statistics for all requests (successful or not).  In the archive
section, it normally shows all non-successful requests under a special category
for the status code and only successful requests (hits) under the URL or
archive tree associated with the request.  However, this grouping of
non-successful requests is disabled when
<B>wwwstat</B> is used with the search options
<B>-n</B>, <B>-c</B>, and <B>-C</B>, since those options are normally used for finding error conditions.
</P>
<P>
<B>wwwstat</B> does not count &quot;visitors&quot; -- individual people or programs making the
requests. HTTP does not, by default, provide any information that can be
accurately correlated to an individual person, though it is possible
(in an unreliable manner) to use HTTP extensions and request profiles
as a means of tracking individual client programs.  Such tracking
requires extensive resources (memory and diskspace) and is often considered
a violation of privacy.
</P>
<P>
With the exception of the ident section,
<B>wwwstat</B> does not reveal information about the individual people making requests.
Unless the output is limited to a specific URL or a specific hostname,
<B>wwwstat</B>'s output does not connect the requester to the URL being requested.
</P>
<H3><a name="CLF">Common Logfile Format</a></H3>
The httpd common logfile format (CLF) was defined in early 1994 as the
result of discussions among server and access_log analyzer developers
(Roy Fielding, John Franks, Kevin Hughes, Ari Luotonen, Rob McCool,
and Tony Sanders) on how to make it easier for analysis tools to be
used across multiple servers.  The format is:
<P>
remote_host ident authuser [date-time zone] &quot;Request-Line&quot; Status-Code bytes
</P>
<P>
</P>
<TABLE BORDER="2">
<TR align=left valign=top><TH NOWRAP>where
<TH>means
<TR align=left valign=top><TD NOWRAP>remote_host
<TD>Client DNS hostname or IP address
<TR align=left valign=top><TD NOWRAP>ident
<TD>Identity check token or &quot;-&quot;
<TR align=left valign=top><TD NOWRAP>authuser
<TD>Authorization user-id or &quot;-&quot;
<TR align=left valign=top><TD NOWRAP>date-time
<TD>dd/Mmm/yyyy:hh:mm:ss
<TR align=left valign=top><TD NOWRAP>zone
<TD>+dddd or -dddd
<TR align=left valign=top><TD NOWRAP>Request-Line
<TD>The first line of the HTTP request, which normally includes the
method, URL, and HTTP-version.
<TR align=left valign=top><TD NOWRAP>Status-Code
<TD>Response status from server or &quot;-&quot;
<TR align=left valign=top><TD NOWRAP>bytes
<TD>Size of Entity-Body transmitted or &quot;-&quot;
</TABLE>
<P>
with each field separated by a single space (it turns out that problems
occur if the ident token contains a space, which was not anticipated
by the original designers).
</P>
<H2>LIMITATIONS</H2>
<B>wwwstat</B> cannot be more accurate than its input.
<P>
The common logfile format does not include the amount of bytes transferred
in HTTP header fields and in error responses.
<B>wwwstat</B> attempts to estimate those bytes based on the response code.  Although
the built-in estimates will suffice for most applications, your results
will be more accurate if the estimates are customized for the particular
server software that generated the logfile.
</P>
<P>
Modern httpd servers have extended the CLF to include additional fields
(Referer and User-Agent) or to make the entire format configurable.
Although
<B>wwwstat</B> is able to read logfiles which append information to the CLF, it
will not make use of that additional information.  However,
<B>wwwstat</B> is written in
<B>perl</B>, so if you want to parse a different format all you have to do is change
the parsing code.
</P>
<P>
<B>wwwstat</B> does not do anything with Referer [sic] or User-Agent information that may be
present in extended logfiles.  In order to do anything interesting with
Referer, the program would have to build a Request-URI x Referer x Count
table, which would require huge gobs of memory and is better done using
a separate program with a persistent database.  Naturally, this is easy
to do once you learn
<B>perl</B>. </P>
<H2>AUTHOR</H2>
Roy Fielding (fielding@ics.uci.edu), University of California, Irvine.
Please do not send questions or requests to the author, since the number
of requests has long since overwhelmed his ability to reply, and all
future support will be through the <a href="#more">mailing list</a>.
<P>
<B>wwwstat</B> was originally based on a multi-server statistics program called
<B>fwgstat-0.035</B> by Jonathan Magid (jem@sunsite.unc.edu) which, in turn, was heavily based on
<B>xferstats</B> (packaged with the version 17 of the Wuarchive FTP daemon)
by Chris Myers (chris@wugate.wustl.edu).
</P>
<P>
This work has been sponsored in part by the Defense Advanced Research Projects
Agency under Grant Numbers MDA972-91-J-1010 and F30602-94-C-0218.
This software does not necessarily reflect the position or policy of the
U.S. Government and no official endorsement should be inferred.
</P>
</BODY></HTML>