wwwstat-2.0/004075500060720000146000000000000623743765700137245ustar00fieldinggrad00002420013033wwwstat-2.0/Changes010064400060720000146000000261120623743724400152060ustar00fieldinggrad00002420013033Changes to wwwstat: httpd logfile analysis package ================================================== Copyright (c) 1994, 1996 Regents of the University of California. See the file LICENSE for licensing and redistribution information. See the file INSTALL for installation information. See the file README for more information. If you have any suggestions, bug reports, fixes, or enhancements, join the mailing list by sending a mail message with "subscribe" in the subject to . Known problems 2.0 will be my last (planned) official release of wwwstat. I have set up the mailing list for people who would like to help each other use wwwstat or distribute modifications. List discussions, updates, and other trivia are archived at and . Version 2.0 04 November 1996 Added splitlog script for splitting logfile by virtual host or URL path. Added manual for splitlog in all three formats. Changed manpage.* to wwwstat.html and wwwstat.ps. Changed wwwstatrc to wwwstat.rc to be more PC-friendly (yuck). Changed mechanism for finding the configuration files on @INC. Made timestamp parser slightly more lenient (for phttpd brokenness). Removed unnecessary split on address. Version 2.0b1 07 October 1996 Added user and system config files [suggested by everyone]. Replaced old getopts with hand-coded function, which means that multiple search options are allowed (they get OR'd together). Added ability to read in any number of old summary files. Rewrote inclusion mechanism to parse by section heading. Added options to enable/disable output of CGI headers. Added options to enable/disable output by section. Added options to change sort ordering function for each section. Added options to display only top N for each section. Added option to display sections for both sorted top N and all entries. Added options to enable/disable creating link to each archive entry. Added options to truncate archive URL by level and/or filename. Added -R option for displaying daily stats in reverse order [Reinier Post]. Added -m|M options for selection based on the HTTP method. Added option to lookup DNS (with cached results) on unresolved addresses. Added option to disable escaping of "+" and "." in -aAnN regexps. Added config ability to exclude or replace any URL matching pattern with a special string in the archive listing. Added config ability to exclude or replace any subdomain match with a special string in the domain listing (overrides country-code). Removed parsing of srm.conf and -s option for greater portability. Removed -i include option (now we just look at first line of file). Added "--" as last option indicator (to avoid treating files as options). Added "-" as filename to indicate standard input. Added "+" as filename to indicate the default logfile. Added summary and estimates for all HTTP/1.1 status codes. Added %Y pattern for placing year in link to last summary. Added -X option for setting last summary URL on command-line. Added -H option for setting HTML title and heading text. Made the DirectoryIndex a perl regex so that it can match multiple forms of index/overview/... file or script names. Replaced country-codes file and initialization with the %DomainMap table in domains.pl, which will make it easier to override names. Now displays empty tables rather than error on no matching data. Added workaround for perl4 bug of overflowing %12d in printf. Stopped reversing of already-reversed unresolved subdomains. Forced parsing of timestamp to be more discriminating [Bob Kieronski]. Improved efficiency of matches containing variable patterns [Dan Klein]. Added example perl script for monthly log rotation. Added wwwerrs perl script for analyzing the error_log. Changed distribution URL for dual http/ftp access to my site. Added a new man page. Version 1.1 never released Added the ability to exclude today via the -D 'today' option (or include only today via -d 'today' option). This vastly simplifies nightly runs to generate the previous day's summary. Remove NULLs from the logfile entry before processing [Terry West]. Assume 200 response if "-" (unknown) is in logfile. Replace any %7E with the original tilde "~" in the archive section. Fix dumb browsers' inability to parse relative URLs (on 200 status). Added example for globbing "hidden" directories. Version 1.01 April 24, 1994 Minor change: new log format uses leading zero in day number field, so that is added to oldlog2new and blanked by space in wwwstat. Version 1.0 April 23, 1994 Now supports the NCSA httpd_1.2 "common" log format. As a result, all attempts to figure out file size are gone and there is no longer any need for all those fstat tests. Code for srm parsing of aliases and scripts has been removed. Basically, the entire log parsing section was rewritten and then placed in a subroutine to allow for multiple logfiles. Bunches of unnecessary backslashes removed from print statements. Time of last update now includes GMT offset instead of full GMT. Tries to estimate size of headers and error messages to account for bytes that are not included in the log entry byte count. Allows perl regular expressions (where possible) in all searches. Allows multiple logfiles to be analyzed in sequence, with any compressed logfiles automatically recognized by their file extension. Removed -f and -z options because they are no longer needed. Added -c option for searching based on server response code. Added the uppercase options -A, -C, -D, -T, and -N which perform the negation of the corresponding lowercase letters, i.e. they force wwwstat to not include any log entries with the given pattern in the address, response code, date, time, or archive name. Version 0.4 (later called oldwwwstat) April 19, 1994 Removed escapes to allow regular expressions in -d and -t searches. Fixed minor bug of outputing instead of . Made use of $startTag and $endTag explicit for report output. Added option to append subdomain info on end of local hosts. Added support for IdentityCheck (rfc931) logfile format. Added output of Totals by Remote Identifier when Do_Ident is requested. Added -r option to select Do_Ident when IdentityCheck is enabled. NOTE: For security reasons, you should not publish to the web any report that lists the Remote Identifiers. This option is intended for server maintenance only. Version 0.3 March 9, 1994 Added links for last server summary, table-of-contents, and a reference to the standard distribution site (all because similar things looked good in Kevin Hughes' getstats output). Automatically determines URL of previous month's summary. Now allows extra spaces on Alias directive lines in srm.conf. Now recognizes Redirect directives and estimates size of message. No longer counts automatically redirected directory names twice -- it estimates size of redirect message and counts that instead. Now uses normal printf's instead of perl forms. Reversed order of printed fields to allow for long names and the ability to read its own output (see the -i option below). Updated the country-codes file to reflect latest standards/spelling. Added the following options (phew!): Display Options: -h Help -- just display the usage message and quit. -e Display all invalid log entries on STDERR; -- this is great for finding trashed log entries for cleaning. -l Do display full IP address of clients in my domain. -L Don't display full IP address of clients in my domain. -o Do display full IP address of clients from other domains. -O Don't display full IP address of clients from other domains. -u Do display IP address from unresolved domain names. -U Don't display IP address from unresolved domain names. -v Verbose display (to STDERR) of each log entry processed; -- useful, but not recommended for long logs. -x Display all requests of nonexistant files to STDERR; -- this is great for finding misadvertized or moved URLs. Input Options: -f Read from the following access_log file instead of the default; -- allows you to read archived (or test) logfiles. -z Use zcat to uncompress the log file while reading [requires -f]; -- allows you to read compressed archive logfiles; use "gzip -9" to get factor of 10 reduction in file sizes. -s Get the server directives from the following srm.conf file; -- allows you to archive the configuration along with the log. -i Include the following file (assumed to be a prior wwwstat output); -- incredibly great, allows you to keep partial summary periods in wwwstat output files and purge the logfile. Inventive admins can find many uses for this, such as being used by scripts to provide fast, up-to-the-minute stats. Search Options (include in summary only those log entries): -a Containing the following "substring" in the IP address. -d Containing the following "substring" in the date. -t Containing the following "substring" in the time. -n Containing the following "substring" in the archive (URL) name. -- allows you to restrict logfile summaries to an area of particular interest; great for custom author summaries; Search strings are matched as substrings, prefix (if string starts with a caret "^"), or suffix (if string ends with "$"). Note that strings containing $ must be enclosed in single quotes for most shell command lines. Version 0.2 January 21, 1994 Added support for the /~username form of files. Added general support for Alias and ScriptAlias configurations. Now reads the server config file to get site configuration. Sped up the process by caching file sizes (fewer file stats). Added options to display full IP addresses in subdomain listing. Expanded some form field sizes. Now sorts archive section by name. Version 0.1 January 14, 1994 Added support for HTML output. Added reversed subdomain statistics. Added the logic for grouping files in archive sections. Rewrote the whole damn thing. Version 0.0 Originally from fwgstat 0.035 (jem@sunsite.unc.edu) with all the extra options stripped out and many bugs fixed. In turn, fwgstat was heavily based on xferstats, which is packaged with the Wuarchive FTP daemon. Fwgstat is for multi-server stats. l entries. Added options to enable/disable creating link to each archive entry. Added options to truncate archive URL by level and/or filename. Added -R option for displaying daily stats in reverse order [Reinier Post]. Added -m|M options for selection based on the HTTP method. Added option to lookup DNS (with cached results) on unresolved addresses. Added option to disable escaping of "+" and "." in -aAnN regexps. wwwstat-2.0/FAQ010064400060720000146000000143100622624441300142320ustar00fieldinggrad00002420013033Copyright (c) 1994, 1996 Regents of the University of California. See the file LICENSE for Licensing and Redistribution Information. See the file README for more information. ========================================================================== The latest version of wwwstat can be obtained from http://www.ics.uci.edu/pub/websoft/wwwstat/ ftp://www.ics.uci.edu/pub/websoft/wwwstat/ ========================================================================== Frequently Asked Questions 1. MAILING LIST Due to the popularity of this program, all questions, suggestions, bug reports, fixes, or enhancements should be sent to the wwwstat-users@ics.uci.edu mailing list and not to the author. You can join the list by sending e-mail with "subscribe" in the subject of the message to the request address wwwstat-users-request@ics.uci.edu The list is archived at the distribution site. Send "help" or "info" in the subject of a message to for more information on (un)subscribing. 2. Why is all that legalese in LICENSE necessary? Isn't wwwstat free? The LICENSE exists because others have abused the privilege of using free software. Because this software was developed by an employee of the University of California, we must protect ourselves from lawsuits by those who would abuse our legal system for personal gain, regardless of any actual damages. To our knowledge, no damage has ever been caused by this program. wwwstat is distributed free of charge and will remain so as long as it is legally possible. If you are not distributing the program to others, there is no need for you to include mention of the University of California in its output. However, I would prefer that you leave in the reference to wwwstat's distribution site (at the bottom of the output) so that others can know where to get the original program. wwwstat is in use around the world. If you have translated the output to another language (i.e. German, French, Maori, etc.), I encourage you to share those translations with others by sending the translated configuration file to the mailing list. 3. Will you be developing a version for other httpd's ... Obviously, versions of this program for every HTTP server would be nice. However, I don't have the time to install all those servers just to see how to do it. Feel free to do so yourself. The wwwstat program should work on any system with Perl 4.036 or 5.003 and on any logfile in the Common Logfile Format. It does not need to run on the same system as the httpd server, and will only need network access if the -dns option is being used. 4. I am still using NCSA httpd_1.1 (or earlier), which doesn't support the Common Logfile Format. What can I do? Well, first you should seek professional help. :) Anyone running a version of NCSA httpd prior to 1.4, or CERN httpd prior to 3.0, is running a program with KNOWN SECURITY HOLES. You should upgrade *immediately*, preferably to the Apache server . Version 1.01 of wwwstat included the oldwwwstat script for pre-CLF logfiles. That script is no longer supported, but may be found at the distribution site above. The oldlog2new program is provided for converting old NCSA logfiles (pre-1.2) to the common logfile format. 5. I am using the Apache server with a configurable logfile format. How do I get wwwstat to read the custom logfile? If you know perl, you can always try editing the wwwstat script so that it parses the different format. Seriously, this should be easy to do, provided that the format can be unambiguously parsed. The hard part is doing anything useful with the extra information provided by your custom format. The other option is to write your own conversion script that converts from the custom log format to the CLF. I am sure that I've seen this kind of program before, but I can't find it at the Apache site right now. 6. How do I setup a crontab script to run wwwstat nightly? Well, that depends on how your system's crontab works, but on mine (a Sun 4 running SunOS 4.1.2) I can edit the crontab with the command % crontab -e I have the following entry for my nightly script: 15 0 * * * /dc/ud/www/etc/update-stats and the following is my update stats script (thanks to Hal Varian) ---------------------------------------- #!/bin/sh /dc/ud/www/bin/wwwstat -D 'today' > /tmp/wwwstats.html mv -f /tmp/wwwstats.html /dc/ud/www/documentroot/Admin/wwwstats.html exit ---------------------------------------- 7. What is the general procedure for monthly resetting of the access_log? Again, that depends a great deal on how your site is set up and how frequent the accesses are to your server. My site gets about 150000 requests a month, so I have a perl script (monthly.pl) which I run a couple days after the beginning of each month. monthly.pl reads the logfile (assumed to contain more than one month's worth of WWW common logfile entries) and moves the prior month's entries into a separate file. The new file is created on TMPDIR (to avoid filling up the disk), compressed using gzip, and then moved to the archive directory. The program also restarts the httpd server. The monthly.pl script is provided AS AN EXAMPLE. You must configure it (by editing the script) before it can be safely used. Many sites will have too large a server load for only monthly resetting of the logs. In that case, modify the scripts so that they do things on a weekly or daily basis. Sorry, I do not have examples of that. 8. My server load is HUGE and wwwstat runs out of memory, what can I do? You can use the -trunc N option and/or the -nofiles option to reduce the memory consumed for the archive section. You can also reduce memory consumed by configuring special groupings using the %DomainMap and @ArchiveMap tables. Finally, you can exclude entire sections using the -no
options (see the man page). If all that fails, then just run wwwstat on less input. 9. What is perl? Where can I get it? Does perl work for my platform? See . *. MORE ANSWERS The above is just what I knew about prior to the current distribution. More questions and (hopefully) answers can be found at the FAQ page linked from the distribution site. wwwstat-2.0/INSTALL010064400060720000146000000117670623726125400147520ustar00fieldinggrad00002420013033Copyright (c) 1994, 1996 Regents of the University of California. See the file LICENSE for Licensing and Redistribution Information. See the file README for more information. ========================================================================== The latest version of wwwstat can be obtained from http://www.ics.uci.edu/pub/websoft/wwwstat/ ftp://www.ics.uci.edu/pub/websoft/wwwstat/ ========================================================================== Installation instructions: 0. You need Perl (4.036 or 5.002, or better) to run wwwstat. If you don't have it already, see for information on how to download and install perl. 1. Get the wwwstat package from the distribution site (above). Normally, it will be in the form of a gzip'd unix tar file. If it has not already been decompressed by your WWW client, than do: % gunzip wwwstat-2.0.tar.gz depending on which version (the 2.0) you downloaded. gunzip is part of the gzip compression/decompression package, which can be obtained from any Gnu software archive. 2. Move the resulting wwwstat-2.0.tar file to the directory above where you want to install wwwstat, cd to that directory, and do % tar xvf wwwstat-2.0.tar to create the directory ./wwwstat-2.0 containing the following: Changes -- the list of known problems and version information FAQ -- frequently asked questions INSTALL -- this file LICENSE -- Licensing and Redistribution information Makefile -- the makefile (for creating executables) README -- general intro and pointers to more information domains.pl -- a mapping of Internet domains to country/org names example.html -- an example of what wwwstat output should look like monthly.pl -- an example perl script for monthly log rotation oldlog2new.pl -- A tool for converting old NCSA logs to CLF format splitlog.1 -- the splitlog manual page splitlog.html -- the splitlog.1 manual converted to HTML format splitlog.ps -- the splitlog.1 manual converted to postscript splitlog.pl -- the main perl script for splitting the access_log splitlog.rc -- an example user configuration file for splitlog wwwerrs.pl -- an example perl script for reading the error_log wwwstat.1 -- the wwwstat manual page wwwstat.html -- the wwwstat.1 manual converted to HTML format wwwstat.ps -- the wwwstat.1 manual converted to postscript wwwstat.pl -- the main perl script for analyzing the access_log wwwstat.rc -- an example user/system configuration file 3. Edit the Makefile according to the instructions contained therein. Most likely, you only need to change the value of PERLBIN. 4. Run "make" in that directory. If your system does not have make, then you will have to manually edit the first line of each script, as in cp wwwstat.pl wwwstat chmod 755 wwwstat vi wwwstat and substitute #!YOUR_PERL_BINARY with #!/usr/local/bin/perl or whatever is the pathname for your perl executable. 5. Edit the wwwstat.rc file so that it corresponds to the default configuration for your server. The example file includes a complete description of each configurable parameter. If needed, you can also directly edit the wwwstat script to change any of the default settings. You can do the same for splitlog via splitlog.rc. 6. Read the man pages % nroff -man wwwstat.1 | more % nroff -man splitlog.1 | more which includes complete information on all the wwwstat and splitlog options and usage. The manuals are also available in HTML and postscript. 7. That's it. You should now be able to run wwwstat, e.g. % wwwstat > results.html 8. Optionally, you may want to install the script and its library files in generally accessible locations, as in % cp -p wwwstat /usr/local/bin/ % cp -p wwwstat.rc /usr/local/lib/perl/ % cp -p domains.pl /usr/local/lib/perl/ % cp -p wwwstat.1 /usr/local/man/man1/ I recommend that splitlog only be installed by a webmaster, since it won't be very useful for people with non-shared logfiles. 9. If wwwstat's libraries are not installed in the normal perl library, then you should add their location to the path in the environment variable PERLLIB, as in % setenv PERLLIB $PERLLIB:/usr/wherever/wwwstat-2.0 If you have some old (prior to NCSA httpd_1.2) logfiles that you want converted to the common logfile format, you will also need to customize the oldlog2new script. Usage information can be obtained via the -h option. The monthly.pl and wwwerrs.pl scripts are provided as examples, which may be very useful to some webmasters. However, they also require an understanding of perl (i.e., they are completely undocumented aside from the program comments). They are not part of the wwwstat program. wwwstat-2.0/LICENSE010064400060720000146000000156210623743724500147240ustar00fieldinggrad00002420013033wwwstat: httpd logfile analysis package Copyright (c) 1994, 1996 Regents of the University of California. ========================================================================== Licensing and Distribution Information: This software has been developed by Roy Fielding as part of the WebSoft project at the University of California, Irvine. wwwstat was originally based on a multi-server statistics program called fwgstat-0.035 by Jonathan Magid (jem@sunsite.unc.edu) which, in turn, was heavily based on xferstats (packaged with the version 17 of the wuarchive FTP daemon) by Chris Myers (chris@wugate.wustl.edu). Those parts of wwwstat derived from fwgstat and xferstats are in the public domain. The latest version of wwwstat can be obtained from http://www.ics.uci.edu/pub/websoft/wwwstat/ ftp://www.ics.uci.edu/pub/websoft/wwwstat/ The wwwstat package and those portions developed exclusively at the University of California are covered by the above copyright notice. Redistribution and use in source and binary forms are permitted, subject to the restrictions noted below, provided that the above copyright notice and this paragraph and the following paragraphs are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed in part by the University of California, Irvine. The name of the University may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS) EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Redistribution: The "Artistic License" Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End istribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Dewwwstat-2.0/Makefile010064400060720000146000000015040623076512300153420ustar00fieldinggrad00002420013033# This Makefile is used to configure the perl scripts so that # they all use the correct pathname for the perl interpreter. # It also makes the programs executable and creates links from "GET" # to the other commonly-used methods. Use the following command: # # % make all # # You need to change the following line to the full pathname # of your perl interpreter PERLBIN = /usr/local/bin/perl # and here are a some commands that may be system-dependent COPY = cp -p # The rest should be automatic CLIENTS = wwwstat wwwerrs monthly splitlog oldlog2new LIBS = domains.pl wwwstat.rc splitlog.rc .SUFFIXES: .SUFFIXES: .pl $(SUFFIXES) all: $(CLIENTS) .pl: cp $*.pl $* $(PERLBIN) -pi -e 's#YOUR_PERL_BINARY#$(PERLBIN)#o;' $* chmod 755 $* # # A "make clean" removes what "make all" produced # clean: $(RM) $(CLIENTS) wwwstat-2.0/README010064400060720000146000000034440623743724600146000ustar00fieldinggrad00002420013033wwwstat: httpd logfile analysis package Copyright (c) 1994, 1996 Regents of the University of California. wwwstat processes a sequence of httpd Common Logfile Format access_log files and prior summary outputs, and then outputs a summary of the access statistics in a nice HTML format. splitlog processes a sequence of httpd Common Logfile Format access_log files (or CLF with a one-field prefix) and splits the entries into separate files according to the requested URL and/or vhost prefix. ========================================================================== The latest version of wwwstat can be obtained from http://www.ics.uci.edu/pub/websoft/wwwstat/ ftp://www.ics.uci.edu/pub/websoft/wwwstat/ ========================================================================== See the file LICENSE for Licensing and Redistribution Information. See the file INSTALL for Installation Instructions. See the file FAQ for Frequently Asked Questions. See the file Changes for Version History and Known Problems. Please read the man pages, e.g., % nroff -man wwwstat.1 | more % nroff -man splitlog.1 | more which include complete information on all the wwwstat and splitlog options and usage. The man pages are also available in postscript and HTML. This software has been developed by Roy Fielding as part of the WebSoft project at the University of California, Irvine. See the man pages or Changes for information on how to join the wwwstat-users mailing list. 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. wwwstat-2.0/domains.pl010064400060720000146000000156160623076512400157030ustar00fieldinggrad00002420013033# Mapping of Internet Domain to Country/Organization Name # # The country codes are based on ISO 3166 two-character codes, but what # is important to us is that they correspond to the names assigned by # IANA for Internet domains. NOTE that these change over time! # # wwwstat matches domains to names using a suffix match of domain # components, with the first (longest) match being the categorization # for the stats-by-domain listing. These values can be added to or # overridden in the wwwstat.rc file, e.g. # # $DomainMap{'uci.edu'} = 'University of California, Irvine'; # # NOTE: The first (key) column below must be in lowercase. %DomainMap = ( 'ad', 'Andorra', 'ae', 'United Arab Emirates', 'af', 'Afghanistan', 'ag', 'Antigua and Barbuda', 'ai', 'Anguilla', 'al', 'Albania', 'am', 'Armenia', 'an', 'Netherlands Antilles', 'ao', 'Angola', 'aq', 'Antarctica', 'ar', 'Argentina', 'as', 'American Samoa', 'at', 'Austria', 'au', 'Australia', 'aw', 'Aruba', 'az', 'Azerbaijan', 'ba', 'Bosnia and Herzegovina', 'bb', 'Barbados', 'bd', 'Bangladesh', 'be', 'Belgium', 'bf', 'Burkina Faso', 'bg', 'Bulgaria', 'bh', 'Bahrain', 'bi', 'Burundi', 'bj', 'Benin', 'bm', 'Bermuda', 'bn', 'Brunei Darussalam', 'bo', 'Bolivia', 'br', 'Brazil', 'bs', 'Bahamas', 'bt', 'Bhutan', 'bv', 'Bouvet Island', 'bw', 'Botswana', 'by', 'Belarus', 'bz', 'Belize', 'ca', 'Canada', 'cc', 'Cocos (Keeling) Islands', 'cf', 'Central African Republic', 'cg', 'Congo', 'ch', 'Switzerland', 'ci', "Cote D'Ivoire (Ivory Coast)", 'ck', 'Cook Islands', 'cl', 'Chile', 'cm', 'Cameroon', 'cn', 'China', 'co', 'Colombia', 'cr', 'Costa Rica', 'cs', 'Czechoslovakia (former)', 'cu', 'Cuba', 'cv', 'Cape Verde', 'cx', 'Christmas Island', 'cy', 'Cyprus', 'cz', 'Czech Republic', 'de', 'Germany', 'dj', 'Djibouti', 'dk', 'Denmark', 'dm', 'Dominica', 'do', 'Dominican Republic', 'dz', 'Algeria', 'ec', 'Ecuador', 'ee', 'Estonia', 'eg', 'Egypt', 'eh', 'Western Sahara', 'er', 'Eritrea', 'es', 'Spain', 'et', 'Ethiopia', 'fi', 'Finland', 'fj', 'Fiji', 'fk', 'Falkland Islands (Malvinas)', 'fm', 'Micronesia', 'fo', 'Faroe Islands', 'fr', 'France', 'fx', 'France, Metropolitan', 'ga', 'Gabon', 'gb', 'Great Britain (UK)', 'gd', 'Grenada', 'ge', 'Georgia', 'gf', 'French Guiana', 'gh', 'Ghana', 'gi', 'Gibraltar', 'gl', 'Greenland', 'gm', 'Gambia', 'gn', 'Guinea', 'gp', 'Guadeloupe', 'gq', 'Equatorial Guinea', 'gr', 'Greece', 'gs', 'S. Georgia and S. Sandwich Isls.', 'gt', 'Guatemala', 'gu', 'Guam', 'gw', 'Guinea-Bissau', 'gy', 'Guyana', 'hk', 'Hong Kong', 'hm', 'Heard and McDonald Islands', 'hn', 'Honduras', 'hr', 'Croatia (Hrvatska)', 'ht', 'Haiti', 'hu', 'Hungary', 'id', 'Indonesia', 'ie', 'Ireland', 'il', 'Israel', 'in', 'India', 'io', 'British Indian Ocean Territory', 'iq', 'Iraq', 'ir', 'Iran', 'is', 'Iceland', 'it', 'Italy', 'jm', 'Jamaica', 'jo', 'Jordan', 'jp', 'Japan', 'ke', 'Kenya', 'kg', 'Kyrgyzstan', 'kh', 'Cambodia', 'ki', 'Kiribati', 'km', 'Comoros', 'kn', 'Saint Kitts and Nevis', 'kp', 'Korea (North)', 'kr', 'Korea (South)', 'kw', 'Kuwait', 'ky', 'Cayman Islands', 'kz', 'Kazakhstan', 'la', 'Laos', 'lb', 'Lebanon', 'lc', 'Saint Lucia', 'li', 'Liechtenstein', 'lk', 'Sri Lanka', 'lr', 'Liberia', 'ls', 'Lesotho', 'lt', 'Lithuania', 'lu', 'Luxembourg', 'lv', 'Latvia', 'ly', 'Libya', 'ma', 'Morocco', 'mc', 'Monaco', 'md', 'Moldova', 'mg', 'Madagascar', 'mh', 'Marshall Islands', 'mk', 'Macedonia', 'ml', 'Mali', 'mm', 'Myanmar', 'mn', 'Mongolia', 'mo', 'Macau', 'mp', 'Northern Mariana Islands', 'mq', 'Martinique', 'mr', 'Mauritania', 'ms', 'Montserrat', 'mt', 'Malta', 'mu', 'Mauritius', 'mv', 'Maldives', 'mw', 'Malawi', 'mx', 'Mexico', 'my', 'Malaysia', 'mz', 'Mozambique', 'na', 'Namibia', 'nc', 'New Caledonia', 'ne', 'Niger', 'nf', 'Norfolk Island', 'ng', 'Nigeria', 'ni', 'Nicaragua', 'nl', 'Netherlands', 'no', 'Norway', 'np', 'Nepal', 'nr', 'Nauru', 'nt', 'Neutral Zone', 'nu', 'Niue', 'nz', 'New Zealand (Aotearoa)', 'om', 'Oman', 'pa', 'Panama', 'pe', 'Peru', 'pf', 'French Polynesia', 'pg', 'Papua New Guinea', 'ph', 'Philippines', 'pk', 'Pakistan', 'pl', 'Poland', 'pm', 'St. Pierre and Miquelon', 'pn', 'Pitcairn', 'pr', 'Puerto Rico', 'pt', 'Portugal', 'pw', 'Palau', 'py', 'Paraguay', 'qa', 'Qatar', 're', 'Reunion', 'ro', 'Romania', 'ru', 'Russian Federation', 'rw', 'Rwanda', 'sa', 'Saudi Arabia', 'sb', 'Solomon Islands', 'sc', 'Seychelles', 'sd', 'Sudan', 'se', 'Sweden', 'sg', 'Singapore', 'sh', 'St. Helena', 'si', 'Slovenia', 'sj', 'Svalbard and Jan Mayen Islands', 'sk', 'Slovak Republic', 'sl', 'Sierra Leone', 'sm', 'San Marino', 'sn', 'Senegal', 'so', 'Somalia', 'sr', 'Suriname', 'st', 'Sao Tome and Principe', 'su', 'USSR (former)', 'sv', 'El Salvador', 'sy', 'Syria', 'sz', 'Swaziland', 'tc', 'Turks and Caicos Islands', 'td', 'Chad', 'tf', 'French Southern Territories', 'tg', 'Togo', 'th', 'Thailand', 'tj', 'Tajikistan', 'tk', 'Tokelau', 'tm', 'Turkmenistan', 'tn', 'Tunisia', 'to', 'Tonga', 'tp', 'East Timor', 'tr', 'Turkey', 'tt', 'Trinidad and Tobago', 'tv', 'Tuvalu', 'tw', 'Taiwan', 'tz', 'Tanzania', 'ua', 'Ukraine', 'ug', 'Uganda', 'uk', 'United Kingdom', 'um', 'US Minor Outlying Islands', 'us', 'United States', 'uy', 'Uruguay', 'uz', 'Uzbekistan', 'va', 'Vatican City State (Holy See)', 'vc', 'Saint Vincent and the Grenadines', 've', 'Venezuela', 'vg', 'Virgin Islands (British)', 'vi', 'Virgin Islands (U.S.)', 'vn', 'Viet Nam', 'vu', 'Vanuatu', 'wf', 'Wallis and Futuna Islands', 'ws', 'Samoa', 'ye', 'Yemen', 'yt', 'Mayotte', 'yu', 'Yugoslavia', 'za', 'South Africa', 'zm', 'Zambia', 'zr', 'Zaire', 'zw', 'Zimbabwe', 'com', 'Commercial', 'edu', 'Educational', 'gov', 'Government', 'int', 'International', 'mil', 'US Military', 'net', 'Network', 'org', 'Non-Profit Organization', 'arpa', 'Old style Arpanet', 'nato', 'Nato field', ); 1; # This must be the last line wwwstat-2.0/example.html010064400060720000146000000636550623722726200162460ustar00fieldinggrad00002420013033 World Wide Web Access Statistics for www.no_where.com

World Wide Web Access Statistics for www.no_where.com

Last updated: Mon, 07 Oct 1996 10:50:17 (GMT -0800)

Totals for Summary Period: Apr 20 1994 to Apr 22 1994

Requests Received During Summary Period            2082
Bytes Transmitted During Summary Period        23243392
Average Requests Received Daily                     694
Average Bytes Transmitted Daily                 7747797

Total Transfers by Request Date

%Reqs %Byte  Bytes Sent  Requests   Date
----- ----- ------------ -------- |------------
35.01 48.99     11387909      729 | Apr 20 1994
33.43 22.46      5220024      696 | Apr 21 1994
31.56 28.55      6635459      657 | Apr 22 1994

Total Transfers by Request Hour

%Reqs %Byte  Bytes Sent  Requests   Time
----- ----- ------------ -------- |-----
 4.61 17.33      4029057       96 |  00
 1.20  0.88       204121       25 |  01
 3.60  2.00       465015       75 |  02
 1.54  3.32       772363       32 |  03
 1.87  2.95       686771       39 |  04
 2.69  3.31       768372       56 |  05
 1.68  2.46       572340       35 |  06
 5.38  5.34      1241516      112 |  07
 4.32  3.97       921919       90 |  08
 6.24  5.64      1311868      130 |  09
 9.80  8.66      2012638      204 |  10
 6.00  5.75      1335809      125 |  11
 4.32  3.72       864705       90 |  12
 5.33  5.61      1304162      111 |  13
 8.36  5.97      1387109      174 |  14
10.90  5.78      1342549      227 |  15
 4.27  2.65       616708       89 |  16
 4.61  5.01      1164098       96 |  17
 1.97  2.03       472441       41 |  18
 4.32  1.97       458924       90 |  19
 2.69  2.74       636717       56 |  20
 1.68  1.17       271010       35 |  21
 1.73  0.96       222024       36 |  22
 0.86  0.78       181156       18 |  23

Total Transfers by Client Domain

%Reqs %Byte  Bytes Sent  Requests   Domain
----- ----- ------------ -------- |------------------------------------
 0.43  0.71       164185        9 | at    Austria
 1.01  0.74       171591       21 | au    Australia
 2.93  0.99       229441       61 | be    Belgium
 0.91  0.87       201592       19 | ca    Canada
 0.24  0.13        31260        5 | ch    Switzerland
 0.48  0.11        26606       10 | cl    Chile
 4.23  5.99      1392375       88 | de    Germany
 0.10  0.06        14808        2 | dk    Denmark
 0.62  0.78       181435       13 | fi    Finland
 1.20  1.70       395794       25 | fr    France
 3.07  2.02       469892       64 | it    Italy
 0.48  0.36        82646       10 | jp    Japan
 0.53  0.95       220641       11 | nl    Netherlands
 0.19  0.56       130828        4 | no    Norway
 0.10  0.04         9546        2 | nz    New Zealand (Aotearoa)
 0.14  0.06        14353        3 | pe    Peru
 1.15  1.05       244869       24 | se    Sweden
 1.63  1.85       429529       34 | uk    United Kingdom
14.60 16.23      3773157      304 | com   Commercial
21.52 21.53      5004903      448 | edu   Educational
 2.45  3.27       760723       51 | gov   Government
 0.82  1.00       231829       17 | mil   US Military
 0.05  0.02         4807        1 | net   Network
 0.38  0.91       211937        8 | org   Non-Profit Organization
33.81 32.38      7526401      704 | uci.edu 
 6.92  5.67      1318244      144 | unresolved 

Total Transfers by Reversed Subdomain

%Reqs %Byte  Bytes Sent  Requests   Reversed Subdomain
----- ----- ------------ -------- |------------------------------------
 6.92  5.67      1318244      144 | Unresolved
 0.14  0.31        72914        3 | at.ac.tuwien.edvz
 0.29  0.39        91271        6 | at.co.kapsch
 0.14  0.00          825        3 | au.csiro.dit.csis
 0.14  0.05        11909        3 | au.edu.curtin.cs
 0.05  0.00          277        1 | au.edu.monash.cc
 0.05  0.02         4267        1 | au.gov.erin
 0.14  0.09        20117        3 | au.oz.lat
 0.14  0.05        11267        3 | au.oz.su.cs.gh
 0.34  0.53       122929        7 | au.oz.su.maths
 2.93  0.99       229441       61 | be.ac.vub
 0.14  0.04         9823        3 | ca.carleton.sce
 0.14  0.06        14353        3 | ca.qc.hydro.smtl
 0.05  0.06        13762        1 | ca.sfu.cs
 0.10  0.20        45709        2 | ca.ualberta.cs
 0.05  0.05        11709        1 | ca.uottawa.csi
 0.05  0.16        37429        1 | ca.utoronto.utcs
 0.19  0.17        38697        4 | ca.uvic
 0.19  0.13        30110        4 | ca.uwaterloo
 0.05  0.06        13762        1 | ch.cern
 0.05  0.04        10303        1 | ch.epfl
 0.05  0.00         1046        1 | ch.unibe
 0.10  0.03         6149        2 | ch.unige
 0.48  0.11        26606       10 | cl.uchile
 0.05  0.16        37249        1 | com.ab.hh.cs
 0.10  0.02         5133        2 | com.allied.atsc
 0.10  0.26        60219        2 | com.alta
 0.10  0.06        14808        2 | com.amcc
 0.29  0.62       143876        6 | com.att
 0.29  0.23        52691        6 | com.att.research
 0.10  0.04         9546        2 | com.bah.src
 0.29  0.27        61818        6 | com.bellcore.base
 0.14  0.20        46975        3 | com.boeing
 0.10  0.06        14808        2 | com.cftnet.ppp253
 0.10  0.04         9546        2 | com.comsat.sdd
 0.24  0.73       169727        5 | com.cray
 0.10  0.04         9546        2 | com.cursci
 0.19  0.42        97199        4 | com.dec.pa
 0.19  0.09        20435        4 | com.delmarva
 0.10  0.06        14808        2 | com.dg.webo
 0.38  0.37        85328        8 | com.digifix
 1.34  0.81       187622       28 | com.digital.research.crl
 0.38  0.63       146836        8 | com.eds.ug
 0.34  0.50       115594        7 | com.eit
 0.14  0.37        86061        3 | com.eo
 0.10  0.06        14808        2 | com.ge
 0.05  0.05        11709        1 | com.gte
 0.67  0.28        65072       14 | com.hac
 0.10  0.06        14808        2 | com.hal
 0.72  0.31        72189       15 | com.halcyon
 0.53  1.59       368942       11 | com.hp
 0.10  0.09        20606        2 | com.hp.corp
 0.43  0.42        98720        9 | com.hp.itc.sv
 0.10  0.06        14808        2 | com.ibm.austin
 0.10  0.04         9546        2 | com.isx.east
 0.10  0.06        14808        2 | com.jpmorgan
 0.10  0.19        44772        2 | com.link.hso
 0.05  0.02         4291        1 | com.mmc.den
 0.14  0.39        91323        3 | com.nec.dl.syl
 0.05  0.04        10303        1 | com.netcom
 0.19  0.18        42332        4 | com.netweek
 0.10  0.03         6149        2 | com.phs
 0.19  0.45       105085        4 | com.rockwell.cca
 0.29  0.32        73803        6 | com.rockwell.dny.roses
 0.19  0.06        13025        4 | com.rockwell.rsoc
 0.19  0.07        15695        4 | com.saic
 0.58  1.08       250232       12 | com.sco
 0.10  0.10        23418        2 | com.sco.scocan
 0.53  0.20        45473       11 | com.sgi
 0.10  0.06        14808        2 | com.slb.wireline.clamart
 0.48  0.25        58654       10 | com.stsi
 1.44  1.84       427209       30 | com.sun
 0.10  0.04         9546        2 | com.syntex
 0.24  0.26        59529        5 | com.tandem.mpd
 0.05  0.02         5439        1 | com.tandem.posix
 0.24  0.45       105432        5 | com.tasc.read
 0.05  0.04         8701        1 | com.telebit.sunnyvale
 0.77  0.48       112401       16 | com.trw.fp
 0.10  0.06        14808        2 | com.vyne
 0.14  0.20        46755        3 | com.wired
 0.19  0.38        88133        4 | com.xerox
 0.05  0.04        10303        1 | de.dlr.go
 0.05  0.48       112581        1 | de.fh-karlsruhe
 0.14  0.03         6329        3 | de.fh-wolfenbuettel.rz
 0.05  0.04         8701        1 | de.fzi
 0.14  0.20        46755        3 | de.hu-berlin.rz
 0.10  0.18        41333        2 | de.mpg.mpi-sb.ag2
 0.38  0.21        47744        8 | de.rwth-aachen.informatik
 0.29  0.36        83144        6 | de.rwth-aachen.rz
 0.19  1.39       322973        4 | de.tu-muenchen.informatik
 0.10  0.20        45709        2 | de.uni-bonn.informatik
 2.07  0.66       153228       43 | de.uni-dortmund.informatik
 0.10  0.04         9546        2 | de.uni-frankfurt.rz
 0.14  0.20        46755        3 | de.uni-freiburg.informatik
 0.05  0.04        10303        1 | de.uni-karlsruhe.rz
 0.29  0.56       129419        6 | de.uni-paderborn
 0.10  1.37       317552        2 | de.uni-sb.cs
 0.10  0.06        14808        2 | dk.aau.kemi
 0.58  0.44       102722       12 | edu.berkeley
 0.05  0.02         5439        1 | edu.bgsu
 0.05  0.02         4291        1 | edu.brown.chem
 0.10  0.06        14808        2 | edu.buffalo.cs
 0.10  0.06        14808        2 | edu.byu.cs
 0.14  0.05        11388        3 | edu.caltech.cco
 0.14  0.39        91323        3 | edu.caltech.galcit
 0.19  0.05        12298        4 | edu.cmu.andrew.bh
 0.10  0.03         6149        2 | edu.cmu.andrew.hl
 0.19  0.05        12298        4 | edu.cmu.andrew.res
 0.14  0.05        11588        3 | edu.cmu.cheme
 0.10  0.03         6149        2 | edu.cmu.cs.ius
 0.14  0.08        19304        3 | edu.cmu.cs.mt
 0.10  0.06        14808        2 | edu.cmu.cs.slip
 0.10  0.03         6149        2 | edu.cmu.heinz
 0.10  0.04        10359        2 | edu.cmu.sei
 0.10  0.03         6149        2 | edu.colorado
 0.19  0.12        28817        4 | edu.colorado.cs
 0.19  0.53       123270        4 | edu.columbia.dorm.wien
 0.24  0.78       181420        5 | edu.cornell.law
 0.19  1.44       334954        4 | edu.csuchico.ecst
 0.10  0.03         6149        2 | edu.ctc
 0.29  0.26        60388        6 | edu.emory.chem
 0.10  0.03         5987        2 | edu.exploratorium
 0.05  0.02         5439        1 | edu.fsu.acns-slp
 0.67  0.87       203062       14 | edu.gatech
 0.34  0.12        28164        7 | edu.gatech.cc
 0.14  0.04        10440        3 | edu.gmu.isse
 0.14  0.05        10977        3 | edu.harvard
 0.19  0.26        61539        4 | edu.harvard.hbs
 0.19  0.06        13512        4 | edu.iastate.cs
 0.14  0.05        11153        3 | edu.iastate.vincent
 0.05  0.04        10303        1 | edu.indiana.cs
 0.10  0.04         9546        2 | edu.indiana.ucs
 0.10  0.03         6149        2 | edu.loyola
 1.87  0.19        43806       39 | edu.miami.rsmas
 0.58  0.18        42341       12 | edu.mills
 0.19  0.45       105085        4 | edu.missouri.phlab
 0.14  0.09        20741        3 | edu.mit
 0.19  0.42        97199        4 | edu.mit.ai
 0.14  0.20        46755        3 | edu.msstate.cc
 0.14  0.22        50742        3 | edu.mtu.lib
 0.05  0.06        13762        1 | edu.ncsu.cfr
 0.10  0.06        14808        2 | edu.ncsu.ece
 0.19  0.16        36898        4 | edu.ncsu.eos
 0.10  0.04         9546        2 | edu.ncsu.stat
 2.59  1.76       408840       54 | edu.neu.ccs
 0.10  0.04         9546        2 | edu.nwu.eecs
 0.29  0.04         9785        6 | edu.pima
 0.05  0.06        13762        1 | edu.pitt.scrc
 0.10  0.04         9546        2 | edu.psu.stat
 0.19  0.59       135986        4 | edu.purdue.cc
 0.10  0.03         6967        2 | edu.purdue.ecn
 0.14  0.05        10956        3 | edu.rpi.its
 0.05  0.16        37429        1 | edu.scarolina.biol
 0.10  0.03         6149        2 | edu.shsu
 0.19  0.44       103032        4 | edu.stanford
 0.34  0.52       119886        7 | edu.tamu
 0.10  0.08        18640        2 | edu.tamu.cs
 0.10  0.03         6149        2 | edu.temple.ocis
 0.34  0.48       111581        7 | edu.ucdavis
 0.43  0.13        30810        9 | edu.ucdavis.cs
 0.10  0.04         9546        2 | edu.uci
 2.55  0.80       186719       53 | edu.uci.acs
 0.05  0.02         4739        1 | edu.uci.ece
 0.19  0.29        67654        4 | edu.uci.eng
 0.10  0.05        10878        2 | edu.uci.hnet
28.63 29.44      6842468      596 | edu.uci.ics
 0.19  0.10        23601        4 | edu.uci.lib
 1.63  1.08       250474       34 | edu.uci.nts.slip
 0.38  0.56       130322        8 | edu.uci.oac
 0.10  0.04         9546        2 | edu.ucla.asucla
 0.91  0.09        20519       19 | edu.ucla.seas
 0.67  0.94       217762       14 | edu.ucr
 0.10  0.06        14808        2 | edu.ucsb.mcl
 0.05  0.06        13762        1 | edu.ucsd
 0.05  0.05        11709        1 | edu.udel.cms
 0.10  0.06        14808        2 | edu.ufl.ee.tcad
 0.14  0.39        91323        3 | edu.uidaho.phys
 0.19  0.49       114094        4 | edu.ukans.cecase
 0.24  1.16       269777        5 | edu.umass.cs
 0.05  0.02         5439        1 | edu.umass.ucs
 0.19  0.55       127257        4 | edu.umd.eng
 0.14  0.40        93237        3 | edu.umich.ifs
 0.10  0.39        90277        2 | edu.umn.stu
 0.05  0.02         4807        1 | edu.unlv.cs
 0.24  0.43       100869        5 | edu.usc
 0.10  0.04         9546        2 | edu.utah.math
 0.48  0.92       214320       10 | edu.utexas.cc
 0.38  0.37        86086        8 | edu.utexas.psy
 0.77  0.39        89787       16 | edu.vt.ee
 0.14  0.27        62307        3 | edu.vt.sv
 0.10  0.02         5133        2 | edu.washington.biotech
 0.10  0.06        14808        2 | edu.washington.tjp
 0.24  0.08        18464        5 | edu.washington.u
 0.24  0.98       227011        5 | edu.wayne.science
 0.05  0.02         4807        1 | edu.whittier
 0.82  0.36        84445       17 | edu.wisc.cs
 0.10  0.03         6149        2 | edu.wwc
 0.14  0.39        91323        3 | fi.csc
 0.34  0.04         8260        7 | fi.helsinki
 0.14  0.35        81852        3 | fi.lut.cc
 0.10  0.06        14808        2 | fr.cnet.lannion
 0.10  0.06        14808        2 | fr.ens
 0.58  1.23       285980       12 | fr.ifremer
 0.05  0.05        11709        1 | fr.imag
 0.05  0.04        10303        1 | fr.loria
 0.14  0.12        28570        3 | fr.u-strasbg
 0.10  0.06        14808        2 | fr.univ-mrs
 0.10  0.06        14808        2 | fr.univ-rennes1
 0.05  0.04        10303        1 | gov.anl.aps1
 0.05  0.04         8701        1 | gov.lbl
 0.19  0.08        18644        4 | gov.llnl
 0.48  1.29       299041       10 | gov.nasa.arc
 0.24  0.15        33907        5 | gov.nasa.gsfc
 0.43  0.33        77769        9 | gov.nasa.jpl
 0.10  0.04         9546        2 | gov.nasa.jsc
 0.24  0.17        40413        5 | gov.nasa.lerc
 0.19  0.47       108848        4 | gov.noaa.ncdc
 0.29  0.53       123935        6 | gov.ornl.ctd
 0.10  0.06        14808        2 | gov.ornl.xdoe
 0.10  0.06        14808        2 | gov.osti
 0.38  0.37        85249        8 | it.cnr.mi.siam
 0.19  0.40        93212        4 | it.infn.roma1
 0.38  0.19        44703        8 | it.polimi.cdc
 1.87  0.39        91511       39 | it.stet.cselt
 0.24  0.67       155217        5 | it.unipi.di
 0.19  0.05        12298        4 | jp.ac.hokudai.huie
 0.05  0.04        10303        1 | jp.ac.kyushu-u.csce
 0.05  0.02         4807        1 | jp.ac.u-tokyo.s.chem
 0.19  0.24        55238        4 | jp.co.nec.gate
 0.10  0.02         5133        2 | mil.af.afit
 0.29  0.55       128926        6 | mil.army.cecer
 0.24  0.08        19098        5 | mil.army.pica
 0.10  0.34        78122        2 | mil.darpa
 0.10  0.00          550        2 | mil.navy.dt
 0.05  0.02         4807        1 | net.tiac
 0.14  0.26        61265        3 | nl.esa.estec.jw
 0.10  0.12        27524        2 | nl.rug.cs
 0.29  0.57       131852        6 | nl.vu.cs
 0.10  0.52       121282        2 | no.dhmolde
 0.10  0.04         9546        2 | no.nta
 0.10  0.04         9546        2 | nz.ac.otago
 0.10  0.06        14808        2 | org.eso.hq
 0.24  0.69       159700        5 | org.io
 0.05  0.16        37429        1 | org.rand
 0.14  0.06        14353        3 | pe.net.rcp
 0.14  0.22        50742        3 | se.chalmers.dtek
 0.29  0.25        58919        6 | se.ericsson
 0.10  0.04         9546        2 | se.lth.efd
 0.05  0.04         8701        1 | se.luth.ludd
 0.43  0.11        25638        9 | se.luth.sm
 0.14  0.39        91323        3 | se.sunet.pilsnet
 0.05  0.33        76515        1 | uk.ac.abdn.biomed
 0.10  0.03         6149        2 | uk.ac.brunel
 0.05  0.02         5439        1 | uk.ac.ed
 0.14  0.39        91323        3 | uk.ac.ed.dcs
 0.05  0.04        10303        1 | uk.ac.hw.icbl
 0.10  0.03         6149        2 | uk.ac.ic.cv
 0.10  0.01         2000        2 | uk.ac.ox.stannes
 0.14  0.26        61265        3 | uk.ac.rfhsm
 0.10  0.02         5133        2 | uk.ac.staffs
 0.05  0.04         8701        1 | uk.ac.strath.cc
 0.05  0.04         8701        1 | uk.ac.strath.law
 0.05  0.04         8701        1 | uk.ac.strath.stams
 0.24  0.26        61563        5 | uk.ac.susx
 0.10  0.04         9546        2 | uk.ac.umist.co.sna
 0.14  0.18        41286        3 | uk.co.bt.axion
 0.10  0.03         6149        2 | uk.co.unipalm
 0.10  0.09        20606        2 | uk.co.x

Total Transfers by URL/Archive Section

%Reqs %Byte  Bytes Sent  Requests   Archive Section
----- ----- ------------ -------- |------------------------------------
 0.10  0.72       167328        2 | /Admin/Feb.wwwstats.html
 0.29  2.45       568740        6 | /Admin/Mar.wwwstats.html
 2.50 17.12      3978780       52 | /Admin/wwwstats.html
 0.82  0.68       156893       17 | /Arcadia/
 0.14  0.47       109830        3 | /Arcadia/Chiron_Logo.gif
 0.67  0.10        22680       14 | /Arcadia/atUCI.html
 0.14  0.11        24486        3 | /Arcadia/chiron.html
 0.38  0.10        22288        8 | /Dept/Faculty/
 0.53  0.11        25993       11 | /Dept/Research/
 0.38  0.06        14736        8 | /Dept/overview.html
 8.65  3.72       864000      180 | /ICShome.html
 0.14  0.02         5604        3 | /IRUS/
 0.05  0.04         8924        1 | /IRUS/4iss_announce.html
 0.05  0.00          690        1 | /Test/transparent-GIF89.html
 2.59  1.92       445986       54 | /WWWdocs/documents.menu.html
 0.05  0.03         7053        1 | /WWWdocs/guide/www.guide.app.b.html
 0.10  0.29        68560        2 | /WWWdocs/guide/www.guide.html
 0.77  0.60       139216       16 | /WWWdocs/htmlquickref.html
 0.67  0.78       182126       14 | /WWWdocs/localFAQ.html
 0.05  0.00          692        1 | /WWWdocs/papers/
 0.14  3.99       926553        3 | /WWWdocs/papers/draft-raggett-www-html-00.ps
 0.10  0.97       225162        2 | /WWWdocs/papers/html-spec.ps
 0.24  0.11        26305        5 | /WWWdocs/personalwebs.html
 0.24  0.01         3460        5 | /WebSoft/
 1.20  0.44       102175       25 | /WebSoft/MOMspider/
 0.05  0.01         1204        1 | /WebSoft/MOMspider/WWW94/
 0.05  0.01         1819        1 | /WebSoft/MOMspider/WWW94/acknowledge.html
 0.05  0.00         1001        1 | /WebSoft/MOMspider/WWW94/appendix-B.html
 0.05  0.01         1846        1 | /WebSoft/MOMspider/WWW94/appendix-D.html
 0.10  0.03         7482        2 | /WebSoft/MOMspider/WWW94/conclusions.html
 0.24  0.18        42035        5 | /WebSoft/MOMspider/WWW94/design.html
 0.10  0.04         9378        2 | /WebSoft/MOMspider/WWW94/existing.html
 0.19  0.22        50248        4 | /WebSoft/MOMspider/WWW94/figure1.gif
 0.29  0.11        25920        6 | /WebSoft/MOMspider/WWW94/intro.html
 0.05  0.02         3641        1 | /WebSoft/MOMspider/WWW94/meta.html
 0.86  0.37        86670       18 | /WebSoft/MOMspider/WWW94/paper.html
 0.05  0.32        73772        1 | /WebSoft/MOMspider/WWW94/paper_A4.ps
 0.24  1.58       366535        5 | /WebSoft/MOMspider/WWW94/paper_US.ps
 0.24  0.09        21870        5 | /WebSoft/MOMspider/WWW94/problem.html
 0.14  0.06        12801        3 | /WebSoft/MOMspider/WWW94/references.html
 0.10  0.05        11300        2 | /WebSoft/MOMspider/WWW94/solution.html
 1.68  1.55       360605       35 | /WebSoft/caching.html
 0.05  0.01         2054        1 | /WebSoft/rewrite_history.txt
 8.21 10.01      2325958      171 | /WebSoft/wwwstat/
 0.14  0.08        18885        3 | /WebSoft/wwwstat/Changes.txt
 0.43  0.68       158346        9 | /WebSoft/wwwstat/README.txt
 0.77  0.30        68656       16 | /WebSoft/wwwstat/country-codes.txt
 0.34  0.14        31472        7 | /WebSoft/wwwstat/example.html.txt
 0.72  0.76       175635       15 | /WebSoft/wwwstat/oldlog2new.txt
 0.96  4.00       929140       20 | /WebSoft/wwwstat/wwwstat-1.0a.tar.Z
 1.10  3.16       734781       23 | /WebSoft/wwwstat/wwwstat-1.0a.tar.gz
 1.20  3.86       898350       25 | /WebSoft/wwwstat/wwwstat.txt
 0.05  0.01         2849        1 | /ZOTnews/93.09/ICS_Software.html
 0.05  0.01         2187        1 | /ZOTnews/94.01/EscortUpdate.html
 0.10  0.01         2422        2 | /ZOTnews/94.01/Intro.html
 0.05  0.02         4101        1 | /ZOTnews/94.01/PasswordSecurity.html
 0.05  0.01         1782        1 | /ZOTnews/94.01/RandomNotes.html
 0.10  0.03         7070        2 | /ZOTnews/94.01/WorldWideWeb.html
 0.10  0.01         1766        2 | /ZOTnews/ZOTnews.html
 0.34  0.04         8260        7 | /cgi-bin/finger
 0.67  0.07        16520       14 | /cgi-bin/searchICS
 0.05  0.01         1180        1 | /cgi-bin/searchICSds
 1.10  0.12        26780       23 | /cgi-bin/searchOrigins
 0.14  0.02         4821        3 | /dir/
 0.05  0.01         1607        1 | /dir/eli_dir.html
 0.67  0.04         9688       14 | /dir/faculty
 0.34  0.01         2163        7 | /dir/faculty/AI/
 0.19  0.01         1592        4 | /dir/faculty/CORPS/
 0.19  0.06        13716        4 | /dir/faculty/CORPS/ackerman
 0.29  0.01         1854        6 | /dir/faculty/CSD/
 0.14  0.00          927        3 | /dir/faculty/EdTech/
 0.34  0.01         3360        7 | /dir/faculty/Software/
 0.29  0.22        51642        6 | /dir/faculty/Software/djr
 0.24  0.01         1990        5 | /dir/faculty/Theory/
 0.10  0.01         1612        2 | /dir/faculty/Theory/lueker
 0.34  0.01         3290        7 | /dir/faculty/other/
 0.29  0.02         5784        6 | /dir/faculty/other/franklin
 0.14  0.01         3162        3 | /dir/faculty/other/kay
 0.86  0.05        12456       18 | /dir/grad
 0.38  0.02         5408        8 | /dir/grad/AI/
 0.14  0.04         8742        3 | /dir/grad/AI/honig
 0.05  0.00          968        1 | /dir/grad/AI/rmyers
 0.48  0.03         7500       10 | /dir/grad/CORPS/
 0.05  0.00          787        1 | /dir/grad/CORPS/aandeen
 0.48  0.08        17840       10 | /dir/grad/CORPS/covi
 0.43  2.55       592263        9 | /dir/grad/CORPS/lisa.gif
 0.19  0.03         6004        4 | /dir/grad/CORPS/palen
 0.14  0.02         5178        3 | /dir/grad/CORPS/rgrinter
 0.14  0.02         3726        3 | /dir/grad/CORPS/tmcmahon
 0.34  0.02         5271        7 | /dir/grad/CSD/
 0.29  0.10        24144        6 | /dir/grad/CSD/bvickers
 0.10  0.02         3868        2 | /dir/grad/CSD/mfukuda
 0.05  0.00          988        1 | /dir/grad/CSD/narayan
 0.05  0.02         4953        1 | /dir/grad/CSD/snovack
 0.29  0.01         2388        6 | /dir/grad/EdTech/
 0.10  0.01         1860        2 | /dir/grad/EdTech/ddubrow
 0.38  0.06        13888        8 | /dir/grad/Software/
 0.05  0.01         1736        1 | /dir/grad/Software/FULLNAME.html
 0.10  0.01         3088        2 | /dir/grad/Software/artreyes
 0.10  0.03         6268        2 | /dir/grad/Software/cpatters
 0.14  0.02         4164        3 | /dir/grad/Software/echarne
 0.24  0.03         7640        5 | /dir/grad/Software/ejw
 1.01  0.27        62160       21 | /dir/grad/Software/fielding
 0.10  0.01         2266        2 | /dir/grad/Software/garywong
 0.10  0.01         1326        2 | /dir/grad/Software/ike
 0.10  0.02         5544        2 | /dir/grad/Software/jblevins
 0.14  0.03         7674        3 | /dir/grad/Software/jrobbins
 0.05  0.01         2274        1 | /dir/grad/Software/jshaw
 0.10  0.01         2082        2 | /dir/grad/Software/jueic
 0.10  0.02         3746        2 | /dir/grad/Software/kanderso
 0.05  0.01         1422        1 | /dir/grad/Software/neno
 0.14  0.05        10998        3 | /dir/grad/Software/omalley
 0.05  0.00          951        1 | /dir/grad/Software/self
 0.05  0.00         1136        1 | /dir/grad/Software/tonne
 0.05  0.00         1154        1 | /dir/grad/Software/yessayan
 0.34  0.02         3955        7 | /dir/grad/Theory/
 0.10  0.01         2454        2 | /dir/grad/Theory/dinesh
 0.10  0.01         2046        2 | /dir/grad/Theory/peymano
 0.10  0.01         2456        2 | /dir/grad/Theory/rhutchin
 0.38  0.01         2472        8 | /dir/grad/other/
 1.63  0.24        54638       34 | /dir/icsds.html
 0.72  0.06        13065       15 | /dir/staff/
 0.05  0.01         1385        1 | /dir/staff/craigm
 0.48  0.04         9410       10 | /dir/staff/erickson
 0.10  0.02         5032        2 | /dir/staff/gbolcer
 0.10  0.01         1398        2 | /dir/staff/hegardt
 0.14  0.02         3918        3 | /dir/staff/kari
 0.05  0.01         1340        1 | /dir/staff/morgan
 0.10  0.01         1400        2 | /dir/staff/sam
 0.14  0.01         2688        3 | /dir/staff/tellier
 0.53  0.03         7403       11 | /dir/visitor/
 0.10  0.01         1968        2 | /dir/visitor/andrea
 0.19  0.03         7140        4 | /dir/visitor/nmatsui
 0.05  0.01         1241        1 | /dir/visitor/osy
 0.34  0.05        11011        7 | /dir/visitor/slamm
 0.10  0.01         1936        2 | /dir/visitor/tyamazak
 0.10  0.02         4370        2 | /webmaster.html
 0.05  0.12        28902        1 | /~cpatters/ics227/overview.ps
 2.98  1.45       337038       62 | /~ejw/csr/cyber.html
 0.29  0.01         2616        6 | /~ejw/csr/pete.html
 0.05  0.00          692        1 | /~fielding/Maori
 0.05 13.09      3041527        1 | /~fielding/Maori/video.mpeg
 5.72  0.36        83380      119 | All Icons (server)
 9.80  0.88       204780      204 | All Icons (site)
12.10 16.31      3790903      252 | All Pictures
 6.39  0.20        45845      133 | Code 302 Redirected Requests
 3.31  0.08        19333       69 | Code 404 Not Found Requests

This summary was generated by wwwstat-2.0
8701 1 | se.luth.ludd 0.43 0.11 25638 9 | se.luth.sm 0.14wwwstat-2.0/monthly.pl010064400060720000146000000115670623743724700157550ustar00fieldinggrad00002420013033#!YOUR_PERL_BINARY # ========================================================================== # Copyright (c) 1996 Regents of the University of California. # # This software has been developed by Roy Fielding as # part of the WebSoft project at the University of California, Irvine. # # See the file LICENSE for licensing and redistribution information. # # This program is provided ONLY as an example. It is not needed to run # wwwstat and is not supported by the author. # sub usage { die <<"EndUsage"; USAGE: monthly THIS PROGRAM MUST ONLY BE RUN ONCE PER MONTH, DURING THE FIRST WEEK It assumes a lot, like that you use wwwstat and archive your logfiles once per month. You will need to configure it for your server before it can be used. Reads the logfile (assumed to contain more than one month's worth of WWW common logfile entries) and moves the prior month's entries into a separate file. The new file is created on TMPDIR (to avoid filling up the disk), compressed using gzip, and then moved to the archive directory. The program also restarts the httpd server. EndUsage } if ($#ARGV >= 0) { &usage; } # ========================================================================== # Get defaults umask(022); # Compression command and extension $zcommand = 'gzip -9'; $zextension = '.gz'; $wstatcmd = 'wwwstat'; # Set up the filenames to be used $ServerRoot = '/usr/local/etc/httpd'; $NewLog = $ServerRoot . '/logs/access_log'; # Current logfile $OldLog = $NewLog . '.old'; # and temp location $PidFile = $ServerRoot . '/logs/httpd.pid'; # Server's PID file $ErrorLog = $ServerRoot . '/logs/error_log'; # Server's Error Log $TempLog = "/tmp/templog-$$.txt"; # Temporary file for last month's log print "Got the defaults\n"; # ========================================================================== # Figure out the archive name $ArcName = "/dc/ud/www/oldlogs/%M_access_log" . $zextension; @MoY = ('Jan','Feb','Mar','Apr','May','Jun', 'Jul','Aug','Sep','Oct','Nov','Dec'); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); if ($mon == 0) { $mon = 11; $year -= 1; } else { $mon -= 1; } $LastMonth = $MoY[$mon]; $ArcName =~ s/%M/$LastMonth$year/; $ArcStats = '/dc/ud/www/documentroot/Admin/stats-19' . $year . '/' . $LastMonth . '.wwwstats.html'; print "Figured out that last month was $LastMonth $year\n"; # ========================================================================== # Open logfiles if (-e $OldLog) { die "$OldLog already exists, stopped"; } rename($NewLog, $OldLog) || die "$!: Failed to rename $NewLog, stopped"; open(OLDLOG, $OldLog) || die "$!: Failed to open $OldLog, stopped"; open(TEMPLOG, ">$TempLog") || die "$!: Failed to open $TempLog, stopped"; open(NEWLOG, ">$NewLog") || die "$!: Failed to open $NewLog, stopped"; print "Successfully opened the log files\n"; # ========================================================================== # Iterate through the old logfile print "Splitting $NewLog\n"; LINE: while () { # # First, parse the common log format into its seven basic components # ($host, $rfc931, $authuser, $timestamp, $request, $status, $bytes) = /^(\S+) (\S+) (\S+) \[([^\]]*)\] \"([^"]*)\" (\S+) (\S+)/; # Now, is this garbage or is it memorex? Note that $bytes can be 0 if (!($host && $rfc931 && $authuser && $timestamp && $request && $status)) { next LINE; } # Finally, extract the month and determine where to write this entry $month = substr($timestamp, 3, 3); if ($month eq $LastMonth) { print TEMPLOG; } else { print NEWLOG; } } close(OLDLOG); close(TEMPLOG); close(NEWLOG); print "Successfully processed the logfiles\n"; # Restart the httpd server if ($PidFile) { rename($ErrorLog, $ErrorLog . '.old'); # Reset the error log as well if (open(PID, $PidFile)) { chop($_ = ); kill 1, $_; close(PID); print "Restarted httpd at $_\n"; } } # Delete the old logfile print "Deleting $OldLog\n"; system('rm','-f', $OldLog); if (-e $OldLog) { print STDERR "Warning: Failed to delete $OldLog\n"; } # Run wwwstat on the temporary log to get last month's stats print "Creating monthly stats in $ArcStats\n"; system("$wstatcmd $TempLog > $ArcStats"); system("$zcommand $ArcStats"); # Compress the temporary logfile print "Compressing last month's log\n"; system("$zcommand $TempLog"); if (-e $TempLog) { die "Failed to $zcommand $TempLog\n"; } $TempLog .= $zextension; # Move the temporary logfile to its archive location print "Moving last month's log to $ArcName\n"; system('mv','-f', $TempLog, $ArcName); if (!(-e $ArcName)) { die "Failed to move $TempLog to $ArcName\n"; } print "Finished Job\n"; exit(0); wwwstat-2.0/oldlog2new.pl010064400060720000146000000241770623743725000163320ustar00fieldinggrad00002420013033#!YOUR_PERL_BINARY # --------------------------------------------------------------------------- $Version = 'oldlog2new-2.0'; # # Copyright (c) 1994, 1996 Regents of the University of California. # # This software has been developed by Roy Fielding as # part of the WebSoft project at the University of California, Irvine. # # See the file LICENSE for licensing and redistribution information. # # This program is based on an early version of the wwwstat log analyzer. # It exists only for the purpose of converting old NCSA httpd 1.0 and 1.1 # log files to the common logfile format (CLF) used by wwwstat-1.0 and later. # ALMOST ALL SITES WILL HAVE NO USE FOR THIS PROGRAM. # # It reads the old log, figures out what each entry points to, finds the # current file size for that entity, and outputs the new format including # a reasonable approximation of the server response code. NOTE that this # won't work if the logfile entries do not correspond to real files that # are still in the place they were when the entry was logged. # sub usage { die <<"EndUsage"; usage: oldlog2new [-hez] [-f logfile] [-s srmfile] $Version Convert an NCSA httpd 1.1 access_log file to CLF access_log Display Options: -h Help -- just display this message and quit. -e Display all invalid log entries on STDERR. (default is to ignore them) Input Options: -f Read from the following access_log file instead of the default. -z Use zcat to uncompress the log file while reading [requires -f]. -s Get the server directives from the following srm.conf file. EndUsage } # --------------------------------------------------------------------------- # Set the default configuration options: # Edit the next line to specify the (+/-)HHMM offset from GMT $GMToffset = '-0700'; # Edit the next line to identify the server's default home page. $ServerHome = "/"; # Edit the next two lines to specify the location of your server access log # and your server configuration (srm.conf) file. $access_log = '/usr/local/etc/httpd/logs/access_log'; $srm_conf = '/usr/local/etc/httpd/conf/srm.conf'; # Edit the next line to specify the command for displaying compressed files $zcat = 'gunzip -c'; # specify as null string if none are available # Estimate the size of a redirect message minus the two location URLs $DirectoryRedirect = 1; # Does server do automatic redirect for slashless # index reqs? (1 for httpd_1.1, 0 for httpd_1.0) # Is the server running with rfc931 support (IdentityCheck on)? $IdentityCheck = 0; # Must = 1 if server uses rfc931 remote ident. # Edit the next few lines to specify whether (1) or not (0) you want: $PrintInvalids = 0; # Display invalid log entries on STDERR? $CompressedLog = 0; # Access log has been compressed (or gzipped)? # ========================================================================== # Get the command-line options require "getopts.pl"; &Getopts('hezf:s:'); if ($@ || $opt_h) { &usage; } if ($opt_e) { $PrintInvalids = 1; } if ($opt_z) { if ($opt_f) { $CompressedLog = 1; } # Require logfile name if else { &usage; } # uncompression is desired } if ($opt_f) { $access_log = $opt_f; } if ($opt_s) { $srm_conf = $opt_s; } if ($CompressedLog && !$zcat) { die "No zcat decompression command has been defined, stopped"; } # ========================================================================== # Get the other needed configuration items from the srm.conf file open (SRM,$srm_conf) || die "Error opening config file: $srm_conf\n"; $UserDir = "public_html"; # Start with NCSA defaults $DirectoryIndex = "index.html"; $DocumentRoot = "/usr/local/etc/httpd/htdocs"; while () { next if ( ($_ eq "\n") || /^\#/ ); # Ignore blank and comment lines if (/^DocumentRoot (.+)\s/) { $DocumentRoot = $1; } elsif (/^UserDir (.+)\s/) { $UserDir = $1; } elsif (/^DirectoryIndex (.+)\s/) { $DirectoryIndex = $1; } elsif (/^Redirect\s+(\S+)\s+(\S+)\s/) { $alias = $1; $rname = $2; $alias =~ s/(\W)/\\$1/g; # Needed for later pattern match $AllRedirects{$alias} = $rname; } elsif (/^Alias\s+(\S+)\s+(\S+)\s/) { $alias = $1; $rname = $2; $alias =~ s/(\W)/\\$1/g; # Needed for later pattern match $AllAliases{$alias} = $rname; } elsif ( /^ScriptAlias\s+(\S+)\s+(\S+)\s/ || /^OldScriptAlias\s+(\S+)\s+(\S+)\s/ ) { $alias = $1; $rname = $2; $alias =~ s/(\W)/\\$1/g; # Needed for later pattern match $AllScripts{$alias} = $rname; } } close SRM; # ========================================================================== # Now read log, figure out the response code and bytes, and output new format # if ($CompressedLog) { $access_log = "$zcat $access_log |"; } open (LOG,$access_log) || die "Error opening access log file: $access_log\n"; LINE: while () { $saveline = $_; $ident = "-"; if ($IdentityCheck) # Does log include IdentityCheck info? { /^(.*)@\S+\s/; if ($_) { $ident = $1; # Save ident for later use $saveline =~ s/^.*@//; # Remove the remote ident from log } $_ = $saveline; } $htv = ''; ($afield, $date, $method, $oname, $htv) = /^(\S+) \[(.+)\] (\S+)\s+(\S+)\s(.*)$/; if (!($afield && $date && $method && $oname && (length($date) == 24))) { print(STDERR "$.:$saveline") if $PrintInvalids; next LINE; } # # First, we have to figure out what file or script was accessed # $fname = $oname; $fname =~ s/\?.*$//; # Remove any trailing query information $fname =~ s/\#.*$//; # Remove any trailing anchor information $fname =~ s#//#/#g; # Remove any extra slashes if (($fname eq "") || ($fname eq "HTTP/1.0")) { print(STDERR "$.:$saveline") if $PrintInvalids; next LINE; } FNAME: # Get the document's real name { $rname = ""; # and start with it unknown $rcode = 200; $fsize = 0; study $fname; if (($fname eq "/") || ($fname eq "/$DirectoryIndex")) { $fname = "$ServerHome"; # Handle top file with extra care $rname = "$DocumentRoot$fname"; last FNAME; } foreach $redir (keys %AllRedirects) # Is it a redirected file? { if ( $fname =~ /^$redir/ ) { $rcode = 302; last FNAME; } } foreach $alias (keys %AllAliases) # Is it a file name alias? { if ( $fname =~ /^$alias/ ) { $rname = $fname; $rname =~ s#^$alias#$AllAliases{$alias}#; last FNAME; } } if ($fname =~ /^\/~(\w+)\// ) # Is it a /~username/...? { ($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwnam($1); if ($dir) { $rname = $fname; $rname =~ s#^/~$1#$dir/$UserDir#; } else { $rcode = 404; } last FNAME; } if ($fname =~ /^\/~(\w+)$/ ) # Is it a /~username ? { ($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwnam($1); if ($dir) { $rname = $fname; $rname =~ s#^/~$1#$dir/$UserDir#; if (-e "$rname/$DirectoryIndex") { if ($DirectoryRedirect) { $rcode = 302; last FNAME; } $rname .= "/$DirectoryIndex"; } $fname .= '/'; } else { $rcode = 404; } last FNAME; } foreach $alias ( keys %AllScripts ) # Is it a script directory alias? { if ( $fname =~ /^$alias/ ) { $fsize = '-'; last FNAME; } } if (-d "$DocumentRoot$fname") # Is it a directory? { $hasSlash = ($fname =~ s/\/$//); # Remove any trailing slash if (-e "$DocumentRoot$fname/$DirectoryIndex") { if (!$hasSlash && $DirectoryRedirect) { $rcode = 302; last FNAME; } $rname = "$DocumentRoot$fname/$DirectoryIndex"; } else { $rname = "$DocumentRoot$fname"; } $fname .= '/'; last FNAME; } $rname = "$DocumentRoot$fname"; # It must be a normal file } # end FNAME $xname = 0; if (!$fsize && ($rcode == 200) && $rname) # Get the file size { # through use of a cache of Sizes ($fsize = $Sizes{$fname}) || ($fsize = $Sizes{$fname} = (-s $rname)) || ($xname = 1); } if ($xname) { $rcode = 404; } if (!(($method eq 'GET')||($method eq 'HEAD')||($method eq 'POST'))) { $rcode = 400; } if ($rcode != 200) { $fsize = '-'; } elsif ($method eq 'HEAD') { $fsize = '0'; } if ($htv) { $oname .= ' '. $htv; } # # Phew! Now we have to swap the date format around # $newdate = substr($date, 8, 2) .'/'. substr($date, 4, 3) .'/'. substr($date,20, 4) .':'. substr($date,11, 9) . $GMToffset; $newdate =~ s/^ /0/; # # Now that we have categorized it, print it in the new format # print($afield,' ',$ident,' - [',$newdate,'] "',$method,' ',$oname, '" ',$rcode,' ',$fsize," \n"); } close LOG; exit(0); wwwstat-2.0/splitlog.1010064400060720000146000000252700623726125500156330ustar00fieldinggrad00002420013033.\" Copyright (c) 1996 Regents of the University of California. .\" All rights reserved. The file LICENSE (the Artistic License) .\" specifies the terms and conditions for redistribution. .\" .if n .tr \-- .if n .tr \(buo .if n .tr \(em- .TH splitlog 1 "03 November 1996" .if n .ad l .SH NAME splitlog \- split WWW server (httpd) access logfiles .SH SYNOPSIS .HP 8 .B splitlog .RB [ \-f .IR configfile ] .RI [ options ...] .RB [ -- ] .if n .br .RI "[ " "logfile" " | " .BR + " | " \- " ]..." .SH DESCRIPTION .nh .B splitlog reads a sequence of .B httpd common logfile format (CLF) access_log files and/or the standard input and splits the logfile entries into separate files according to the entry's requested URL or virtual host prefix. .LP .B splitlog is intended to be run periodically by the webmaster as a means for providing individual logfiles for each of the customers of a server, since it is less efficient for the server itself to generate multiple logfiles. .B splitlog does not make any changes to the input file and can be configured to write the split files in any directory. By default, a cached DNS lookup is performed on any IP addresses which are unresolved in the input file. The log entries can also be anonymized if there are concerns about the requesting clients' privacy. .LP .B splitlog is a .B perl script, which means you need to have a .B perl interpreter to run the program. It has been tested with .B perl versions 4.036 and 5.002. .SH OPTIONS .SS Configuration Options These options define how .B splitlog should establish defaults and interpret the command-line. .TP .BI \-f " filename" Get the configuration defaults from the given file. If used, this .B must be the first argument on the command-line, since it needs to be interpreted before the other command options. The file .B splitlog.rc is included with the distribution as an example of this file; it contains .B perl source code which directly sets the control and display options provided by .B splitlog and contains a function for altering the split logfile name-selection algorithm. If .I filename is not a pathname, the include path (see .BR FILES ) is searched for .IR filename . An empty string as .I filename will disable this feature. .RB [ \-f "splitlog.rc"] .TP .B -- Last option (the remaining arguments are treated as input files). .SS Diagnostic Options These options provide information about .B splitlog usage or about some unusual aspects of the logfile(s) being processed. .TP .B \-h Help \(em display usage information to STDERR and then exit. .TP .B \-e 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. .SS Process Options These options modify how and where logfile entries are written. .TP .B \-x Discard any logfile entries without a filename key instead of placing them in a special OTHERS.log. .TP .B \-v Use a prefix of the input file entries (ended by the first ":" or space) for selecting the output filename instead of, or in addition to, the URL path. The most likely use for such a prefix is for the requested virtual host. .TP .BI \-dir " directory" Place the output logfiles in the given directory instead of the current working directory. .TP .BI \-anon " imu" Anonymize the logfile entries before writing them to split logs. The value is some combination of the letters "i" (ident field is removed), "m" (machine name is replaced with ANON or 0), and "u" (authentication userid field is removed). .LP .PD 0 .B \-dns .TP .B \-nodns .PD Do .RB ( \-dns ) or don't .RB ( \-nodns ) 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 slow, particularly when the results are negative (no DNS name), which is why a caching capability is included as well. .RB [ \-dns ] .TP .BI \-cache " filename" 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 is the empty string, which may be needed if your system does not support DBM or NDBM functionality. Running .B \-dns without a persistent cache is not recommended. .RB [ "\-cache" "dnscache"] .SS Search Options These options are used to include or exclude logfile entries from being output according to whether or not they match a given pattern. The pattern is supplied in the form of a .BR "perl regular expression" , except that the characters "+" and "." are escaped automatically unless the .B \-noescape option is given. Enclose the pattern in single-quotes to prevent the command shell from interpreting some special characters. Multiple occurrences of the same option results in an OR-ing of the regular expressions. .LP .PD 0 .BI \-a " regexp" .TP .BI \-A " regexp" .PD Include .RB ( \-a ) or exclude .RB ( \-A ) all requests containing a hostname/IP address matching the given perl regular expression. .LP .PD 0 .BI \-c " regexp" .TP .BI \-C " regexp" .PD Include .RB ( \-c ) or exclude .RB ( \-C ) all requests resulting in an .B HTTP status code matching the given perl regular expression. .LP .PD 0 .BI \-d " regexp" .TP .BI \-D " regexp" .PD Include .RB ( \-d ) or exclude .RB ( \-D ) all requests occurring on a date (e.g., "Feb 02 1994") matching the given perl regular expression. .LP .PD 0 .BI \-t " regexp" .TP .BI \-T " regexp" .PD Include .RB ( \-t ) or exclude .RB ( \-T ) all requests occurring during the hour (e.g., "23" is 11pm \- 12pm) matching the given perl regular expression. .LP .PD 0 .BI \-m " regexp" .TP .BI \-M " regexp" .PD Include .RB ( \-m ) or exclude .RB ( \-M ) all requests using an HTTP method (e.g., "HEAD") matching the given perl regular expression. .LP .PD 0 .BI \-n " regexp" .TP .BI \-N " regexp" .PD Include .RB ( \-n ) or exclude .RB ( \-N ) all requests on a URL (archive name) matching the given perl regular expression. .TP .B \-noescape Do not escape the special characters ("+" and ".") in the remaining search options. .SH INPUT 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 .RB [ + ]. .TP .B \- Read from standard input (STDIN). .TP .B + Read the default logfile. [as configured] .TP .IR logfile ... Read the given logfile. If the .IR logfile 's extension indicates that is is compressed (gz|z|Z), then pipe it through the configured decompression program .RB [ "gunzip \-c" ] first. .SH USAGE In most cases, .B splitlog is run on a periodic basis by a wrapper program as a .B crontab entry shortly after midnight, typically in conjunction with rotating the current logfile. The .B \-D today option can be used to split the main logfile on a daily basis without rotation. .LP All of the command-line options, and a few options that are not available from the command-line, can be changed within the user configuration file (see .BR splitlog.rc ). This file is actually a .B perl library module which is 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. If the default algorithm for selecting the split logfile name isn't desired, or if some set of names should be combined into a single file, then uncomment the user_path_map() function and define your own name-selection algorithm. .LP The .B wwwstat program can be used to analyze the resulting logfiles. See .B wwwstat for a description of the common logfile format. .SS Perl Regular Expressions 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 option). Most people only need to know the following special characters: .LP .PD 0 .TP 8 .B ^ at start of pattern, means "starts with pattern". .TP .B $ at end of pattern, means "ends with pattern". .TP .B (...) groups pattern elements as a single element. .TP .B ? matches preceding element zero or one times. .TP .B * matches preceding element zero or more times. .TP .B + matches preceding element one or more times. .TP .B . matches any single character. .TP .B [...] denotes a class of characters to match. [^...] negates the class. Inside a class, '-' indicates a range of characters. .TP .B (A|B|C) matches if A or B or C matches. .PD .LP 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. .SH ENVIRONMENT .TP 12 .B HOME Location of user's home directory, placed on INC path. .TP .B LOGDIR Used instead of HOME if latter is undefined. .TP .B PERLLIB A colon-separated list of directories in which to look for the user configuration file. .SH FILES Unless a pathname is supplied, the configuration file is obtained from the current directory, the user's home directory .RB ( HOME " or " LOGDIR ), the standard library path .RB ( PERLLIB ), and the directory indicated by the command pathname (in that order). .TP 15 .B splitlog.rc User configuration file. .LP .PD 0 .B dnscache.dir .TP 15 .B dnscache.pag .PD DBM files for persistent DNS cache. .SH SEE ALSO .BR crontab (1), .BR httpd (1m), .BR perl (1), .BR wwwstat (1) .LP More info and the latest version of splitlog can be obtained from .LP http://www.ics.uci.edu/pub/websoft/wwwstat/ ftp://www.ics.uci.edu/pub/websoft/wwwstat/ .LP If you have any suggestions, bug reports, fixes, or enhancements, please join the mailing list by sending e-mail with "subscribe" in the subject of the message to the request address . The list is archived at the above address. .SS More About Perl .TP The Perl Language Home Page http://www.perl.com/perl/index.html .TP Johan Vromans' Perl Reference Guide http://www.xs4all.nl/~jvromans/perlref.html .SH AUTHOR 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 mailing list (see above). .LP 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. wwwstat-2.0/splitlog.html010064400060720000146000000270520623726125600164400ustar00fieldinggrad00002420013033 splitlog manual

splitlog manual

NAME

splitlog - split WWW server (httpd) access logfiles

SYNOPSIS

splitlog [-f configfile] [options...] [--] [ logfile | + | - ]...

DESCRIPTION

splitlog reads a sequence of httpd common logfile format (CLF) access_log files and/or the standard input and splits the logfile entries into separate files according to the entry's requested URL or virtual host prefix.

splitlog is intended to be run periodically by the webmaster as a means for providing individual logfiles for each of the customers of a server, since it is less efficient for the server itself to generate multiple logfiles. splitlog does not make any changes to the input file and can be configured to write the split files in any directory. By default, a cached DNS lookup is performed on any IP addresses which are unresolved in the input file. The log entries can also be anonymized if there are concerns about the requesting clients' privacy.

splitlog is a perl script, which means you need to have a perl interpreter to run the program. It has been tested with perl versions 4.036 and 5.002.

OPTIONS

Configuration Options

These options define how splitlog should establish defaults and interpret the command-line.
-f filename
Get the configuration defaults from the given file. If used, this must be the first argument on the command-line, since it needs to be interpreted before the other command options. The file splitlog.rc is included with the distribution as an example of this file; it contains perl source code which directly sets the control and display options provided by splitlog and contains a function for altering the split logfile name-selection algorithm. If filename is not a pathname, the include path (see FILES) is searched for filename. An empty string as filename will disable this feature. [-f "splitlog.rc"]
--
Last option (the remaining arguments are treated as input files).

Diagnostic Options

These options provide information about splitlog usage or about some unusual aspects of the logfile(s) being processed.
-h
Help - display usage information to STDERR and then exit.
-e
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.

Process Options

These options modify how and where logfile entries are written.
-x
Discard any logfile entries without a filename key instead of placing them in a special OTHERS.log.
-v
Use a prefix of the input file entries (ended by the first ":" or space) for selecting the output filename instead of, or in addition to, the URL path. The most likely use for such a prefix is for the requested virtual host.
-dir directory
Place the output logfiles in the given directory instead of the current working directory.
-anon imu
Anonymize the logfile entries before writing them to split logs. The value is some combination of the letters "i" (ident field is removed), "m" (machine name is replaced with ANON or 0), and "u" (authentication userid field is removed).
-dns
-nodns
Do (-dns) or don't (-nodns) 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 very slow, particularly when the results are negative (no DNS name), which is why a caching capability is included as well. [-dns]
-cache filename
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 filename is the empty string, which may be needed if your system does not support DBM or NDBM functionality. Running -dns without a persistent cache is not recommended. [-cache "dnscache"]

Search Options

These options are used to include or exclude logfile entries from being output according to whether or not they match a given pattern. The pattern is supplied in the form of a perl regular expression, except that the characters "+" and "." are escaped automatically unless the -noescape option is given. Enclose the pattern in single-quotes to prevent the command shell from interpreting some special characters. Multiple occurrences of the same option results in an OR-ing of the regular expressions.
-a regexp
-A regexp
Include (-a) or exclude (-A) all requests containing a hostname/IP address matching the given perl regular expression.
-c regexp
-C regexp
Include (-c) or exclude (-C) all requests resulting in an HTTP status code matching the given perl regular expression.
-d regexp
-D regexp
Include (-d) or exclude (-D) all requests occurring on a date (e.g., "Feb 02 1994") matching the given perl regular expression.
-t regexp
-T regexp
Include (-t) or exclude (-T) all requests occurring during the hour (e.g., "23" is 11pm - 12pm) matching the given perl regular expression.
-m regexp
-M regexp
Include (-m) or exclude (-M) all requests using an HTTP method (e.g., "HEAD") matching the given perl regular expression.
-n regexp
-N regexp
Include (-n) or exclude (-N) all requests on a URL (archive name) matching the given perl regular expression.
-noescape
Do not escape the special characters ("+" and ".") in the remaining search options.

INPUT

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 [+].
-
Read from standard input (STDIN).
+
Read the default logfile. [as configured]
logfile...
Read the given logfile. If the logfile's extension indicates that is is compressed (gz|z|Z), then pipe it through the configured decompression program [gunzip -c] first.

USAGE

In most cases, splitlog is run on a periodic basis by a wrapper program as a crontab entry shortly after midnight, typically in conjunction with rotating the current logfile. The -D today option can be used to split the main logfile on a daily basis without rotation.

All of the command-line options, and a few options that are not available from the command-line, can be changed within the user configuration file (see splitlog.rc). This file is actually a perl library module which is 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. If the default algorithm for selecting the split logfile name isn't desired, or if some set of names should be combined into a single file, then uncomment the user_path_map() function and define your own name-selection algorithm.

The wwwstat program can be used to analyze the resulting logfiles. See wwwstat for a description of the common logfile format.

Perl Regular Expressions

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 -noescape option). Most people only need to know the following special characters:

^
at start of pattern, means "starts with pattern".
$
at end of pattern, means "ends with pattern".
(...)
groups pattern elements as a single element.
?
matches preceding element zero or one times.
*
matches preceding element zero or more times.
+
matches preceding element one or more times.
.
matches any single character.
[...]
denotes a class of characters to match. [^...] negates the class. Inside a class, '-' indicates a range of characters.
(A|B|C)
matches if A or B or C matches.

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.

ENVIRONMENT

HOME
Location of user's home directory, placed on INC path.
LOGDIR
Used instead of HOME if latter is undefined.
PERLLIB
A colon-separated list of directories in which to look for the user configuration file.

FILES

Unless a pathname is supplied, the configuration file is 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).
splitlog.rc
User configuration file.
dnscache.dir
dnscache.pag
DBM files for persistent DNS cache.

SEE ALSO

crontab(1), httpd(1m), perl(1), wwwstat(1)
More info and the latest version of splitlog can be obtained from
http://www.ics.uci.edu/pub/websoft/wwwstat/
ftp://www.ics.uci.edu/pub/websoft/wwwstat/
If you have any suggestions, bug reports, fixes, or enhancements, please join the <wwwstat-users@ics.uci.edu> mailing list by sending e-mail with "subscribe" in the subject of the message to the request address <wwwstat-users-request@ics.uci.edu>. The list is archived at the above address.

More About Perl

The Perl Language Home Page
http://www.perl.com/perl/index.html
Johan Vromans' Perl Reference Guide
http://www.xs4all.nl/~jvromans/perlref.html

AUTHOR

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 mailing list (see above).

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.

B> be the first argument on the command-line, since it needs to be interpreted before the other command options. The file splitlog.rc is included with the distribution as an example of this file; it contains perl source code which directly sets the control and display options provided by splitlog and contains a function for altering the split logfile name-selection algorithm. If filename is not a pathname, the include path (see as # part of the WebSoft project at the University of California, Irvine. # # See the file LICENSE for licensing and redistribution information. # See the file INSTALL for installation information. # See the file Changes for known problems and version information. # See the file README for more information. # See the splitlog.1 man page for options and usage information. # sub usage { die <<"EndUsage"; usage: $Pname [-f config] [-h] [-e] [-x] [-v] [-dir directory] [-anon imu] [-dns] [-nodns] [-cache filename] [-m method] [-M method] [-a IP_address] [-c code] [-d date] [-t hour] [-n URL_path] [-A IP_address] [-C code] [-D date] [-T hour] [-N URL_path] [-noescape] [--] [ logfile | + | - ]... $Version Process a sequence of httpd Common Logfile Format access_log files and split them into separate files according to requested URL or virtual host. Configuration options: -f Get configuration defaults from the given file. -- Last option (all later arguments are treated as filenames). Diagnostic Options: -h Help -- just display this message to STDERR and quit. -e Display to STDERR all invalid log entries. Process Options: -x Discard any logfile entries without a filename key. -v Use the logfile entry prefix (virtual host) for output filename. -dir Put the split logfiles in the given directory. -anon Anonymize the logfile entries: i=ident, m=machine, u=userid. -dns Use DNS to lookup unresolved IP addresses (may be slow). -nodns Do not lookup unresolved IP addresses. -cache Use the given dbm file to read/write DNS cache. Search Options (include only those log entries ...): -a Containing a hostname/IP address matching the given perl regexp. -A Not containing " " " " " " " " -c Containing a server response code matching the given perl regexp. -C Not containing " " " " " " " " -d Containing a date ("Feb 02 1996") matching the given perl regexp. -D Not containing " " " " " " " " -t Containing an hour ("00" -- "23") matching the given perl regexp. -T Not containing " " " " " " " " -n Containing a URL path matching the given perl regexp (except +.). -N Not containing " " " " " " " " -m Using an HTTP method name matching the given perl regexp. -M Not using the HTTP method " " " " "" -noescape Do not escape "." and "+" in remaining search options. Filenames (none implies "+"): - Read standard input (STDIN). + Read the default logfile $DefaultLog. ... Anything else is treated as the name of a logfile to be read. EndUsage } # ========================================================================== # The main program is really quite simple ... $Pname = $0; if ($Pname =~ s#^(.*)/##) { push(@INC, $1); } # Modify include path for bin, # current dir, and home dir unshift(@INC, '.', ($ENV{'HOME'} || $ENV{'LOGDIR'})); $StartTime = time; # Get the current date-time stamp $Updated = &wtime($StartTime,''); # Format it as local time &init_defaults; # Set the default configuration &get_configuration; # Get user configuration &get_commandline; # Get command-line options &init_DNS if $LookupDNS; # Initialize the DNS cache &init_handles; # Initialize the output file handles if ($ARGV[0]) # Check for explicit filenames { foreach $filename (@ARGV) { &process_file($filename); } } else # if none, just read the default { &process_file($DefaultLog); } &close_handles; # Close all the output filehandles &close_DNS if $LookupDNS; # Close the DNS cache exit(0); # and we are finished. # ========================================================================== # ========================================================================== # Initialize default configuration options. NOTE that all of these options # can be overridden in either the system or user configuration files and # many can be overridden on the command-line. # sub init_defaults { # Specify the command for displaying compressed files to STDOUT $Zcat = 'gunzip -c'; # specify as null string if none are available $Zhandle = '(gz|Z|z)'; # list file extensions that indicate compressed # If address in log entry is one word (a local host), append what? # Specify an appropriate '.sub.dom.ain' $AppendToLocalhost = '.no_where.com'; # Specify the maximum number of open file handles allowed. # You will get "Failed open of ..." errors if it is set too high. $MaxHandles = 50; # Specify the default location of your access log $DefaultLog = '/usr/local/etc/httpd/logs/access_log'; # Specify the default destination directory for the split logfiles $DestDir = ''; # current directory # Specify the filename (no .ext) for non-matching, non-split log entries $Remaining = 'OTHERS'; # Specify the amount of anonymization done to the split log entries. # May be '','i','m','u','im','iu','mi','mu','ui','um','imu' # '' = none # /i/ = ident field removed # /m/ = machine name replaced with ANON or 0 # /u/ = authentication userid field removed $Anonymize = ''; # Specify whether (1) or not (0) you want the split filenames to be # based on a prefix (assumed to be a virtual host) of each logfile # entry instead of on the requested URL path. The prefix is terminated # by the first colon ':' or space. $Vhosts = 0; # Specify whether (1) or not (0) you want to lookup unresolved # IP addresses via DNS. Note that this could be *very* slow! $LookupDNS = 1; $DNScachefile = 'dnscache'; # DBM files for persistent cache $DNSexpires = 5356800; # Cache for two months (in seconds) # The rest of these options are normally only changed on the command-line $PrintInvalids = 0; # Display invalid log entries on STDERR? $SearchAddress = ''; # Pattern to look for in hostname/IP addresses $SearchCode = ''; # Pattern to look for in Code $SearchDate = ''; # Pattern to look for in Date $SearchTime = ''; # Pattern to look for in Hour $SearchPath = ''; # Pattern to look for in URL Path $SearchMethod = ''; # Pattern to look for in Method $NotAddress = ''; # Pattern to reject entry if in IP addresses $NotCode = ''; # Pattern to reject entry if in Code $NotDate = ''; # Pattern to reject entry if in Date $NotTime = ''; # Pattern to reject entry if in Hour $NotPath = ''; # Pattern to reject entry if in URL Path $NotMethod = ''; # Pattern to reject entry if in Method $EscapeSpecials = '[+.]'; # Most users forget about regexp syntax # The default user configuration filename should only # be changed if your filesystem can't handle this name. $UconfigFile = 'splitlog.rc'; # User file for overriding defaults } # ========================================================================== # Get the user configuration # sub get_configuration { local($forced) = 0; if (defined($ARGV[0]) && ($ARGV[0] eq '-f')) { shift @ARGV; $UconfigFile = shift @ARGV; $forced = 1; } if ($UconfigFile) { eval 'require $UconfigFile;'; if ($@ && $forced) { die "Unable to read $UconfigFile: $!\n"; } else { $! = 0; undef $@; } } } # ========================================================================== # Get the command-line options. # sub get_commandline { local($_, $first, $rest, $pos); local($letteropts) = 'hexvm:M:c:C:t:T:a:A:n:N:d:D:f:'; local(@args) = split(//, $letteropts); while (defined($_ = $ARGV[0])) { if ($_ eq '--') { shift @ARGV; last; } # Last option indicator if ($_ eq '-') { last; } # STDIN file indicator if (!s/^-//) { last; } # Not an option if (/^no(.*)/) # Exclude some option { # indicated by suffix unless ($_ = $1) { # or next argument shift @ARGV; &badarg('-no requires value') unless ($_ = $ARGV[0]); } if (/^escape$/) { $EscapeSpecials = ''; } elsif (/^dns$/) { $LookupDNS = 0; } else { &badarg('-no',$_); } } elsif (/^anon(.*)/) # Anonymize logfile { # at Nth level unless ($_ = $1) { shift @ARGV; &badarg('-anon requires value') unless ($_ = $ARGV[0]); } &badarg('-anon', $_) unless (/^[imu]+$/); $Anonymize = $_; } elsif (/^dns$/) # Resolve IP addresses { $LookupDNS = 1; } elsif (/^cache(.*)/) # Change cache filename { unless ($_ = $1) { shift @ARGV; &badarg('-cache requires value') unless ($_ = $ARGV[0]); } $DNScachefile = $_; } elsif (/^dir(.*)/) # Output Directory { unless ($_ = $1) { shift @ARGV; &badarg('-dir requires value') unless ($_ = $ARGV[0]); } $DestDir = $_; } else # End of full-word option arguments { while() # Loop by each character { ($first,$rest) = /^(.)(.*)/; if (($pos = index($letteropts,$first)) < 0) { &badarg("Unknown option:",$first); } if ($args[$pos+1] eq ':') { shift(@ARGV); if ($rest eq '') { &badarg($first,"requires value") unless @ARGV; $rest = $ARGV[0]; } &set_option($first, $rest); last; } else { &set_option($first, 1); $_ = $rest; last unless $_; } } } } continue { shift @ARGV; } } # ========================================================================== # Set the single-letter command-line option given. Gee, this is fun. # sub set_option { local($opt, $value) = @_; if ($opt eq 'h') { &usage; } elsif ($opt eq 'e') { $PrintInvalids = 1; } elsif ($opt eq 'x') { $Remaining = ''; } elsif ($opt eq 'v') { $Vhosts = 1; } elsif ($opt eq 'm') { if ($SearchMethod) { $SearchMethod = "($SearchMethod|$value)"; } else { $SearchMethod = $value; } } elsif ($opt eq 'M') { if ($NotMethod) { $NotMethod = "($NotMethod|$value)"; } else { $NotMethod = $value; } } elsif ($opt eq 'c') { if ($SearchCode) { $SearchCode = "($SearchCode|$value)"; } else { $SearchCode = $value; } } elsif ($opt eq 'C') { if ($NotCode) { $NotCode = "($NotCode|$value)"; } else { $NotCode = $value; } } elsif ($opt eq 't') { if ($SearchTime) { $SearchTime = "($SearchTime|$value)"; } else { $SearchTime = $value; } } elsif ($opt eq 'T') { if ($NotTime) { $NotTime = "($NotTime|$value)"; } else { $NotTime = $value; } } elsif ($opt eq 'a') { if ($EscapeSpecials) { $value =~ s/($EscapeSpecials)/\\$1/go; } if ($SearchAddress) { $SearchAddress = "($SearchAddress|$value)"; } else { $SearchAddress = $value; } } elsif ($opt eq 'A') { if ($EscapeSpecials) { $value =~ s/($EscapeSpecials)/\\$1/go; } if ($NotAddress) { $NotAddress = "($NotAddress|$value)"; } else { $NotAddress = $value; } } elsif ($opt eq 'n') { if ($EscapeSpecials) { $value =~ s/($EscapeSpecials)/\\$1/go; } if ($SearchPath) { $SearchPath = "($SearchPath|$value)"; } else { $SearchPath = $value; } } elsif ($opt eq 'N') { if ($EscapeSpecials) { $value =~ s/($EscapeSpecials)/\\$1/go; } if ($NotPath) { $NotPath = "($NotPath|$value)"; } else { $NotPath = $value; } } elsif ($opt eq 'd') { if ($value eq 'today') { $value = substr($Updated, 8, 4) . substr($Updated, 5, 3) . substr($Updated, 12, 4); $value =~ s/ 0(\d) / $1 /; } if ($SearchDate) { $SearchDate = "($SearchDate|$value)"; } else { $SearchDate = $value; } } elsif ($opt eq 'D') { if ($value eq 'today') { $value = substr($Updated, 8, 4) . substr($Updated, 5, 3) . substr($Updated, 12, 4); $value =~ s/ 0(\d) / $1 /; } if ($NotDate) { $NotDate = "($NotDate|$value)"; } else { $NotDate = $value; } } elsif ($opt eq 'f') { die "The -f option MUST be first option after -F option (if any)\n"; } else { &badarg("Unknown option:", $opt); } } # ========================================================================== sub badarg { local($dreck) = join(' ', @_); warn "Bad command option: $dreck\n"; &usage; } # ========================================================================== # process the given filename as FILE, based on the content of its first line. # sub process_file { local($filename) = @_; if ($filename eq '+') { $filename = $DefaultLog; } if ($Zhandle && ($filename =~ /\.$Zhandle$/o)) { if (!$Zcat) { warn "No zcat decompression command has been defined\n"; return; } $filename = "$Zcat $filename |"; } if (!open(FILE,$filename)) { warn "Error opening $filename: $!\n"; return; } &process_log; close(FILE); } # ========================================================================== # Process the access_log FILE by reading each entry, validating and # categorizing the access, and then appending it to one of the split logs # sub process_log { local($host, $ident, $authuser, $timestamp, $request, $status, $bytes); local($trailer, $hour, $date, $method, $htv); local($dvalue, $path, $pathkey, $outfile, $saveline); LINE: while ($_ = ) { s/^\0+//; # This is due to a bug in perl 5.002 s/\0//g; # because this line should be sufficient $saveline = $_; # If we are supposed to be splitting by virtual host, then it # is assumed that the virtual hostname is prefixed to log entry if ($Vhosts && s/^([^: ]+)[: ]//) { $vhost = $1; } else { $vhost = undef; } # # Parse the logfile entry into its seven basic components # ($host, $ident, $authuser, $timestamp, $request, $status, $bytes, $trailer) = /^(\S+) (\S+) (\S+) \[([^\]]*)\] \"([^"]*)\" (\S+) (\S+)(.*)/; #" Now, is this garbage or is it memorex? Note that $bytes can be 0 if (!($host && $ident && $authuser && $timestamp && $request && $status)) { if ($PrintInvalids) { print STDERR "$.:$saveline"; } next LINE; } if ($status !~ /^(-|\d\d\d)$/) # Test the response code { if ($PrintInvalids) { print STDERR "$.:$saveline"; } next LINE; } if ($SearchCode) { next LINE unless ($status =~ m#$SearchCode#o); } if ($NotCode) { next LINE unless ($status !~ m#$NotCode#o );} if ($bytes !~ /^(-|\d+)$/ ) # Test the bytes transferred { if ($PrintInvalids) { print STDERR "$.:$saveline"; } next LINE; } if (!defined($trailer)) { $trailer = ''; } # # Looks okay so far -- Now figure out when the request was made. # if ($timestamp =~ m#^([ 0-3]?\d)/([A-Za-z]+)/(\d{4}):(\d\d):\d\d:\d\d [+ -]\d{1,4}#) { $date = "$2 $1 $3"; $hour = "$4"; } else { if ($PrintInvalids) { print STDERR "$.:$saveline"; } next LINE; } if ($SearchDate) { next LINE unless ($date =~ m#$SearchDate#o); } if ($NotDate) { next LINE unless ($date !~ m#$NotDate#o); } if ($SearchTime) { next LINE unless ($hour =~ m#$SearchTime#o); } if ($NotTime) { next LINE unless ($hour !~ m#$NotTime#o); } # # Then parse the method and URL pathname from request # ($method, $path, $htv) = split(' ', $request, 3); if ($SearchMethod) { next LINE unless ($method =~ m#$SearchMethod#o); } if ($NotMethod) { next LINE unless ($method !~ m#$NotMethod#o); } if ($SearchPath) { next LINE unless ($path =~ m#$SearchPath#o); } if ($NotPath) { next LINE unless ($path !~ m#$NotPath#o); } # # Get hostname/IP address and determine domain and reversed subdomain. # $host =~ tr/A-Z/a-z/; $host =~ s/\.$//; if ($host =~ /^[^.]+$/) # Unqualified hostname { if ($AppendToLocalhost) { $host .= $AppendToLocalhost; } } elsif ($host =~ /^\d+\.\d+\.\d+\.\d+$/) # IP number { if ($LookupDNS && ($dvalue = &resolve($host))) { $host = $dvalue; if ($AppendToLocalhost && ($host =~ /^[^.]+$/)) { $host .= $AppendToLocalhost; } } } $host =~ s/\.[\d.]*in-addr\.arpa$//; # Remove any DNS garbage if ($SearchAddress) { next LINE unless ($host =~ m#$SearchAddress#o); } if ($NotAddress) { next LINE unless ($host !~ m#$NotAddress#o); } # # Anonymize those parts which might be considered private # if ($Anonymize) { ($host, $ident, $authuser) = &anonymous($host, $ident, $authuser); } # # Append the log entry to file indicated by vhost and/or path # $pathkey = &path_map($vhost, $path); next LINE unless defined($outfile = &get_handle($pathkey)); print $outfile $host, ' ', $ident, ' ', $authuser, ' [', $timestamp, '] "', $request, '" ', $status, ' ', $bytes, $trailer, "\n"; } } # ========================================================================== # Determine the output logfile name from the vhost prefix and/or URL path. # The user configuration file can intercede by defining &user_path_map(). # Returning undef means append it to the default file. # sub path_map { local($vhost, $path) = @_; if (defined &user_path_map) { local($pathkey) = &user_path_map($vhost, $path); return $pathkey if defined($pathkey); } # The rest is just a simple default if the user does not want to # define their own routine. return $vhost if $vhost; # Use prefix if we got it return undef unless defined($path); # Anything to work with? return 'proxy' if ($path =~ m#^[-+a-zA-Z]+:#); # Full-URLs to proxy.log return undef unless ($path =~ s#^/(.)#$1#); # Errors and / to default if ($path =~ m#^(~|%7e|((pub|homes?|users?)(/|$)))([^/]*)#i) { if ($5) { return $5; } # User-owned directories else { return undef; } } # Otherwise, just use the top component of remaining URL # if it doesn't look like a file local($top, $rest) = split(/\//, $path, 2); if (defined($rest) || ($top !~ /\./)) { return $top; } return undef; # All remaining get put in the default file } # ========================================================================== # Initialize the file handle arrays # sub init_handles { %OpenHandles = (); @HandlesInUse = (); $NextHandle = 'fh000'; if ($DestDir) { if ($DestDir !~ m#/$#) { $DestDir .= '/'; } unless (-d $DestDir && -w _) { die "Destination $DestDir must be a writable directory.\n"; } } } # ========================================================================== # Get the file handle corresponding to the pathkey (the filename) # sub get_handle { local($pathkey) = @_; local($handle); # First be sure we have a legal filename in pathkey if (!$pathkey) { if ($Remaining) { $pathkey = $Remaining; } else { return undef; } } elsif ($pathkey =~ /^std(in|out|err)$/i) { $pathkey .= 'X'; # To prevent accidental output } else { $pathkey =~ s/%([0-9A-Fa-f][0-9A-Fa-f])/pack('C',hex($1))/ge; $pathkey =~ y/A-Z/a-z/; $pathkey =~ y/-+_0-9a-z/_/cs; # To prevent disaster } # See if we already have it open and ready to write return $handle if defined($handle = $OpenHandles{$pathkey}); # See if we already have too many files opened if (($#HandlesInUse + 1) >= $MaxHandles) { local($oldkey) = shift @HandlesInUse; # close the oldest $handle = $OpenHandles{$oldkey}; delete $OpenHandles{$oldkey}; close $handle; } # Finally, try to open and remember a new handle for this pathkey $handle = ++$NextHandle; if (open($handle, ">>$DestDir$pathkey.log")) { push(@HandlesInUse, $pathkey); $OpenHandles{$pathkey} = $handle; return $handle; } else { warn "Failed open of $DestDir$pathkey.log: $!\n"; return undef; } } # ========================================================================== # Close all the open filehandles. This isn't necessary, but I like to do it. # sub close_handles { local($pathkey, $handle); while (($pathkey, $handle) = each %OpenHandles) { close $handle; } undef %OpenHandles; undef @HandlesInUse; } # ========================================================================== # Anonymize those parts which might be considered private # sub anonymous { local($host, $ident, $authuser) = @_; if ($Anonymize =~ /i/) { $ident = '-'; } if ($Anonymize =~ /u/) { $authuser = '-'; } if ($Anonymize =~ /m/) { unless ($host =~ s/\.\d+$/.0/) { $host =~ s/^[^.]+\./ANON./; } } return ($host, $ident, $authuser); } # ========================================================================== # Initialize the DNS cache and remove entries that have expired. # sub init_DNS { local($ipnum, $value, $host, $seen, @expired); if ($DNScachefile) { dbmopen(%DNScache, $DNScachefile, 0666) || die "Cannot open DBM files $DNScachefile: $!\n"; while (($ipnum, $value) = each %DNScache) { ($host, $seen) = split(/\|/, $value); if ($StartTime > ($seen + $DNSexpires)) { push(@expired, $ipnum); } } foreach $ipnum (@expired) { delete $DNScache{$ipnum}; } } else { %DNScache = (); } } # ========================================================================== # Close the DNS cache # sub close_DNS { if ($DNScachefile) { dbmclose(%DNScache); } } # ========================================================================== # Resolve an IP address to its DNS hostname (if it has one) with caching. # sub resolve { local($ip) = @_; local($ipnum, $value, $host, $seen, $aliases, $addrtype, $length, @addrs); $ipnum = pack('C4', split(/\./, $ip)); if (defined($value = $DNScache{$ipnum})) { ($host, $seen) = split(/\|/, $value); return $host; } ($host, $aliases, $addrtype, $length, @addrs) = gethostbyaddr($ipnum, 2); if (!defined($host)) { $host = ''; } # Many hosts have no DNS names $DNScache{$ipnum} = join('|', $host, time); return $host; } # =========================================================================== # This is a modified (by Roy Fielding) version of Perl 4.036's ctime.pl # library by Waldemar Kebsch and # Marion Hakanson . It is distributed under the # Artistic License (included with your Perl distribution files). # # # wtime returns a time string in the format "Wkd, Dy Mon Year HH:MM:SS Zone" # with no newline appended. # # USAGE: # # wtime(time,''); -- returns the local time with no timezone appended # As in "Wed, 15 Dec 1993 23:59:59 " # # wtime(time,'GMT'); -- returns GMT time # As in "Wed, 16 Dec 1993 07:59:59 GMT" # sub wtime { local($time, $TZ) = @_; local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); local(@DoW) = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); local(@MoY) = ('Jan','Feb','Mar','Apr','May','Jun', 'Jul','Aug','Sep','Oct','Nov','Dec'); # Determine what time zone is in effect. Use local time if # TZ is anything other than 'GMT' # There's no portable way to find the system default timezone. ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = ($TZ eq 'GMT') ? gmtime($time) : localtime($time); $year += ($year < 70) ? 2000 : 1900; sprintf("%s, %02d %s %4d %02d:%02d:%02d %s", $DoW[$wday], $mday, $MoY[$mon], $year, $hour, $min, $sec, $TZ); } { print STDERR "$.:$saveline"; } next LINE; } if ($SearchCode) { next LINE unless ($status =~ m#$SearchCode#o); } if ($NotCode) { next LINE unless ($status !~ m#$NotCode#o );} if ($bytes !~ /^(-|\d+)$/ ) # Test the bytes transferred { if ($PrintInvalids) { print STDERR "$.:$saveline"; } next LINE; } if (!defined($trailer)) { $trailer = ''; } # wwwstat-2.0/splitlog.ps010064400060720000146000001146160623726125700161220ustar00fieldinggrad00002420013033%!PS-Adobe-1.0 %%DocumentFonts: %%Creator: troff->tpscript %%CreationDate: Sun Nov 3 18:39:11 1996 %%Pages: (atend) %%EndComments /vmstat save def initmatrix 0.1000 dup scale clippath pathbbox pop pop exch pop 0 exch translate clippath pathbbox /pgtop exch def pop pop pop /page { copypage erasepage restore save home } def /home { newpath 0 pgtop moveto } def /mf { statusdict /manualfeed true put } def /af { statusdict /manualfeed false put } def af 0 0 moveto 2 setlinecap /y { neg 0 exch rmoveto } def /X { currentpoint exch pop moveto } def /Y { pgtop exch sub currentpoint pop exch moveto } def /s { show } def /l { neg rlineto currentpoint stroke moveto } def /c { 2 div /rad exch def currentpoint /y0 exch def /x0 exch def newpath x0 rad add y0 rad 0 360 arc stroke x0 rad add rad add y0 moveto } def /a { /y2 exch neg def /x2 exch def /y1 exch neg def /x1 exch def x1 y1 rmoveto currentpoint currentpoint x2 x2 mul y2 y2 mul add sqrt y1 neg x1 neg atan y2 x2 atan newpath arc stroke moveto x2 y2 rmoveto } def /e { 2 div /yrad exch def 2 div /xrad exch def currentpoint /y0 exch def /x0 exch def x0 xrad add y0 translate xrad yrad scale newpath 0 0 1 0 360 arc savematrix setmatrix stroke x0 xrad add xrad add y0 moveto } def /spln { rcurveto currentpoint stroke moveto } def /ft { /fonttype exch def /xsiz exch def /ysiz exch def /sl exch def fonttype [ xsiz pt 0 sl sin sl cos div ysiz pt mul ysiz pt 0 0 ] makefont setfont xsiz 1.7 div setlinewidth } def /pt { 10 mul } def -90 230 translate /savematrix matrix currentmatrix def /BracketFontDict 9 dict def /$workingdict 10 dict def BracketFontDict begin /FontType 3 def /FontName (Bracket) cvn def /FontMatrix [ 0.001 0 0 0.001 0 0] def /FontBBox [ -50 -250 1000 1000 ] def /Encoding 256 array def 0 1 255 { Encoding exch /.notdef put } for Encoding dup 65 /Cbv put dup 66 /Clt put dup 67 /Clk put dup 68 /Clb put dup 69 /Crt put dup 70 /Crk put dup 71 /Crb put dup 72 /Clc put dup 73 /Clf put dup 74 /Crc put dup 75 /Crf put dup 76 /Cbr put dup 77 /Crn put dup 78 /Cci put dup 79 /C|| put dup 80 /C^^ put dup 81 /Cr1 put dup 82 /Cr2 put pop /CharProcs 24 dict dup begin /setC { 0 -50 -250 500 1000 setcachedevice} def /C.bv {220 -250 moveto 0 1000 rlineto 60 0 rlineto 0 -1000 rlineto fill } def /C.barc { 750 moveto 180 0 rlineto 0 -60 rlineto -180 0 rlineto fill } def /C.barf { -250 moveto 180 0 rlineto 0 60 rlineto -180 0 rlineto fill } def /C.brk.end { 1 setlinewidth moveto rlineto rcurveto reversepath 60 0 rlineto rlineto rcurveto fill } def /C.setl {dup dtransform exch round exch idtransform pop setlinewidth } def /Cbv { 500 setC C.bv } def /Clt { 500 setC 0 150 50 210 140 250 0 730 0 150 50 250 200 250 0 750 220 -250 C.brk.end } def /Clk { 500 setC 1 setlinewidth 220 -250 moveto 0 400 rlineto 0 50 -50 100 -100 100 rcurveto 50 0 100 50 100 100 rcurveto 0 400 rlineto 60 0 rlineto 0 -400 rlineto 0 -50 -50 -100 -100 -100 rcurveto 50 0 100 -50 100 -100 rcurveto 0 -400 rlineto closepath fill } def /Clb { 500 setC 0 -150 50 -210 140 -250 0 -730 0 -150 50 -250 200 -250 0 -750 220 750 C.brk.end } def /Crt { 500 setC 0 150 -50 250 -200 250 0 750 0 150 -50 210 -140 250 0 730 220 -250 C.brk.end } def /Crk { 500 setC 1 setlinewidth 220 -250 moveto 0 400 rlineto 0 50 50 100 100 100 rcurveto -50 0 -100 50 -100 100 rcurveto 0 400 rlineto 60 0 rlineto 0 -400 rlineto 0 -50 50 -100 100 -100 rcurveto -50 0 -100 -50 -100 -100 rcurveto 0 -400 rlineto fill } def /Crb { 500 setC 0 -150 -50 -250 -200 -250 0 -750 0 -150 -50 -210 -140 -250 0 -730 220 750 C.brk.end } def /Clc { 500 setC C.bv 280 C.barc } def /Clf { 500 setC C.bv 280 C.barf } def /Crc { 500 setC C.bv 40 C.barc } def /Crf { 500 setC C.bv 40 C.barf } def /Cbr { 0 0 -50 -250 0 1000 setcachedevice 40 C.setl 0 -250 moveto 0 1000 rlineto stroke } def /Crn { 500 setC 40 C.setl 0 895 moveto 500 0 rlineto stroke } def /Cci { 1000 0 -50 -250 1000 1000 setcachedevice 40 C.setl 500 250 400 0 360 arc stroke } def /C|| { 170 0 -50 -250 170 1000 setcachedevice } def /C^^ { 80 0 -50 -250 80 1000 setcachedevice } def /Cr1 { 800 0 -50 -250 800 1000 setcachedevice 40 C.setl 0 setlinejoin 700 180 moveto -650 currentlinewidth add 0 rlineto 200 -200 rlineto 50 360 moveto 650 currentlinewidth sub 0 rlineto -200 200 rlineto stroke } def /Cr2 { 800 0 -50 -250 800 1000 setcachedevice 40 C.setl 2 setlinejoin 217 18 moveto -150 150 rlineto 150 150 rlineto -150 -150 rlineto 633 0 rlineto 50 360 moveto 633 0 rlineto -150 150 rlineto 150 -150 rlineto -150 -150 rlineto stroke } def end def /BuildChar { $workingdict begin /charcode exch def /fontdict exch def fontdict /CharProcs get begin fontdict /Encoding get charcode get load gsave 0 setlinecap 0 setgray newpath exec grestore end end } def end /BracketFont BracketFontDict definefont pop /f.R /Times-Roman findfont def /f.I /Times-Italic findfont def /f.B /Times-Bold findfont def /f.BI /Times-BoldItalic findfont def /f.H /Helvetica findfont def /f.HB /Helvetica-Bold findfont def /f.HO /Helvetica-Oblique findfont def /f.HX /Helvetica-BoldOblique findfont def /f.C /Courier findfont def /f.CB /Courier-Bold findfont def /f.CO /Courier-Oblique findfont def /f.CX /Courier-BoldOblique findfont def /f.BR /Bookman-Light findfont def /f.BO /Bookman-LightItalic findfont def /f.BB /Bookman-Demi findfont def /f.BX /Bookman-DemiItalic findfont def /f.S /Symbol findfont def /f.S2 /BracketFont findfont def 0.0 10 10 f.R ft save home %%EndProlog 0 Y %%Page: 1 1 694 X 480 Y(splitlog)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4906 X(splitlog)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 0.0 9 9 f.B ft(NAME)s 992 X 0.0 9 9 f.S2 ft(O)s 1030 X(O)s 1068 X(O)s 1106 X(O)s 1144 X(O)s 694 X 1080 Y 1054 X 0.0 10 10 f.R ft(splitlog)s 1380 X(\261)s 1455 X(split)s 1653 X(WWW)s 1960 X(server)s 2228 X(\(httpd\))s 2525 X(access)s 2804 X(log\256les)s 694 X 1248 Y 0.0 9 9 f.B ft(SYNOPSIS)s 1157 X 0.0 9 9 f.S2 ft(O)s 1195 X(O)s 1233 X(O)s 1271 X(O)s 1309 X(O)s 694 X 1368 Y 1054 X 0.0 10 10 f.B ft(splitlog)s 1391 X 0.0 10 10 f.R ft([)s 0.0 10 10 f.B ft(\261f)s 1532 X 0.0 10 10 f.I ft(con\256g\256le)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft(])s 1964 X([)s 0.0 10 10 f.I ft(options)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft(...])s 2433 X([)s 0.0 10 10 f.B ft(--)s 0.0 10 10 f.R ft(])s 2590 X([)s 2648 X 0.0 10 10 f.I ft(log\256le)s 0.0 10 10 f.S2 ft(P)s 2931 X 0.0 10 10 f.R ft(|)s 2976 X 0.0 10 10 f.B ft(+)s 3058 X 0.0 10 10 f.R ft(|)s 3103 X 0.0 10 10 f.B ft(\261)s 3178 X 0.0 10 10 f.R ft(]...)s 694 X 1536 Y 0.0 9 9 f.B ft(DESCRIPTION)s 1342 X 0.0 9 9 f.S2 ft(O)s 1380 X(O)s 1418 X(O)s 1456 X(O)s 1494 X(O)s 694 X 1656 Y 1054 X 0.0 10 10 f.B ft(splitlog)s 1395 X 0.0 10 10 f.R ft(reads)s 1634 X(a)s 1707 X(sequence)s 2101 X(of)s 2213 X 0.0 10 10 f.B ft(httpd)s 2476 X 0.0 10 10 f.R ft(common)s 2855 X(log\256le)s 3140 X(format)s 3435 X(\(CLF\))s 3714 X(access_log)s 4174 X(\256les)s 4369 X(and/or)s 4652 X(the)s 4802 X(standard)s 5168 X(input)s 694 X 1776 Y 1054 X(and)s 1223 X(splits)s 1460 X(the)s 1607 X(log\256le)s 1888 X(entries)s 2179 X(into)s 2360 X(separate)s 2711 X(\256les)s 2903 X(according)s 3321 X(to)s 3424 X(the)s 3571 X(entry's)s 3873 X(requested)s 4280 X(URL)s 4505 X(or)s 4613 X(virtual)s 4899 X(host)s 5091 X(pre\256x.)s 694 X 1944 Y 1054 X 0.0 10 10 f.B ft(splitlog)s 1393 X 0.0 10 10 f.R ft(is)s 1487 X(intended)s 1858 X(to)s 1963 X(be)s 2084 X(run)s 2244 X(periodically)s 2748 X(by)s 2875 X(the)s 3024 X(webmaster)s 3483 X(as)s 3593 X(a)s 3664 X(means)s 3946 X(for)s 4089 X(providing)s 4505 X(individual)s 4937 X(log\256les)s 5258 X(for)s 694 X 2064 Y 1054 X(each)s 1267 X(of)s 1381 X(the)s 1534 X(customers)s 1970 X(of)s 2084 X(a)s 2159 X(server,)s 2458 X(since)s 2694 X(it)s 2780 X(is)s 2877 X(less)s 3057 X(e)s /Cff { (f) show xsiz pt 20 div neg 0 rmoveto (f) s } def Cff(icient)s 3414 X(for)s 3560 X(the)s 3712 X(server)s 3985 X(itself)s 4215 X(to)s 4323 X(generate)s 4690 X(multiple)s 5054 X(log\256les.)s 694 X 2184 Y 1054 X 0.0 10 10 f.B ft(splitlog)s 1402 X 0.0 10 10 f.R ft(does)s 1621 X(not)s 1785 X(make)s 2037 X(any)s 2217 X(changes)s 2574 X(to)s 2688 X(the)s 2846 X(input)s 3088 X(\256le)s 3252 X(and)s 3432 X(can)s 3606 X(be)s 3735 X(con\256gured)s 4197 X(to)s 4310 X(write)s 4550 X(the)s 4707 X(split)s 4915 X(\256les)s 5117 X(in)s 5230 X(any)s 694 X 2304 Y 1054 X(directory.)s 1470 X(By)s 1618 X(default,)s 1951 X(a)s 2026 X(cached)s 2333 X(DNS)s 2564 X(lookup)s 2873 X(is)s 2971 X(performed)s 3416 X(on)s 3546 X(any)s 3720 X(IP)s 3839 X(addresses)s 4251 X(which)s 4525 X(are)s 4676 X(unresolved)s 5144 X(in)s 5252 X(the)s 694 X 2424 Y 1054 X(input)s 1305 X(\256le.)s 1528 X(The)s 1728 X(log)s 1901 X(entries)s 2212 X(can)s 2395 X(also)s 2601 X(be)s 2740 X(anonymized)s 3273 X(if)s 3379 X(there)s 3623 X(are)s 3789 X(concerns)s 4188 X(about)s 4454 X(the)s 4620 X(requesting)s 5080 X(clients')s 694 X 2544 Y 1054 X(privacy.)s 694 X 2712 Y 1054 X 0.0 10 10 f.B ft(splitlog)s 1399 X 0.0 10 10 f.R ft(is)s 1498 X(a)s 1574 X 0.0 10 10 f.B ft(perl)s 1778 X 0.0 10 10 f.R ft(script,)s 2057 X(which)s 2333 X(means)s 2620 X(you)s 2802 X(need)s 3022 X(to)s 3132 X(have)s 3352 X(a)s 3428 X 0.0 10 10 f.B ft(perl)s 3632 X 0.0 10 10 f.R ft(interpreter)s 4079 X(to)s 4189 X(run)s 4354 X(the)s 4508 X(program.)s 4928 X(It)s 5021 X(has)s 5186 X(been)s 694 X 2832 Y 1054 X(tested)s 1312 X(with)s 1515 X 0.0 10 10 f.B ft(perl)s 1712 X 0.0 10 10 f.R ft(versions)s 2070 X(4.036)s 2320 X(and)s 2489 X(5.002.)s 694 X 3000 Y 0.0 9 9 f.B ft(OPTIONS)s 1122 X 0.0 9 9 f.S2 ft(O)s 1160 X(O)s 1198 X(O)s 1236 X(O)s 1274 X(O)s 694 X 3120 Y 874 X 0.0 9 9 f.B ft(Con\256guration)s 1437 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Options)s 1780 X 0.0 9 9 f.S2 ft(O)s 1818 X(O)s 1856 X(O)s 1894 X(O)s 694 X 3240 Y 1054 X 0.0 10 10 f.R ft(These)s 1317 X(options)s 1637 X(de\256ne)s 1906 X(how)s 2103 X 0.0 10 10 f.B ft(splitlog)s 2440 X 0.0 10 10 f.R ft(should)s 2732 X(establish)s 3107 X(defaults)s 3448 X(and)s 3617 X(interpret)s 3980 X(the)s 4127 X(command-line.)s 694 X 3408 Y 1054 X 0.0 10 10 f.B ft(\261f)s 1162 X 0.0 10 10 f.I ft(\256lename)s 694 X 3528 Y 1414 X 0.0 10 10 f.R ft(Get)s 1590 X(the)s 1743 X(con\256guration)s 2307 X(defaults)s 2654 X(from)s 2879 X(the)s 3032 X(given)s 3285 X(\256le.)s 3494 X(If)s 3591 X(used,)s 3830 X(this)s 4006 X 0.0 10 10 f.B ft(must)s 4248 X 0.0 10 10 f.R ft(be)s 4373 X(the)s 4526 X(\256rst)s 4713 X(argument)s 5121 X(on)s 5252 X(the)s 694 X 3648 Y 1414 X(command-line,)s 2067 X(since)s 2323 X(it)s 2430 X(needs)s 2708 X(to)s 2837 X(be)s 2982 X(interpreted)s 3465 X(before)s 3770 X(the)s 3943 X(other)s 4199 X(command)s 4644 X(options.)s 5040 X(The)s 5246 X(\256le)s 694 X 3768 Y 1414 X 0.0 10 10 f.B ft(splitlog.rc)s 1868 X 0.0 10 10 f.R ft(is)s 1964 X(included)s 2337 X(with)s 2544 X(the)s 2695 X(distribution)s 3186 X(as)s 3297 X(an)s 3419 X(example)s 3785 X(of)s 3896 X(this)s 4069 X(\256le;)s 4253 X(it)s 4337 X(contains)s 4698 X 0.0 10 10 f.B ft(perl)s 4898 X 0.0 10 10 f.R ft(source)s 5186 X(code)s 694 X 3888 Y 1414 X(which)s 1685 X(directly)s 2016 X(sets)s 2192 X(the)s 2340 X(control)s 2649 X(and)s 2819 X(display)s 3134 X(options)s 3455 X(provided)s 3836 X(by)s 3962 X 0.0 10 10 f.B ft(splitlog)s 4300 X 0.0 10 10 f.R ft(and)s 4470 X(contains)s 4829 X(a)s 4899 X(function)s 5258 X(for)s 694 X 4008 Y 1414 X(altering)s 1749 X(the)s 1901 X(split)s 2104 X(log\256le)s 2390 X(name-selection)s 3024 X(algorithm.)s 3493 X(If)s 3589 X 0.0 10 10 f.I ft(\256lename)s 3957 X 0.0 10 10 f.R ft(is)s 4054 X(not)s 4212 X(a)s 4286 X(pathname,)s 4728 X(the)s 4879 X(include)s 5202 X(path)s 694 X 4128 Y 1414 X(\(see)s 1608 X 0.0 10 10 f.B ft(FILES)s 0.0 10 10 f.R ft(\))s 1965 X(is)s 2066 X(searched)s 2448 X(for)s 2598 X 0.0 10 10 f.I ft(\256lename)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft(.)s 3028 X(An)s 3184 X(empty)s 3468 X(string)s 3729 X(as)s 3845 X 0.0 10 10 f.I ft(\256lename)s 4216 X 0.0 10 10 f.R ft(will)s 4405 X(disable)s 4721 X(this)s 4899 X(feature.)s 5258 X([)s 0.0 10 10 f.B ft(\261f)s 694 X 4248 Y 1414 X 0.0 10 10 f.R ft("splitlog.rc"])s 694 X 4416 Y 1054 X 0.0 10 10 f.B ft(--)s 1414 X 0.0 10 10 f.R ft(Last)s 1611 X(option)s 1892 X(\(the)s 2072 X(remaining)s 2502 X(arguments)s 2943 X(are)s 3089 X(treated)s 3385 X(as)s 3493 X(input)s 3724 X(\256les\).)s 694 X 4584 Y 874 X 0.0 9 9 f.B ft(Diagnostic)s 1302 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Options)s 1645 X 0.0 9 9 f.S2 ft(O)s 1683 X(O)s 1721 X(O)s 1759 X(O)s 694 X 4704 Y 1054 X 0.0 10 10 f.R ft(These)s 1333 X(options)s 1669 X(provide)s 2015 X(information)s 2528 X(about)s 2791 X 0.0 10 10 f.B ft(splitlog)s 3144 X 0.0 10 10 f.R ft(usage)s 3412 X(or)s 3536 X(about)s 3798 X(some)s 4049 X(unusual)s 4400 X(aspects)s 4728 X(of)s 4851 X(the)s 5013 X(log\256le\(s\))s 694 X 4824 Y 1054 X(being)s 1301 X(processed.)s 694 X 4992 Y 1054 X 0.0 10 10 f.B ft(\261h)s 1414 X 0.0 10 10 f.R ft(Help)s 1633 X(\320)s 1758 X(display)s 2072 X(usage)s 2324 X(information)s 2821 X(to)s 2924 X(STDERR)s 3333 X(and)s 3502 X(then)s 3699 X(exit.)s 694 X 5160 Y 1054 X 0.0 10 10 f.B ft(\261e)s 1414 X 0.0 10 10 f.R ft(Display)s 1752 X(to)s 1857 X(STDERR)s 2268 X(all)s 2395 X(invalid)s 2700 X(log)s 2855 X(entries.)s 3173 X(Invalid)s 3483 X(log)s 3638 X(entries)s 3931 X(can)s 4096 X(occur)s 4343 X(if)s 4430 X(the)s 4578 X(server)s 4847 X(is)s 4940 X(miswriting)s 694 X 5280 Y 1414 X(or)s 1533 X(overwriting)s 2035 X(its)s 2166 X(own)s 2374 X(log,)s 2563 X(if)s 2660 X(the)s 2818 X(request)s 3142 X(is)s 3245 X(made)s 3497 X(by)s 3633 X(a)s 3712 X(broken)s 4024 X(client)s 4281 X(or)s 4399 X(proxy,)s 4692 X(or)s 4810 X(if)s 4906 X(a)s 4985 X(malicious)s 694 X 5400 Y 1414 X(attacker)s 1754 X(is)s 1846 X(trying)s 2110 X(to)s 2213 X(gain)s 2410 X(privileged)s 2840 X(access)s 3119 X(to)s 3222 X(your)s 3430 X(system.)s 694 X 5568 Y 874 X 0.0 9 9 f.B ft(Process)s 1187 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Options)s 1530 X 0.0 9 9 f.S2 ft(O)s 1568 X(O)s 1606 X(O)s 1644 X(O)s 694 X 5688 Y 1054 X 0.0 10 10 f.R ft(These)s 1317 X(options)s 1637 X(modify)s 1951 X(how)s 2148 X(and)s 2317 X(where)s 2585 X(log\256le)s 2866 X(entries)s 3157 X(are)s 3303 X(written.)s 694 X 5856 Y 1054 X 0.0 10 10 f.B ft(\261x)s 1414 X 0.0 10 10 f.R ft(Discard)s 1788 X(any)s 1996 X(log\256le)s 2316 X(entries)s 2646 X(without)s 3016 X(a)s 3123 X(\256lename)s 3530 X(key)s 3737 X(instead)s 4083 X(of)s 4229 X(placing)s 4586 X(them)s 4849 X(in)s 4990 X(a)s 5097 X(special)s 694 X 5976 Y 1414 X(OTHERS.log.)s 694 X 6144 Y 1054 X 0.0 10 10 f.B ft(\261v)s 1414 X 0.0 10 10 f.R ft(Use)s 1613 X(a)s 1701 X(pre\256x)s 1978 X(of)s 2105 X(the)s 2270 X(input)s 2519 X(\256le)s 2690 X(entries)s 2999 X(\(ended)s 3313 X(by)s 3456 X(the)s 3621 X(\256rst)s 3820 X(":")s 3973 X(or)s 4099 X(space\))s 4396 X(for)s 4555 X(selecting)s 4953 X(the)s 5118 X(output)s 694 X 6264 Y 1414 X(\256lename)s 1791 X(instead)s 2107 X(of,)s 2248 X(or)s 2364 X(in)s 2475 X(addition)s 2836 X(to,)s 2972 X(the)s 3127 X(URL)s 3360 X(path.)s 3615 X(The)s 3803 X(most)s 4030 X(likely)s 4290 X(use)s 4455 X(for)s 4603 X(such)s 4818 X(a)s 4894 X(pre\256x)s 5159 X(is)s 5258 X(for)s 694 X 6384 Y 1414 X(the)s 1561 X(requested)s 1968 X(virtual)s 2254 X(host.)s 694 X 6552 Y 1054 X 0.0 10 10 f.B ft(\261dir)s 1257 X 0.0 10 10 f.I ft(directory)s 694 X 6672 Y 1414 X 0.0 10 10 f.R ft(Place)s 1655 X(the)s 1802 X(output)s 2083 X(log\256les)s 2403 X(in)s 2506 X(the)s 2653 X(given)s 2900 X(directory)s 3285 X(instead)s 3593 X(of)s 3701 X(the)s 3848 X(current)s 4155 X(working)s 4513 X(directory.)s 694 X 6840 Y 1054 X 0.0 10 10 f.B ft(\261anon)s 1341 X 0.0 10 10 f.I ft(imu)s 694 X 6960 Y 1414 X 0.0 10 10 f.R ft(Anonymize)s 1908 X(the)s 2058 X(log\256le)s 2341 X(entries)s 2634 X(before)s 2915 X(writing)s 3231 X(them)s 3458 X(to)s 3563 X(split)s 3763 X(logs.)s 4007 X(The)s 4189 X(value)s 4432 X(is)s 4526 X(some)s 4764 X(combination)s 5291 X(of)s 694 X 7080 Y 1414 X(the)s 1567 X(letters)s 1842 X("i")s 1983 X(\(ident)s 2247 X(\256eld)s 2456 X(is)s 2553 X(removed\),)s 2990 X("m")s 3180 X(\(machine)s 3581 X(name)s 3827 X(is)s 3924 X(replaced)s 4291 X(with)s 4499 X(ANON)s 4817 X(or)s 4930 X(0\),)s 5068 X(and)s 5242 X("u")s 694 X 7200 Y 1414 X(\(authentication)s 2038 X(userid)s 2307 X(\256eld)s 2510 X(is)s 2602 X(removed\).)s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(1)s 7920 Y page 0.0 10 10 f.R ft %%Page: 2 2 694 X 480 Y(splitlog)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4906 X(splitlog)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 1054 X 0.0 10 10 f.B ft(\261dns)s 694 X 1080 Y 1054 X(\261nodns)s 1414 X 0.0 10 10 f.R ft(Do)s 1589 X(\()s 0.0 10 10 f.B ft(\261dns)s 0.0 10 10 f.R ft(\))s 1909 X(or)s 2045 X(don't)s 2309 X(\()s 0.0 10 10 f.B ft(\261nodns)s 0.0 10 10 f.R ft(\))s 2735 X(use)s 2921 X(the)s 3096 X(system's)s 3499 X(hostname)s 3935 X(lookup)s 4266 X(facilities)s 4662 X(to)s 4792 X(\256nd)s 5000 X(the)s 5174 X(DNS)s 694 X 1200 Y 1414 X(hostname)s 1837 X(associated)s 2287 X(with)s 2505 X(any)s 2689 X(unresolved)s 3167 X(IP)s 3296 X(addresses.)s 3743 X(Looking)s 4122 X(up)s 4262 X(a)s 4346 X(DNS)s 4586 X(name)s 4842 X(may)s 5053 X(be)s 5186 X 0.0 10 10 f.B ft(very)s 694 X 1320 Y 1414 X 0.0 10 10 f.R ft(slow,)s 1654 X(particularly)s 2140 X(when)s 2382 X(the)s 2530 X(results)s 2817 X(are)s 2964 X(negative)s 3328 X(\(no)s 3487 X(DNS)s 3713 X(name\),)s 4013 X(which)s 4283 X(is)s 4376 X(why)s 4574 X(a)s 4644 X(caching)s 4980 X(capability)s 694 X 1440 Y 1414 X(is)s 1506 X(included)s 1875 X(as)s 1983 X(well.)s 2230 X([)s 0.0 10 10 f.B ft(\261dns)s 0.0 10 10 f.R ft(])s 694 X 1608 Y 1054 X 0.0 10 10 f.B ft(\261cache)s 1367 X 0.0 10 10 f.I ft(\256lename)s 694 X 1728 Y 1414 X 0.0 10 10 f.R ft(Use)s 1599 X(the)s 1751 X(given)s 2003 X(DBM)s 2261 X(database)s 2634 X(as)s 2747 X(the)s 2899 X(read/write)s 3333 X(persistent)s 3746 X(DNS)s 3976 X(cache)s 4232 X(\(the)s 4416 X(.dir)s 4581 X(and)s 4754 X(.pag)s 4952 X(extensions)s 694 X 1848 Y 1414 X(are)s 1578 X(appended)s 2003 X(automatically\).)s 2648 X(Cached)s 2990 X(entries)s 3299 X(\(including)s 3753 X(negative)s 4134 X(results\))s 4471 X(are)s 4635 X(removed)s 5027 X(after)s 5252 X(the)s 694 X 1968 Y 1414 X(time)s 1620 X(con\256gured)s 2075 X(for)s 2219 X($DNSexpires)s 2785 X([two)s 2996 X(months].)s 3402 X(No)s 3552 X(caching)s 3890 X(is)s 3985 X(performed)s 4428 X(if)s 4516 X 0.0 10 10 f.I ft(\256lename)s 4881 X 0.0 10 10 f.R ft(is)s 4975 X(the)s 5124 X(empty)s 694 X 2088 Y 1414 X(string,)s 1713 X(which)s 2003 X(may)s 2221 X(be)s 2361 X(needed)s 2689 X(if)s 2795 X(your)s 3023 X(system)s 3346 X(does)s 3574 X(not)s 3747 X(support)s 4092 X(DBM)s 4365 X(or)s 4493 X(NDBM)s 4838 X(functionality.)s 694 X 2208 Y 1414 X(Running)s 1784 X 0.0 10 10 f.B ft(\261dns)s 2010 X 0.0 10 10 f.R ft(without)s 2341 X(a)s 2410 X(persistent)s 2818 X(cache)s 3069 X(is)s 3161 X(not)s 3314 X(recommended.)s 3954 X([)s 0.0 10 10 f.B ft(\261cache)s 4300 X 0.0 10 10 f.R ft("dnscache"])s 694 X 2376 Y 874 X 0.0 9 9 f.B ft(Search)s 1162 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Options)s 1505 X 0.0 9 9 f.S2 ft(O)s 1543 X(O)s 1581 X(O)s 1619 X(O)s 694 X 2496 Y 1054 X 0.0 10 10 f.R ft(These)s 1323 X(options)s 1649 X(are)s 1801 X(used)s 2015 X(to)s 2124 X(include)s 2449 X(or)s 2563 X(exclude)s 2904 X(log\256le)s 3191 X(entries)s 3488 X(from)s 3713 X(being)s 3965 X(output)s 4251 X(according)s 4674 X(to)s 4782 X(whether)s 5133 X(or)s 5246 X(not)s 694 X 2616 Y 1054 X(they)s 1259 X(match)s 1536 X(a)s 1613 X(given)s 1867 X(pattern.)s 2226 X(The)s 2413 X(pattern)s 2722 X(is)s 2821 X(supplied)s 3192 X(in)s 3302 X(the)s 3456 X(form)s 3682 X(of)s 3797 X(a)s 3873 X 0.0 10 10 f.B ft(perl)s 4077 X(regular)s 4425 X(expression)s 0.0 10 10 f.R ft(,)s 4932 X(except)s 5224 X(that)s 694 X 2736 Y 1054 X(the)s 1216 X(characters)s 1659 X("+")s 1837 X(and)s 2020 X(".")s 2166 X(are)s 2326 X(escaped)s 2680 X(automatically)s 3263 X(unless)s 3552 X(the)s 3713 X 0.0 10 10 f.B ft(\261noescape)s 4185 X 0.0 10 10 f.R ft(option)s 4480 X(is)s 4586 X(given.)s 4897 X(Enclose)s 5252 X(the)s 694 X 2856 Y 1054 X(pattern)s 1363 X(in)s 1472 X(single-quotes)s 2036 X(to)s 2145 X(prevent)s 2475 X(the)s 2628 X(command)s 3053 X(shell)s 3273 X(from)s 3498 X(interpreting)s 3995 X(some)s 4237 X(special)s 4545 X(characters.)s 5029 X(Multiple)s 694 X 2976 Y 1054 X(occurrences)s 1554 X(of)s 1662 X(the)s 1809 X(same)s 2039 X(option)s 2320 X(results)s 2606 X(in)s 2709 X(an)s 2828 X(OR-ing)s 3153 X(of)s 3261 X(the)s 3408 X(regular)s 3715 X(expressions.)s 694 X 3144 Y 1054 X 0.0 10 10 f.B ft(\261a)s 1179 X 0.0 10 10 f.I ft(regexp)s 694 X 3264 Y 1054 X 0.0 10 10 f.B ft(\261A)s 1201 X 0.0 10 10 f.I ft(regexp)s 694 X 3384 Y 1414 X 0.0 10 10 f.R ft(Include)s 1739 X(\()s 0.0 10 10 f.B ft(\261a)s 0.0 10 10 f.R ft(\))s 1930 X(or)s 2038 X(exclude)s 2373 X(\()s 0.0 10 10 f.B ft(\261A)s 0.0 10 10 f.R ft(\))s 2586 X(all)s 2711 X(requests)s 3063 X(containing)s 3510 X(a)s 3579 X(hostname/IP)s 4104 X(address)s 4428 X(matching)s 4825 X(the)s 4972 X(given)s 5219 X(perl)s 694 X 3504 Y 1414 X(regular)s 1721 X(expression.)s 694 X 3672 Y 1054 X 0.0 10 10 f.B ft(\261c)s 1173 X 0.0 10 10 f.I ft(regexp)s 694 X 3792 Y 1054 X 0.0 10 10 f.B ft(\261C)s 1201 X 0.0 10 10 f.I ft(regexp)s 694 X 3912 Y 1414 X 0.0 10 10 f.R ft(Include)s 1739 X(\()s 0.0 10 10 f.B ft(\261c)s 0.0 10 10 f.R ft(\))s 1925 X(or)s 2034 X(exclude)s 2370 X(\()s 0.0 10 10 f.B ft(\261C)s 0.0 10 10 f.R ft(\))s 2584 X(all)s 2710 X(requests)s 3063 X(resulting)s 3439 X(in)s 3543 X(an)s 3663 X 0.0 10 10 f.B ft(HTTP)s 3962 X 0.0 10 10 f.R ft(status)s 4215 X(code)s 4428 X(matching)s 4825 X(the)s 4972 X(given)s 5219 X(perl)s 694 X 4032 Y 1414 X(regular)s 1721 X(expression.)s 694 X 4200 Y 1054 X 0.0 10 10 f.B ft(\261d)s 1185 X 0.0 10 10 f.I ft(regexp)s 694 X 4320 Y 1054 X 0.0 10 10 f.B ft(\261D)s 1201 X 0.0 10 10 f.I ft(regexp)s 694 X 4440 Y 1414 X 0.0 10 10 f.R ft(Include)s 1746 X(\()s 0.0 10 10 f.B ft(\261d)s 0.0 10 10 f.R ft(\))s 1951 X(or)s 2067 X(exclude)s 2410 X(\()s 0.0 10 10 f.B ft(\261D)s 0.0 10 10 f.R ft(\))s 2631 X(all)s 2764 X(requests)s 3124 X(occurring)s 3539 X(on)s 3672 X(a)s 3749 X(date)s 3948 X(\(e.g.,)s 4183 X("Feb)s 4407 X(02)s 4540 X(1994"\))s 4847 X(matching)s 5252 X(the)s 694 X 4560 Y 1414 X(given)s 1661 X(perl)s 1841 X(regular)s 2148 X(expression.)s 694 X 4728 Y 1054 X 0.0 10 10 f.B ft(\261t)s 1162 X 0.0 10 10 f.I ft(regexp)s 694 X 4848 Y 1054 X 0.0 10 10 f.B ft(\261T)s 1196 X 0.0 10 10 f.I ft(regexp)s 694 X 4968 Y 1414 X 0.0 10 10 f.R ft(Include)s 1749 X(\()s 0.0 10 10 f.B ft(\261t)s 0.0 10 10 f.R ft(\))s 1934 X(or)s 2053 X(exclude)s 2399 X(\()s 0.0 10 10 f.B ft(\261T)s 0.0 10 10 f.R ft(\))s 2618 X(all)s 2754 X(requests)s 3117 X(occurring)s 3535 X(during)s 3832 X(the)s 3990 X(hour)s 4209 X(\(e.g.,)s 4446 X("23")s 4663 X(is)s 4765 X(11pm)s 5028 X(\261)s 5113 X(12pm\))s 694 X 5088 Y 1414 X(matching)s 1811 X(the)s 1958 X(given)s 2205 X(perl)s 2385 X(regular)s 2692 X(expression.)s 694 X 5256 Y 1054 X 0.0 10 10 f.B ft(\261m)s 1212 X 0.0 10 10 f.I ft(regexp)s 694 X 5376 Y 1054 X 0.0 10 10 f.B ft(\261M)s 1223 X 0.0 10 10 f.I ft(regexp)s 694 X 5496 Y 1414 X 0.0 10 10 f.R ft(Include)s 1748 X(\()s 0.0 10 10 f.B ft(\261m)s 0.0 10 10 f.R ft(\))s 1982 X(or)s 2100 X(exclude)s 2445 X(\()s 0.0 10 10 f.B ft(\261M)s 0.0 10 10 f.R ft(\))s 2690 X(all)s 2825 X(requests)s 3187 X(using)s 3438 X(an)s 3566 X(HTTP)s 3850 X(method)s 4184 X(\(e.g.,)s 4420 X("HEAD"\))s 4846 X(matching)s 5252 X(the)s 694 X 5616 Y 1414 X(given)s 1661 X(perl)s 1841 X(regular)s 2148 X(expression.)s 694 X 5784 Y 1054 X 0.0 10 10 f.B ft(\261n)s 1185 X 0.0 10 10 f.I ft(regexp)s 694 X 5904 Y 1054 X 0.0 10 10 f.B ft(\261N)s 1201 X 0.0 10 10 f.I ft(regexp)s 694 X 6024 Y 1414 X 0.0 10 10 f.R ft(Include)s 1739 X(\()s 0.0 10 10 f.B ft(\261n)s 0.0 10 10 f.R ft(\))s 1937 X(or)s 2046 X(exclude)s 2382 X(\()s 0.0 10 10 f.B ft(\261N)s 0.0 10 10 f.R ft(\))s 2596 X(all)s 2722 X(requests)s 3075 X(on)s 3201 X(a)s 3271 X(URL)s 3496 X(\(archive)s 3847 X(name\))s 4121 X(matching)s 4518 X(the)s 4665 X(given)s 4912 X(perl)s 5092 X(regular)s 694 X 6144 Y 1414 X(expression.)s 694 X 6312 Y 1054 X 0.0 10 10 f.B ft(\261noescape)s 694 X 6432 Y 1414 X 0.0 10 10 f.R ft(Do)s 1561 X(not)s 1714 X(escape)s 2004 X(the)s 2151 X(special)s 2453 X(characters)s 2881 X(\("+")s 3077 X(and)s 3246 X("."\))s 3411 X(in)s 3514 X(the)s 3661 X(remaining)s 4091 X(search)s 4370 X(options.)s 694 X 6600 Y 0.0 9 9 f.B ft(INPUT)s 997 X 0.0 9 9 f.S2 ft(O)s 1035 X(O)s 1073 X(O)s 1111 X(O)s 1149 X(O)s 694 X 6720 Y 1054 X 0.0 10 10 f.R ft(After)s 1291 X(parsing)s 1611 X(the)s 1759 X(options,)s 2105 X(the)s 2253 X(remaining)s 2684 X(arguments)s 3126 X(on)s 3252 X(the)s 3400 X(command-line)s 4003 X(are)s 4150 X(treated)s 4447 X(as)s 4556 X(input)s 4788 X(arguments)s 5230 X(and)s 694 X 6840 Y 1054 X(are)s 1200 X(read)s 1396 X(in)s 1499 X(the)s 1646 X(order)s 1881 X(given.)s 2178 X(If)s 2269 X(no)s 2394 X(input)s 2625 X(arguments)s 3066 X(are)s 3212 X(given,)s 3484 X(the)s 3631 X(con\256gured)s 4083 X(default)s 4385 X(log\256le)s 4666 X(is)s 4758 X(read)s 4954 X([)s 0.0 10 10 f.B ft(+)s 0.0 10 10 f.R ft(].)s 694 X 7008 Y 1054 X 0.0 10 10 f.B ft(\261)s 1414 X 0.0 10 10 f.R ft(Read)s 1644 X(from)s 1863 X(standard)s 2226 X(input)s 2457 X(\(STDIN\).)s 694 X 7176 Y 1054 X 0.0 10 10 f.B ft(+)s 1414 X 0.0 10 10 f.R ft(Read)s 1644 X(the)s 1791 X(default)s 2093 X(log\256le.)s 2399 X([as)s 2540 X(con\256gured])s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(2)s 7920 Y page 0.0 10 10 f.R ft %%Page: 3 3 694 X 480 Y(splitlog)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4906 X(splitlog)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 1054 X 0.0 10 10 f.I ft(log\256le)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft(...)s 694 X 1080 Y 1414 X(Read)s 1647 X(the)s 1797 X(given)s 2047 X(log\256le.)s 2381 X(If)s 2475 X(the)s 2625 X 0.0 10 10 f.I ft(log\256le)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft('s)s 2983 X(extension)s 3394 X(indicates)s 3777 X(that)s 3955 X(is)s 4050 X(is)s 4145 X(compressed)s 4644 X(\(gz|z|Z\),)s 5002 X(then)s 5202 X(pipe)s 694 X 1200 Y 1414 X(it)s 1495 X(through)s 1831 X(the)s 1978 X(con\256gured)s 2430 X(decompression)s 3054 X(program)s 3417 X([)s 0.0 10 10 f.B ft(gunzip)s 3765 X(\261c)s 0.0 10 10 f.R ft(])s 3917 X(\256rst.)s 694 X 1368 Y 0.0 9 9 f.B ft(USAGE)s 1027 X 0.0 9 9 f.S2 ft(O)s 1065 X(O)s 1103 X(O)s 1141 X(O)s 1179 X(O)s 694 X 1488 Y 1054 X 0.0 10 10 f.R ft(In)s 1174 X(most)s 1406 X(cases,)s 1678 X 0.0 10 10 f.B ft(splitlog)s 2027 X 0.0 10 10 f.R ft(is)s 2131 X(run)s 2301 X(on)s 2438 X(a)s 2518 X(periodic)s 2881 X(basis)s 3117 X(by)s 3253 X(a)s 3333 X(wrapper)s 3695 X(program)s 4069 X(as)s 4188 X(a)s 4268 X 0.0 10 10 f.B ft(crontab)s 4637 X 0.0 10 10 f.R ft(entry)s 4878 X(shortly)s 5192 X(after)s 694 X 1608 Y 1054 X(midnight,)s 1477 X(typically)s 1863 X(in)s 1977 X(conjunction)s 2485 X(with)s 2699 X(rotating)s 3046 X(the)s 3204 X(current)s 3522 X(log\256le.)s 3864 X(The)s 4054 X 0.0 10 10 f.B ft(\261D)s 4211 X(today)s 4485 X 0.0 10 10 f.R ft(option)s 4776 X(can)s 4949 X(be)s 5078 X(used)s 5296 X(to)s 694 X 1728 Y 1054 X(split)s 1252 X(the)s 1399 X(main)s 1624 X(log\256le)s 1905 X(on)s 2030 X(a)s 2099 X(daily)s 2324 X(basis)s 2549 X(without)s 2880 X(rotation.)s 694 X 1896 Y 1054 X(All)s 1215 X(of)s 1331 X(the)s 1486 X(command-line)s 2096 X(options,)s 2449 X(and)s 2625 X(a)s 2701 X(few)s 2882 X(options)s 3209 X(that)s 3391 X(are)s 3544 X(not)s 3704 X(available)s 4096 X(from)s 4322 X(the)s 4476 X(command-line,)s 5110 X(can)s 5280 X(be)s 694 X 2016 Y 1054 X(changed)s 1411 X(within)s 1692 X(the)s 1839 X(user)s 2030 X(con\256guration)s 2588 X(\256le)s 2741 X(\(see)s 2926 X 0.0 10 10 f.B ft(splitlog.rc)s 0.0 10 10 f.R ft(\).)s 3459 X(This)s 3662 X(\256le)s 3815 X(is)s 3907 X(actually)s 4248 X(a)s 4317 X 0.0 10 10 f.B ft(perl)s 4514 X 0.0 10 10 f.R ft(library)s 4805 X(module)s 5130 X(which)s 694 X 2136 Y 1054 X(is)s 1161 X(executed)s 1554 X(as)s 1676 X(part)s 1870 X(of)s 1992 X(the)s 2153 X(program's)s 2602 X(initialization.)s 3197 X(The)s 3391 X(example)s 3768 X(provided)s 4162 X(with)s 4379 X(the)s 4540 X(distribution)s 5041 X(includes)s 694 X 2256 Y 1054 X(complete)s 1447 X(documentation)s 2068 X(on)s 2195 X(what)s 2416 X(variables)s 2803 X(can)s 2968 X(be)s 3089 X(set)s 3227 X(and)s 3398 X(their)s 3608 X(range)s 3856 X(of)s 3966 X(values.)s 4298 X(If)s 4391 X(the)s 4540 X(default)s 4843 X(algorithm)s 5258 X(for)s 694 X 2376 Y 1054 X(selecting)s 1439 X(the)s 1591 X(split)s 1794 X(log\256le)s 2080 X(name)s 2326 X(isn't)s 2533 X(desired,)s 2875 X(or)s 2987 X(if)s 3077 X(some)s 3317 X(set)s 3457 X(of)s 3569 X(names)s 3853 X(should)s 4149 X(be)s 4272 X(combined)s 4695 X(into)s 4880 X(a)s 4953 X(single)s 5221 X(\256le,)s 694 X 2496 Y 1054 X(then)s 1251 X(uncomment)s 1748 X(the)s 1895 X(user_path_map\(\))s 2596 X(function)s 2954 X(and)s 3123 X(de\256ne)s 3392 X(your)s 3600 X(own)s 3797 X(name-selection)s 4426 X(algorithm.)s 694 X 2664 Y 1054 X(The)s 1241 X 0.0 10 10 f.B ft(wwwstat)s 1644 X 0.0 10 10 f.R ft(program)s 2014 X(can)s 2184 X(be)s 2310 X(used)s 2525 X(to)s 2635 X(analyze)s 2971 X(the)s 3125 X(resulting)s 3507 X(log\256les.)s 3859 X(See)s 4035 X 0.0 10 10 f.B ft(wwwstat)s 4438 X 0.0 10 10 f.R ft(for)s 4586 X(a)s 4662 X(description)s 5138 X(of)s 5252 X(the)s 694 X 2784 Y 1054 X(common)s 1429 X(log\256le)s 1710 X(format.)s 694 X 2952 Y 874 X 0.0 9 9 f.B ft(Perl)s 1057 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Regular)s 1405 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Expressions)s 1903 X 0.0 9 9 f.S2 ft(O)s 1941 X(O)s 1979 X(O)s 694 X 3072 Y 1054 X 0.0 10 10 f.R ft(The)s 1236 X(Search)s 1533 X(Options)s 1876 X(and)s 2046 X(many)s 2294 X(of)s 2403 X(the)s 2551 X(con\256guration)s 3110 X(\256le)s 3264 X(settings)s 3596 X(allow)s 3844 X(for)s 3986 X(full)s 4151 X(use)s 4310 X(of)s 4419 X(perl)s 4600 X(regular)s 4908 X(expressions)s 694 X 3192 Y 1054 X(\(with)s 1304 X(the)s 1465 X(exception)s 1892 X(that)s 2080 X(the)s 2240 X(\261a,)s 2397 X(\261A,)s 2582 X(\261n)s 2720 X(and)s 2902 X(\261N)s 3062 X(options)s 3395 X(treat)s 3610 X('+')s 3770 X(and)s 3952 X('.')s 4081 X(characters)s 4522 X(as)s 4643 X(normal)s 4964 X(alphabetic)s 694 X 3312 Y 1054 X(characters)s 1508 X(unless)s 1809 X(they)s 2032 X(are)s 2204 X(preceded)s 2614 X(by)s 2765 X(the)s 2938 X 0.0 10 10 f.B ft(\261noescape)s 3422 X 0.0 10 10 f.R ft(option\).)s 3812 X(Most)s 4069 X(people)s 4386 X(only)s 4614 X(need)s 4852 X(to)s 4980 X(know)s 5252 X(the)s 694 X 3432 Y 1054 X(following)s 1468 X(special)s 1770 X(characters:)s 694 X 3600 Y 1054 X 0.0 10 10 f.B ft(\303)s 1454 X 0.0 10 10 f.R ft(at)s 1551 X(start)s 1748 X(of)s 1856 X(pattern,)s 2183 X(means)s 2463 X("starts)s 2740 X(with)s 2943 X(pattern".)s 694 X 3720 Y 1054 X 0.0 10 10 f.B ft($)s 1454 X 0.0 10 10 f.R ft(at)s 1551 X(end)s 1720 X(of)s 1828 X(pattern,)s 2155 X(means)s 2435 X("ends)s 2684 X(with)s 2887 X(pattern".)s 694 X 3840 Y 1054 X 0.0 10 10 f.B ft(\(...\))s 1454 X 0.0 10 10 f.R ft(groups)s 1751 X(pattern)s 2053 X(elements)s 2433 X(as)s 2541 X(a)s 2610 X(single)s 2874 X(element.)s 694 X 3960 Y 1054 X 0.0 10 10 f.B ft(?)s 1454 X 0.0 10 10 f.R ft(matches)s 1806 X(preceding)s 2224 X(element)s 2565 X(zero)s 2761 X(or)s 2869 X(one)s 3038 X(times.)s 694 X 4080 Y 1054 X 0.0 10 10 f.S ft(*)s 1454 X 0.0 10 10 f.R ft(matches)s 1806 X(preceding)s 2224 X(element)s 2565 X(zero)s 2761 X(or)s 2869 X(more)s 3099 X(times.)s 694 X 4200 Y 1054 X 0.0 10 10 f.B ft(+)s 1454 X 0.0 10 10 f.R ft(matches)s 1806 X(preceding)s 2224 X(element)s 2565 X(one)s 2734 X(or)s 2842 X(more)s 3072 X(times.)s 694 X 4320 Y 1054 X 0.0 10 10 f.B ft(.)s 1454 X 0.0 10 10 f.R ft(matches)s 1806 X(any)s 1975 X(single)s 2239 X(character.)s 694 X 4440 Y 1054 X 0.0 10 10 f.B ft([...])s 1454 X 0.0 10 10 f.R ft(denotes)s 1788 X(a)s 1861 X(class)s 2084 X(of)s 2195 X(characters)s 2626 X(to)s 2732 X(match.)s 3029 X([\303...])s 3231 X(negates)s 3558 X(the)s 3708 X(class.)s 3980 X(Inside)s 4252 X(a)s 4324 X(class,)s 4571 X('-')s 4698 X(indicates)s 5081 X(a)s 5153 X(range)s 694 X 4560 Y 1454 X(of)s 1562 X(characters.)s 694 X 4680 Y 1054 X 0.0 10 10 f.B ft(\(A|B|C\))s 1454 X 0.0 10 10 f.R ft(matches)s 1806 X(if)s 1892 X(A)s 1989 X(or)s 2097 X(B)s 2189 X(or)s 2297 X(C)s 2389 X(matches.)s 694 X 4848 Y 1054 X(Depending)s 1523 X(on)s 1654 X(your)s 1868 X(command)s 2293 X(shell,)s 2538 X(some)s 2780 X(special)s 3088 X(characters)s 3521 X(may)s 3723 X(need)s 3941 X(to)s 4049 X(be)s 4173 X(escaped)s 4518 X(on)s 4648 X(the)s 4800 X(command)s 5224 X(line)s 694 X 4968 Y 1054 X(or)s 1162 X(enclosed)s 1536 X(in)s 1639 X(single-quotes)s 2197 X(to)s 2300 X(avoid)s 2547 X(shell)s 2761 X(interpretation.)s 694 X 5136 Y 0.0 9 9 f.B ft(ENVIRONMENT)s 1412 X 0.0 9 9 f.S2 ft(O)s 1450 X(O)s 1488 X(O)s 1526 X(O)s 1564 X(O)s 694 X 5256 Y 1054 X 0.0 10 10 f.B ft(HOME)s 1654 X 0.0 10 10 f.R ft(Location)s 2034 X(of)s 2142 X(user's)s 2405 X(home)s 2652 X(directory,)s 3062 X(placed)s 3347 X(on)s 3472 X(INC)s 3669 X(path.)s 694 X 5424 Y 1054 X 0.0 10 10 f.B ft(LOGDIR)s 1654 X 0.0 10 10 f.R ft(Used)s 1884 X(instead)s 2192 X(of)s 2300 X(HOME)s 2619 X(if)s 2705 X(latter)s 2935 X(is)s 3027 X(unde\256ned.)s 694 X 5592 Y 1054 X 0.0 10 10 f.B ft(PERLLIB)s 1654 X 0.0 10 10 f.R ft(A)s 1751 X(colon-separated)s 2407 X(list)s 2555 X(of)s 2663 X(directories)s 3109 X(in)s 3212 X(which)s 3481 X(to)s 3584 X(look)s 3787 X(for)s 3928 X(the)s 4075 X(user)s 4266 X(con\256guration)s 4824 X(\256le.)s 694 X 5760 Y 0.0 9 9 f.B ft(FILES)s 977 X 0.0 9 9 f.S2 ft(O)s 1015 X(O)s 1053 X(O)s 1091 X(O)s 1129 X(O)s 694 X 5880 Y 1054 X 0.0 10 10 f.R ft(Unless)s 1353 X(a)s 1424 X(pathname)s 1839 X(is)s 1933 X(supplied,)s 2324 X(the)s 2473 X(con\256guration)s 3033 X(\256le)s 3188 X(is)s 3282 X(obtained)s 3653 X(from)s 3873 X(the)s 4021 X(current)s 4329 X(directory,)s 4740 X(the)s 4888 X(user's)s 5152 X(home)s 694 X 6000 Y 1054 X(directory)s 1444 X(\()s 0.0 10 10 f.B ft(HOME)s 1824 X 0.0 10 10 f.R ft(or)s 1937 X 0.0 10 10 f.B ft(LOGDIR)s 0.0 10 10 f.R ft(\),)s 2431 X(the)s 2583 X(standard)s 2951 X(library)s 3247 X(path)s 3449 X(\()s 0.0 10 10 f.B ft(PERLLIB)s 0.0 10 10 f.R ft(\),)s 4010 X(and)s 4184 X(the)s 4336 X(directory)s 4726 X(indicated)s 5122 X(by)s 5252 X(the)s 694 X 6120 Y 1054 X(command)s 1473 X(pathname)s 1886 X(\(in)s 2022 X(that)s 2197 X(order\).)s 694 X 6288 Y 1054 X 0.0 10 10 f.B ft(splitlog.rc)s 1804 X 0.0 10 10 f.R ft(User)s 2017 X(con\256guration)s 2575 X(\256le.)s 694 X 6456 Y 1054 X 0.0 10 10 f.B ft(dnscache.dir)s 694 X 6576 Y 1054 X(dnscache.pag)s 1804 X 0.0 10 10 f.R ft(DBM)s 2057 X(\256les)s 2249 X(for)s 2390 X(persistent)s 2798 X(DNS)s 3023 X(cache.)s 694 X 6744 Y 0.0 9 9 f.B ft(SEE)s 887 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(ALSO)s 1170 X 0.0 9 9 f.S2 ft(O)s 1208 X(O)s 1246 X(O)s 1284 X(O)s 694 X 6864 Y 1054 X 0.0 10 10 f.B ft(crontab)s 0.0 10 10 f.R ft(\(1\),)s 1553 X 0.0 10 10 f.B ft(httpd)s 0.0 10 10 f.R ft(\(1m\),)s 2031 X 0.0 10 10 f.B ft(perl)s 0.0 10 10 f.R ft(\(1\),)s 2369 X 0.0 10 10 f.B ft(wwwstat)s 0.0 10 10 f.R ft(\(1\))s 694 X 7032 Y 1054 X(More)s 1295 X(info)s 1481 X(and)s 1650 X(the)s 1797 X(latest)s 2033 X(version)s 2352 X(of)s 2460 X(splitlog)s 2786 X(can)s 2949 X(be)s 3068 X(obtained)s 3437 X(from)s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(3)s 7920 Y page 0.0 10 10 f.R ft %%Page: 4 4 694 X 480 Y(splitlog)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4906 X(splitlog)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 1179 X(http://www.ics.uci.edu/pub/websoft/wwwstat/)s 694 X 1080 Y 1204 X(ftp://www.ics.uci.edu/pub/websoft/wwwstat/)s 694 X 1248 Y 1054 X(If)s 1195 X(you)s 1420 X(have)s 1683 X(any)s 1902 X(suggestions,)s 2469 X(bug)s 2694 X(reports,)s 3071 X(\256xes,)s 3360 X(or)s 3517 X(enhancements,)s 4181 X(please)s 4504 X(join)s 4734 X(the)s 4930 X()s 1873 X(mailing)s 2218 X(list)s 2380 X(by)s 2519 X(sending)s 2869 X(e-mail)s 3163 X(with)s 3380 X("subscribe")s 3878 X(in)s 3995 X(the)s 4156 X(subject)s 4478 X(of)s 4600 X(the)s 4760 X(message)s 5136 X(to)s 5252 X(the)s 694 X 1488 Y 1054 X(request)s 1367 X(address)s 1691 X(.)s 3311 X(The)s 3491 X(list)s 3639 X(is)s 3731 X(archived)s 4099 X(at)s 4196 X(the)s 4343 X(above)s 4606 X(address.)s 694 X 1656 Y 874 X 0.0 9 9 f.B ft(More)s 1107 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(About)s 1385 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Perl)s 1583 X 0.0 9 9 f.S2 ft(O)s 1621 X(O)s 1659 X(O)s 694 X 1776 Y 1054 X 0.0 10 10 f.R ft(The)s 1234 X(Perl)s 1420 X(Language)s 1838 X(Home)s 2107 X(Page)s 694 X 1896 Y 1414 X(http://www.perl.com/perl/index.html)s 694 X 2064 Y 1054 X(Johan)s 1312 X(Vromans')s 1736 X(Perl)s 1922 X(Reference)s 2350 X(Guide)s 694 X 2184 Y 1414 X(http://www.xs4all.nl/\304jvromans/perlref.html)s 694 X 2352 Y 0.0 9 9 f.B ft(AUTHOR)s 1112 X 0.0 9 9 f.S2 ft(O)s 1150 X(O)s 1188 X(O)s 1226 X(O)s 1264 X(O)s 694 X 2472 Y 1054 X 0.0 10 10 f.R ft(Roy)s 1268 X(Fielding)s 1648 X(\(\256elding@ics.uci.edu\),)s 2610 X(University)s 3078 X(of)s 3207 X(California,)s 3683 X(Irvine.)s 4017 X(Please)s 4318 X(do)s 4464 X(not)s 4638 X(send)s 4867 X(questions)s 5291 X(or)s 694 X 2592 Y 1054 X(requests)s 1409 X(to)s 1514 X(the)s 1663 X(author,)s 1970 X(since)s 2202 X(the)s 2351 X(number)s 2683 X(of)s 2793 X(requests)s 3147 X(has)s 3307 X(long)s 3512 X(since)s 3744 X(overwhelmed)s 4314 X(his)s 4458 X(ability)s 4741 X(to)s 4846 X(reply,)s 5103 X(and)s 5274 X(all)s 694 X 2712 Y 1054 X(future)s 1317 X(support)s 1642 X(will)s 1823 X(be)s 1942 X(through)s 2278 X(the)s 2425 X(mailing)s 2756 X(list)s 2904 X(\(see)s 3089 X(above\).)s 694 X 2880 Y 1054 X(This)s 1271 X(work)s 1515 X(has)s 1687 X(been)s 1914 X(sponsored)s 2358 X(in)s 2474 X(part)s 2667 X(by)s 2805 X(the)s 2965 X(Defense)s 3329 X(Advanced)s 3771 X(Research)s 4174 X(Projects)s 4534 X(Agency)s 4882 X(under)s 5147 X(Grant)s 694 X 3000 Y 1054 X(Numbers)s 1473 X(MDA972-91-J-1010)s 2346 X(and)s 2542 X(F30602-94-C-0218.)s 3416 X(This)s 3646 X(software)s 4041 X(does)s 4276 X(not)s 4456 X(necessarily)s 4951 X(re\257ect)s 5252 X(the)s 694 X 3120 Y 1054 X(position)s 1402 X(or)s 1510 X(policy)s 1785 X(of)s 1893 X(the)s 2040 X(U.S.)s 2243 X(Government)s 2767 X(and)s 2936 X(no)s 3061 X(o)s /Cff { (f) show xsiz pt 20 div neg 0 rmoveto (f) s } def Cff(icial)s 3369 X(endorsement)s 3904 X(should)s 4196 X(be)s 4315 X(inferred.)s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(4)s 7920 Y page 0.0 10 10 f.R ft %%Trailer %%DocumentFonts: count { pop } repeat % a little cleanup is necessary vmstat restore 80 X(name)s 2326 X(isn't)s 2533 X(desired,)s 2875 X(or)s 2987 X(if)s 3077 X(some)s 3317 X(set)s 3457 X(of)s 3569 Xwwwstat-2.0/splitlog.rc010064400060720000146000000134170623722632300160740ustar00fieldinggrad00002420013033# ========================================================================== # This is a configuration file for splitlog. # # # # Please note that this is a perl include file, and thus may contain # anything that might be found in a perl script. However, it SHOULD ONLY # contain variable assignments which override the default values in splitlog's # &init_defaults procedure (all global variables) and/or definition of the # &user_path_map function for determining the split destination logfile # name from the given virtual host and/or URL path. Most options can also # be overridden on the command-line. # # splitlog allows for one optional config file: # splitlog.rc (usually in the user's home directory) # The name can be changed in the splitlog script or using the -f option. # If no path is supplied, then the file is looked for on the include path # # .:$ENV{'HOME'}:$ENV{'PERLLIB'}: # # All splitlog defaults are listed below, but commented-out. You can change # the associated value by removing the ## comment and changing the assignment. # Use the command "perl -wc splitlog.rc" to test the syntax (ignore typos). # # ========================================================================== # Specify the command for displaying compressed files to STDOUT # ## $Zcat = 'gunzip -c'; # specify as null string if none are available ## $Zhandle = '(gz|Z|z)'; # list file extensions that indicate compressed # # If address in log entry is one word (a local host), append what? # Specify an appropriate '.sub.dom.ain' # ## $AppendToLocalhost = '.no_where.com'; # # Specify the maximum number of open file handles allowed. # You will get "Failed open of ..." errors if it is set too high. # ## $MaxHandles = 50; # # Specify the default location of your access log # ## $DefaultLog = '/usr/local/etc/httpd/logs/access_log'; # # Specify the default destination directory for the split logfiles # ## $DestDir = ''; # current directory # # Specify the filename (no .ext) for non-matching, non-split log entries # ## $Remaining = 'OTHERS'; # # Specify the amount of anonymization done to the split log entries. # May be '','i','m','u','im','iu','mi','mu','ui','um','imu' # '' = none # /i/ = ident field removed # /m/ = machine name replaced with ANON or 0 # /u/ = authentication userid field removed # ## $Anonymize = ''; # # Specify whether (1) or not (0) you want the split filenames to be # based on a prefix (assumed to be a virtual host) of each logfile # entry instead of on the requested URL path. The prefix is terminated # by the first colon ':' or space. # ## $Vhosts = 0; # # Specify whether (1) or not (0) you want to lookup unresolved # IP addresses via DNS. Note that this could be *very* slow! # ## $LookupDNS = 1; ## $DNScachefile = 'dnscache'; # DBM files for persistent cache ## $DNSexpires = 5356800; # Cache for two months (in seconds) # # The rest of these options are normally only changed on the command-line # ## $PrintInvalids = 0; # Display invalid log entries on STDERR? # ## $SearchAddress = ''; # Pattern to look for in hostname/IP addresses ## $SearchCode = ''; # Pattern to look for in Code ## $SearchDate = ''; # Pattern to look for in Date ## $SearchTime = ''; # Pattern to look for in Hour ## $SearchPath = ''; # Pattern to look for in URL Path ## $SearchMethod = ''; # Pattern to look for in Method # ## $NotAddress = ''; # Pattern to reject entry if in IP addresses ## $NotCode = ''; # Pattern to reject entry if in Code ## $NotDate = ''; # Pattern to reject entry if in Date ## $NotTime = ''; # Pattern to reject entry if in Hour ## $NotPath = ''; # Pattern to reject entry if in URL Path ## $NotMethod = ''; # Pattern to reject entry if in Method # ## $EscapeSpecials = '[+.]'; # Most users forget about regexp syntax # # ========================================================================== # ========================================================================== # Uncomment and reprogram the following function to determine the output # logfile name from the vhost prefix (if any) and/or the URL path. # # If left undefined, or if the value returned is undef, then splitlog's # &path_map function will determine the logfile name. # If '' (the empty string) is returned, then the log entry will go to # the default file (see $Remaining). # # The returned value will be forced into lowercase and all special # characters will be replaced by underscores before being used by splitlog. # ## sub user_path_map ## { ## local($vhost, $path) = @_; # Don't change this line ## ## # If logfile prefixing is being used, generally consisting of the ## # virtual host of the incoming request, then $vhost will contain ## # the prefix. However, our example will only concern itself with ## # the URL path, since that is the more common case for which a ## # user-defined function like this one is necessary. ## ## return undef unless (defined($path) && ($path =~ m#^/#)); ## ## # The most typical use of a user-defined routine is to combine ## # multiple root URLs under a single logfile, e.g. ## ## if ($path =~ m#^/pub/(websoft|hyperware|icse97)(/|$)#i) { ## return 'fielding'; ## } ## ## if ($path =~ m#^/(Dept|Research|Maps)(/|$)#i) { ## return 'front_office'; ## } ## ## # or to force disinterested people into the generic OTHERS.log ## ## if ($path =~ m#^/~(fred|wilma|barney)(/|$)#i) { ## return ''; ## } ## ## return undef; # Let the default routine pick the rest ## } ## # ========================================================================== 1; # This must be the last line wwwstat-2.0/wwwerrs.pl010064400060720000146000000160000623743725100157610ustar00fieldinggrad00002420013033#!YOUR_PERL_BINARY # ========================================================================== # Copyright (c) 1996 Regents of the University of California. # # This software has been developed by Roy Fielding as # part of the WebSoft project at the University of California, Irvine. # # See the file LICENSE for licensing and redistribution information. # # This program is provided ONLY as an example. It is not needed to run # wwwstat and is not supported by the author. # sub usage { die <<"EndUsage"; USAGE: wwwerrs [ error_log_name ] This program reads the httpd error_log logfile (or whatever file is given as the single argument) looking for failed requests (bad URLs) which include a valid Referer (and thus can be tracked to the origin of the reference). It assumes that the error_log has been enhanced to include the referer information (as in NCSA 1.4 and later). The output is an HTML file that makes it easy to check references. The script should be edited to discard normal error messages, where normal is dependent on your particular server. EndUsage } if ($#ARGV > 0) { &usage; } # ========================================================================== # Get defaults $Owner = 'Your Name Here <somebody@no_where.com>'; @DoW = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); @MoY = ('Jan','Feb','Mar','Apr','May','Jun', 'Jul','Aug','Sep','Oct','Nov','Dec'); $Updated = &wtime(time,''); # Format it as local time if ($#ARGV == 0) { $ErrorLog = $ARGV[0]; if ($ErrorLog =~ /^-/) { &usage; } } else { $ErrorLog = '/usr/local/etc/httpd/logs/error_log'; # Server's Error Log } %pseen = (); %unseen = (); %cfgseen = (); $UnusualHeader = "Unusual Error Messages"; $ConfigHeader = "Client Denied by Server Configuration"; $PermHeader = "File Permissions Deny Access"; $ExistHeader = "File Does Not Exist"; # ========================================================================== # Start output $| = 1; # set unbuffered print "\n"; print "Collated Error Log Output\n"; print "\n"; print "

Collated Error Log Output

\n"; print "Last updated: $Updated\n"; print "
\n"; # ========================================================================== print "
\n"; print "

$UnusualHeader

\n"; print "
\n";

&process_log;

print "
\n"; # ========================================================================== print "
\n"; print "

$ConfigHeader

\n"; print "
\n";

foreach $pfile ( sort keys %cfgseen )
{
    printf ("%-70s |%s\n", $pfile, $cfgseen{$pfile});
}

print "
\n"; # ========================================================================== print "
\n"; print "

$PermHeader

\n"; print "
\n";

foreach $pfile ( sort keys %pseen )
{
    printf ("%-70s |%s\n", $pfile, $pseen{$pfile});
}

print "
\n"; # ========================================================================== print "
\n"; print "

$ExistHeader

\n"; foreach $pfile ( sort keys %unseen ) { print $pfile, "\n"; print "
    \n"; foreach $ref ( sort split(/>/, $unseen{$pfile}) ) { next if ($ref eq '-'); print "
  • $ref\n"; } print "
\n"; } # ========================================================================== print "
\n"; print "
\n"; print "$Owner\n"; print "
\n"; print "\n"; exit(0); # ========================================================================== # ========================================================================== # Iterate through the logfile sub process_log { local($_, $oldrefs, $ref, $reason, $date, $file, $host); open(LOG, $ErrorLog) || die "$!: Failed to open $ErrorLog, stopped"; LINE: while () { s/^\0+//; # This is due to a bug in perl 5.002 s/\0//g; # because this line should be sufficient s/\&/\&/g; s//\>/g; s/%7E/~/i; study; next if (/ timed out/); # Ignore these common messages next if (/ send aborted for /); next if (/ caught SIGHUP/); next if (/ successful restart/); next if (/ killing CGI/); if (/ httpd: access to /) { ($date, $file, $host, $reason) = /^\[([^\]]*)\] httpd: access to (\S+) failed for ([^, ]+), reason: (.*)/; if (!defined($reason)) { print; next; } if ($reason =~ s/ from (\S+)//) { $ref = $1; } else { $ref = ''; } if ($reason =~ /^(file|script) permissions/) { $pseen{$file} = $host; } elsif ($reason =~ /^(file|script) does not exist/) { if ($oldrefs = $unseen{$file}) { if ($ref && (rindex($oldrefs, $ref) < 0)) { $oldrefs = join('>', $oldrefs, $ref); $unseen{$file} = $oldrefs; } } else { $unseen{$file} = $ref; } } elsif ($reason =~ /^client denied by server config/) { $cfgseen{$file} = $host; } else { print; } } else { print; } # This is for unknown/unusual messages } close(LOG); } # --------------------------------------------------------------------------- # The following routine is from the wwwdates.pl package of the # libwww-perl library . # =========================================================================== # wtime() is a modified version of Perl 4.036's ctime.pl # library by Waldemar Kebsch and # Marion Hakanson . # # wtime returns a time string in the format "Wkd, Dy Mon Year HH:MM:SS Zone" # with no newline appended. # # USAGE: # # &wtime(time,''); -- returns the local time with no timezone appended # As in "Wed, 15 Dec 1993 23:59:59 " # # &wtime(time,'GMT'); -- returns GMT time # As in "Thu, 16 Dec 1993 07:59:59 GMT" # sub wtime { local($time, $tz) = @_; local($[) = 0; local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); # Use local time if tz is anything other than 'GMT' ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = ($tz eq 'GMT') ? gmtime($time) : localtime($time); $year += 1900; sprintf("%s, %02d %s %04d %02d:%02d:%02d %s", $DoW[$wday], $mday, $MoY[$mon], $year, $hour, $min, $sec, $tz); } 1; wwwstat-2.0/wwwstat.1010064400060720000146000000645500623726126100155170ustar00fieldinggrad00002420013033.\" Copyright (c) 1994, 1996 Regents of the University of California. .\" All rights reserved. The file LICENSE (the Artistic License) .\" specifies the terms and conditions for redistribution. .\" .if n .tr \-- .if n .tr \(buo .if n .tr \(em- .TH wwwstat 1 "03 November 1996" .if n .ad l .SH NAME wwwstat \- summarize WWW server (httpd) access statistics .SH SYNOPSIS .HP 8 .B wwwstat .RB [ \-F .IR system_config ] .RB [ \-f .IR user_config ] .RI [ options ...] .RB [ -- ] .RI "[ " summary " | " logfile " | " .BR + " | " \- " ]..." .SH DESCRIPTION .nh .B wwwstat reads a sequence of .B httpd common logfile format (CLF) access_log files and/or prior .B wwwstat output summary files and/or the standard input and outputs a summary of the access statistics in HTML. .LP Since .B wwwstat 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. .LP .B wwwstat provides World Wide Web (WWW) access statistics, which does not necessarily correspond to statistics on individual users. It counts the number of .B HTTP 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. .LP .B wwwstat output summaries can be read by .B gwstat to produce fancy graphs of the summarized statistics. The .B splitlog program can be used to split a large logfile into separate files by entry prefix or URL path. .LP .B wwwstat is a .B perl script, which means you need to have a .B perl interpreter to run the program. It has been tested with .B perl versions 4.036 and 5.002. .SS Output Sections .BR wwwstat '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 common logfile format (see .BR NOTES ). These include: .TP 20 Request Date e.g., "Feb 2 1996" .TP Request Hour e.g., "00" through "23" .TP Client Domain The Fully-Qualified Domain Name (FQDN) suffix that corresponds to an organization type or country name. .TP Reversed Subdomain The FQDN, usually minus the first (machine name) component, and reversed so that it is easier to read when sorted. .TP URL/Archive Grouping based on Request-URI or non-success status code. .TP Identity The user identity based on IdentityCheck token or Authorization field. .LP Each section can be enabled/disabled using the configuration files or command-line options (see .BR "Section Display Options" ). .SS Output Table Format Inside each section, the statistics are presented as a preformatted table. .LP .ft C %Reqs %Byte Bytes Sent Requests\0\0 .I category-type .br .ft C ----- ----- ------------ -------- |--------------- .br NN.NN NN.NN NNNNNNNNNNNN NNNNNNNN | .I category-value .br .ft C 100.0 100.0 NNNNNNNNNNNN NNNNNNNN | .I category-value .LP .PD 0 .TP 12 Requests Requests received for this category-value. .TP Bytes Sent Bytes transmitted for this category-value. .TP %Reqs (/)*100. .TP %Byte (/)*100. .PD .LP The table can be sorted by category-value .RB ( "\-sort key" ), number of requests received .RB ( "\-sort req" ), or number of bytes received .RB ( "\-sort byte" ). It can also be limited to the .BI "\-top" " N" entries. .SH OPTIONS .SS Configuration Options These options define how .B wwwstat should establish defaults and interpret the command-line. .TP .BI \-F " filename" Get system configuration defaults from the given file. If used, this .B must be the first argument on the command-line, since it needs to be interpreted before the other command options. The file .B wwwstat.rc is included with the distribution as an example of this file; it contains .B perl source code which directly sets the control and display options provided by .BR wwwstat . If .I filename is not a pathname, the include path (see .BR FILES ) is searched for .IR filename . An empty string as .I filename will disable this feature. .RB [ \-F "wwwstat.rc"] .TP .BI \-f " filename" Get user configuration defaults from the given file. If used, this .B must be the first argument on the command-line after .B \-F (if any). The file is the same format as for the .B \-F option (see .BR wwwstat.rc ). If .I filename is not a pathname, the include path (see .BR FILES ) is searched for .IR filename . An empty string as .I filename will disable this feature. .RB [ \-f ".wwwstatrc"] .TP .B -- Last option (the remaining arguments are treated as input files). .SS Diagnostic Options These options provide information about .B wwwstat usage or about some unusual aspects of the logfile(s) being processed. .TP .B \-h Help \(em display usage information to STDERR and then exit. .TP .B \-v Verbose display to STDERR of each log entry processed. .TP .B \-x Display to STDERR all requests resulting in HTTP error responses. .TP .B \-e 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 with this option on a regular basis. .SS Display Options These options modify the output format. .TP .BI \-H " string" Use the given string as the HTML title and heading for output. .TP .BI \-X " string" Use the given string as the cross-reference URL to the last summary output. Any occurrence of the characters "%M" or "%Y" 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. .TP .B \-R Display the daily stats table sorted in reverse. This option is primarily for use with the .B gwstat program for producing graphs of the output. .LP .PD 0 .B \-l .TP .B \-L .PD Do .RB ( \-l ) or don't .RB ( \-L ) 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 .RB [ \-L ] is to strip the machine name from local addresses. .LP .PD 0 .B \-o .TP .B \-O .PD Do .RB ( \-o ) or don't .RB ( \-O ) display the full DNS hostname of clients outside your local domain in the section on subdomain statistics. The default .RB [ \-O ] is to strip the machine name from outside addresses. .LP .PD 0 .B \-u .TP .B \-U .PD Do .RB ( \-u ) or don't .RB ( \-U ) display the IP address of clients with unresolved domain names in the section on subdomain statistics. The .B \-dns 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 .RB [ \-U ] is to group all such addresses under the category "Unresolved". .LP .PD 0 .B \-dns .TP .B \-nodns .PD Do .RB ( \-dns ) or don't .RB ( \-nodns ) 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 slow, particularly when the results are negative (no DNS name), which is why a caching capability is included as well. .RB [ \-nodns ] .TP .BI \-cache " filename" 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 is the empty string, which may be needed if your system does not support DBM or NDBM functionality. Running .B \-dns without a persistent cache is not recommended. .RB [ "\-cache" "dnscache"] .TP .BI \-trunc " N" Truncate the URLs listed in the archive section after the .I Nth hierarchy level. This option is commonly used to reduce the output size and memory requirements of .B wwwstat by grouping the requests by directory tree instead of listing every URL. The default .RB [ "\-trunc 0" ] is to display every requested URL. .LP .PD 0 .B \-files .TP .B \-nofiles .PD Do .RB ( \-files ) or don't .RB ( \-nofiles ) 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 by grouping the requests by directory instead of listing every URL. The default .RB [ \-files ] is to display the entire requested URL. .LP .PD 0 .B \-link .TP .B \-nolink .PD Do .RB ( \-link ) or don't .RB ( \-nolink ) 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). .RB [ \-nolink ] .LP .PD 0 .B \-cgi .TP .B \-nocgi .PD Do .RB ( \-cgi ) or don't .RB ( \-nocgi ) prefix the summary output with CGI header fields appropriate for use with the HTTP common gateway interface. Using .B wwwstat as a CGI script is not recommended \(em it is usually better to simply run the wwwstat program periodically and serve the static output file. .RB [ \-nocgi ] .SS Section Display Options 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. .LP .PD 0 .B \-all .TP .B \-noall .PD Include .RB ( \-all ) or exclude .RB ( \-noall ) all of the display sections. The .B \-noall option is commonly used just prior to one or more of the other section options, such that only the listed sections are displayed. .LP .PD 0 .B \-daily .TP .B \-nodaily .PD Include .RB ( \-daily ) or exclude .RB ( \-nodaily ) the section of statistics by request date and set the scope for later .BR \-sort " and " \-top options to this section. .LP .PD 0 .B \-hourly .TP .B \-nohourly .PD Include .RB ( \-hourly ) or exclude .RB ( \-nohourly ) the section of statistics by request hour and set the scope for later .BR \-sort " and " \-top options to this section. .LP .PD 0 .B \-domain .TP .B \-nodomain .PD Include .RB ( \-domain ) or exclude .RB ( \-nodomain ) the section of statistics by the client's Internet domain and set the scope for later .BR \-sort " and " \-top options to this section. .LP .PD 0 .B \-subdomain .TP .B \-nosubdomain .PD Include .RB ( \-subdomain ) or exclude .RB ( \-nosubdomain ) the section of statistics by the client's Internet subdomain (reversed for display) and set the scope for later .BR \-sort " and " \-top options to this section. .LP .PD 0 .B \-archive .TP .B \-noarchive .PD Include .RB ( \-archive ) or exclude .RB ( \-noarchive ) the section of statistics by requested URL/archive and set the scope for later .BR \-sort " and " \-top options to this section. .LP .PD 0 .B \-r .LP .B \-ident .TP .B \-noident .PD Include .RB ( \-r " or " \-ident ) or exclude .RB ( \-noident ) 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 .BR \-sort " and " \-top options to this section. .B DO NOT PUBLISH this information, as that would reveal security-related identities and be a violation of privacy. This option is provided for administrative purposes only. .TP .BR \-sort " (" "key|byte|req" ) Sort this section by its primary key, the number of bytes transmitted, or the number of requests received. .RB [ "\-sort key" ] .TP .BI \-top " N" Display only the top N entries for this section. This option assumes that the .B \-sort option has been set to either bytes or requests. .TP .B \-both Display both the top N entries for this section [10, sorted by requests], and then the full section (all entries) sorted by key. .SS Search Options These options are used to limit the analysis to requests matching a pattern. The pattern is supplied in the form of a .BR "perl regular expression" , except that the characters "+" and "." are escaped automatically unless the .B \-noescape option is given. Enclose the pattern in single-quotes to prevent the command shell from interpreting some special characters. .LP 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. .LP .PD 0 .BI \-a " regexp" .TP .BI \-A " regexp" .PD Include .RB ( \-a ) or exclude .RB ( \-A ) all requests containing a hostname/IP address matching the given perl regular expression. .LP .PD 0 .BI \-c " regexp" .TP .BI \-C " regexp" .PD Include .RB ( \-c ) or exclude .RB ( \-C ) all requests resulting in an .B HTTP status code matching the given perl regular expression. .LP .PD 0 .BI \-d " regexp" .TP .BI \-D " regexp" .PD Include .RB ( \-d ) or exclude .RB ( \-D ) all requests occurring on a date (e.g., "Feb 2 1994") matching the given perl regular expression. .LP .PD 0 .BI \-t " regexp" .TP .BI \-T " regexp" .PD Include .RB ( \-t ) or exclude .RB ( \-T ) all requests occurring during the hour (e.g., "23" is 11pm \- 12pm) matching the given perl regular expression. .LP .PD 0 .BI \-m " regexp" .TP .BI \-M " regexp" .PD Include .RB ( \-m ) or exclude .RB ( \-M ) all requests using an HTTP method (e.g., "HEAD") matching the given perl regular expression. .LP .PD 0 .BI \-n " regexp" .TP .BI \-N " regexp" .PD Include .RB ( \-n ) or exclude .RB ( \-N ) all requests on a URL (archive name) matching the given perl regular expression. .TP .B \-noescape Do not escape the special characters ("+" and ".") in the remaining search options. .SH INPUT 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 .RB [ + ]. .TP .B \- Read from standard input (STDIN). .TP .B + Read the default logfile. [as configured] .TP .IR filename ... Read the given file and determine from the first line whether it is a previous output summary or a CLF logfile. If the .IR filename 's extension indicates that is is compressed (gz|z|Z), then pipe it through the configured decompression program .RB [ "gunzip \-c" ] 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. .SH USAGE .B wwwstat is used for many purposes: .TP \(bu as a diagnostic utility for measuring server activity, finding incorrect URL references, and detecting attempted misuse of the server; .TP \(bu as a public relations tool for measuring technology or information transfer (i.e., Is the message getting out? To the right people?); .TP \(bu as an archival tool for tracking web usage over time without storing the entire logfile; and, .TP \(bu 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. .LP In most cases, .B wwwstat is run on a periodic basis (nightly, weekly, and/or monthly) by a wrapper program as a .B crontab 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). .LP .B wwwstat can be run as a CGI script .RB ( \-cgi ), but that is not recommended unless the input logfile is very small. .LP 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 .BR wwwstat.rc ). These files are actually .B perl 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. .SS Perl Regular Expressions 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 option). Most people only need to know the following special characters: .LP .PD 0 .TP 8 .B ^ at start of pattern, means "starts with pattern". .TP .B $ at end of pattern, means "ends with pattern". .TP .B (...) groups pattern elements as a single element. .TP .B ? matches preceding element zero or one times. .TP .B * matches preceding element zero or more times. .TP .B + matches preceding element one or more times. .TP .B . matches any single character. .TP .B [...] denotes a class of characters to match. [^...] negates the class. Inside a class, '-' indicates a range of characters. .TP .B (A|B|C) matches if A or B or C matches. .PD .LP 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. .SH EXAMPLES .TP Summarize requests from commercial domains. .B wwwstat \-a '.com$' .TP Summarize requests from the host kiwi.ics.uci.edu .B wwwstat \-a '^kiwi.ics.uci.edu$' .TP Summarize requests not from kiwi.ics.uci.edu .B wwwstat \-A '^kiwi.ics.uci.edu$' .TP Summarize requests resulting in temporary redirects .B wwwstat \-c '302' .TP Summarize requests resulting in server errors .B wwwstat \-c '^5' .TP Summarize unsuccessful requests .B wwwstat \-C '^2' \-C '304' .TP Summarize requests in first week of the month .B wwwstat \-d ' [1-7] ' .TP Summarize requests in second week of the month .B wwwstat \-d ' ([89]|1[0-4]) ' .TP Summarize requests in third week of the month .B wwwstat \-d ' (1[5-9]|2[01]) ' .TP Summarize requests in fourth week of the month .B wwwstat \-d ' 2[2-8] ' .TP Summarize requests in leftover days of the month .B wwwstat \-d ' (29|30|31) ' .TP Summarize requests in February .B wwwstat \-d 'Feb' .TP Summarize requests in year 1994 .B wwwstat \-d '1994' .TP Summarize requests not in April .B wwwstat \-D 'Apr' .TP Summarize requests between midnight and 1am .B wwwstat \-t '00' .TP Summarize requests not received between noon and 1pm .B wwwstat \-T '12' .TP Summarize requests with a gif extension .B wwwstat \-n '.gif$' .TP Summarize requests under user's URL .B wwwstat \-n '^/~user/' .TP Summarize requests not under "hidden" paths .B wwwstat \-N '/hidden/' .SH ENVIRONMENT .TP 12 .B HOME Location of user's home directory, placed on INC path. .TP .B LOGDIR Used instead of HOME if latter is undefined. .TP .B PERLLIB A colon-separated list of directories in which to look for include and configuration files. .SH FILES Unless a pathname is supplied, the configuration files are obtained from the current directory, the user's home directory .RB ( HOME " or " LOGDIR ), the standard library path .RB ( PERLLIB ), and the directory indicated by the command pathname (in that order). .TP 15 .B .wwwstatrc User configuration file. .TP .B wwwstat.rc System configuration file. .TP .B domains.pl Mapping of Internet domain to country or organization. .LP .PD 0 .B dnscache.dir .TP 15 .B dnscache.pag .PD DBM files for persistent DNS cache. .SH SEE ALSO .BR crontab (1), .BR gwstat (1), .BR httpd (1m), .BR perl (1), .BR splitlog (1) .LP More info and the latest version of wwwstat can be obtained from .LP http://www.ics.uci.edu/pub/websoft/wwwstat/ ftp://www.ics.uci.edu/pub/websoft/wwwstat/ .LP If you have any suggestions, bug reports, fixes, or enhancements, please join the mailing list by sending e-mail with "subscribe" in the subject of the message to the request address . The list is archived at the above address. .SS More About HTTP .TP HTTP/1.1 Proposed Standard R. Fielding, J. Gettys, J. C. Mogul, H. Frystyk, and T. Berners-Lee. "Hypertext Transfer Protocol -- HTTP/1.1", U.C. Irvine, DEC, MIT/LCS, August 1996. .br http://www.ics.uci.edu/pub/ietf/http/ .LP .SS More About Perl .TP The Perl Language Home Page http://www.perl.com/perl/index.html .TP Johan Vromans' Perl Reference Guide http://www.xs4all.nl/~jvromans/perlref.html .SH DIAGNOSTICS See also the .B Diagnostic Options above. .TP "[none] to [none]" dates .B wwwstat 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 option to show invalid data. .TP 100% unresolved 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 option to have .B wwwstat perform the hostname lookups. If 100% of the hosts are still unresolved with the .B \-dns 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. .SH NOTES .SS Hits vs Requests vs Visitors .B wwwstat counts HTTP requests received by the server. When a request is successful, it is often referred to as a "hit". 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. .LP In all sections except the archive section, .B wwwstat 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 is used with the search options .BR \-n ", " \-c ", and " \-C "," since those options are normally used for finding error conditions. .LP .B wwwstat does not count "visitors" -- 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. .LP With the exception of the ident section, .B wwwstat does not reveal information about the individual people making requests. Unless the output is limited to a specific URL or a specific hostname, .BR wwwstat 's output does not connect the requester to the URL being requested. .SS Common Logfile Format 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: .LP remote_host ident authuser [date-time zone] "Request-Line" Status-Code bytes .LP .PD 0 .TP 15 where means .TP ------------ -------------------------------------- .TP remote_host Client DNS hostname or IP address .TP ident Identity check token or "\-" .TP authuser Authorization user-id or "\-" .TP date-time dd/Mmm/yyyy:hh:mm:ss .TP zone +dddd or \-dddd .TP Request-Line The first line of the HTTP request, which normally includes the method, URL, and HTTP-version. .TP Status-Code Response status from server or "\-" .TP bytes Size of Entity-Body transmitted or "\-" .TP ------------ -------------------------------------- .PD .LP 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). .SH LIMITATIONS .B wwwstat cannot be more accurate than its input. .LP The common logfile format does not include the amount of bytes transferred in HTTP header fields and in error responses. .B wwwstat 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. .LP 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 is able to read logfiles which append information to the CLF, it will not make use of that additional information. However, .B wwwstat is written in .BR perl , so if you want to parse a different format all you have to do is change the parsing code. .LP .B wwwstat 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 .BR perl . .SH AUTHOR 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 mailing list (see above). .LP .B wwwstat was originally based on a multi-server statistics program called .B fwgstat-0.035 by Jonathan Magid (jem@sunsite.unc.edu) which, in turn, was heavily based on .B xferstats (packaged with the version 17 of the Wuarchive FTP daemon) by Chris Myers (chris@wugate.wustl.edu). .LP 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. e exception that the \-a, \-A, \-n and \-N options treat '+' and '.' characters as normal alphabetic characters unless they are preceded by the .B \-noewwwstat-2.0/wwwstat.html010064400060720000146000000713560623726126200163260ustar00fieldinggrad00002420013033 wwwstat manual

wwwstat manual

NAME

wwwstat - summarize WWW server (httpd) access statistics

SYNOPSIS

wwwstat [-F system_config] [-f user_config] [options...] [--] [ summary | logfile | + | - ]...

DESCRIPTION

wwwstat reads a sequence of httpd common logfile format (CLF) access_log files and/or prior wwwstat output summary files and/or the standard input and outputs a summary of the access statistics in HTML.

Since wwwstat 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.

wwwstat provides World Wide Web (WWW) access statistics, which does not necessarily correspond to statistics on individual users. It counts the number of HTTP 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.

wwwstat output summaries can be read by gwstat to produce fancy graphs of the summarized statistics. The splitlog program can be used to split a large logfile into separate files by entry prefix or URL path.

wwwstat is a perl script, which means you need to have a perl interpreter to run the program. It has been tested with perl versions 4.036 and 5.002.

Output Sections

wwwstat'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 common logfile format. These include:
Request Date e.g., "Feb 2 1996"
Request Hour e.g., "00" through "23"
Client Domain The Fully-Qualified Domain Name (FQDN) suffix that corresponds to an organization type or country name.
Reversed Subdomain The FQDN, usually minus the first (machine name) component, and reversed so that it is easier to read when sorted.
URL/Archive Grouping based on Request-URI or non-success status code.
Identity The user identity based on IdentityCheck token or Authorization field.

Each section can be enabled/disabled using the configuration files or command-line options (see Section Display Options).

Output Table Format

Inside each section, the statistics are presented as a preformatted table.

%Reqs %Byte Bytes Sent Requests category-type
----- ----- ------------ -------- |---------------
NN.NN NN.NN NNNNNNNNNNNN NNNNNNNN |
category-value
100.0 100.0 NNNNNNNNNNNN NNNNNNNN | category-value

Requests Requests received for this category-value.
Bytes Sent Bytes transmitted for this category-value.
%Reqs (<Requests>/<Total Requests>)*100.
%Byte (<Bytes Sent>/<Total Bytes>)*100.

The table can be sorted by category-value (-sort key), number of requests received (-sort req), or number of bytes received (-sort byte). It can also be limited to the -top N entries.

OPTIONS

Configuration Options

These options define how wwwstat should establish defaults and interpret the command-line.
-F filename
Get system configuration defaults from the given file. If used, this must be the first argument on the command-line, since it needs to be interpreted before the other command options. The file wwwstat.rc is included with the distribution as an example of this file; it contains perl source code which directly sets the control and display options provided by wwwstat. If filename is not a pathname, the include path (see FILES) is searched for filename. An empty string as filename will disable this feature. [-F "wwwstat.rc"]
-f filename
Get user configuration defaults from the given file. If used, this must be the first argument on the command-line after -F (if any). The file is the same format as for the -F option (see wwwstat.rc). If filename is not a pathname, the include path (see FILES) is searched for filename. An empty string as filename will disable this feature. [-f ".wwwstatrc"]
--
Last option (the remaining arguments are treated as input files).

Diagnostic Options

These options provide information about wwwstat usage or about some unusual aspects of the logfile(s) being processed.
-h
Help - display usage information to STDERR and then exit.
-v
Verbose display to STDERR of each log entry processed.
-x
Display to STDERR all requests resulting in HTTP error responses.
-e
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 wwwstat with this option on a regular basis.

Display Options

These options modify the output format.
-H string
Use the given string as the HTML title and heading for output.
-X string
Use the given string as the cross-reference URL to the last summary output. Any occurrence of the characters "%M" or "%Y" 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.
-R
Display the daily stats table sorted in reverse. This option is primarily for use with the gwstat program for producing graphs of the output.
-l
-L
Do (-l) or don't (-L) 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 [-L] is to strip the machine name from local addresses.
-o
-O
Do (-o) or don't (-O) display the full DNS hostname of clients outside your local domain in the section on subdomain statistics. The default [-O] is to strip the machine name from outside addresses.
-u
-U
Do (-u) or don't (-U) display the IP address of clients with unresolved domain names in the section on subdomain statistics. The -dns 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 [-U] is to group all such addresses under the category "Unresolved".
-dns
-nodns
Do (-dns) or don't (-nodns) 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 very slow, particularly when the results are negative (no DNS name), which is why a caching capability is included as well. [-nodns]
-cache filename
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 filename is the empty string, which may be needed if your system does not support DBM or NDBM functionality. Running -dns without a persistent cache is not recommended. [-cache "dnscache"]
-trunc N
Truncate the URLs listed in the archive section after the Nth hierarchy level. This option is commonly used to reduce the output size and memory requirements of wwwstat by grouping the requests by directory tree instead of listing every URL. The default [-trunc 0] is to display every requested URL.
-files
-nofiles
Do (-files) or don't (-nofiles) 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 wwwstat by grouping the requests by directory instead of listing every URL. The default [-files] is to display the entire requested URL.
-link
-nolink
Do (-link) or don't (-nolink) 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). [-nolink]
-cgi
-nocgi
Do (-cgi) or don't (-nocgi) prefix the summary output with CGI header fields appropriate for use with the HTTP common gateway interface. Using wwwstat as a CGI script is not recommended - it is usually better to simply run the wwwstat program periodically and serve the static output file. [-nocgi]

Section Display Options

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.
-all
-noall
Include (-all) or exclude (-noall) all of the display sections. The -noall option is commonly used just prior to one or more of the other section options, such that only the listed sections are displayed.
-daily
-nodaily
Include (-daily) or exclude (-nodaily) the section of statistics by request date and set the scope for later -sort and -top options to this section.
-hourly
-nohourly
Include (-hourly) or exclude (-nohourly) the section of statistics by request hour and set the scope for later -sort and -top options to this section.
-domain
-nodomain
Include (-domain) or exclude (-nodomain) the section of statistics by the client's Internet domain and set the scope for later -sort and -top options to this section.
-subdomain
-nosubdomain
Include (-subdomain) or exclude (-nosubdomain) the section of statistics by the client's Internet subdomain (reversed for display) and set the scope for later -sort and -top options to this section.
-archive
-noarchive
Include (-archive) or exclude (-noarchive) the section of statistics by requested URL/archive and set the scope for later -sort and -top options to this section.
-r
-ident
-noident
Include (-r or -ident) or exclude (-noident) 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 -sort and -top options to this section. DO NOT PUBLISH this information, as that would reveal security-related identities and be a violation of privacy. This option is provided for administrative purposes only.
-sort (key|byte|req)
Sort this section by its primary key, the number of bytes transmitted, or the number of requests received. [-sort key]
-top N
Display only the top N entries for this section. This option assumes that the -sort option has been set to either bytes or requests.
-both
Display both the top N entries for this section [10, sorted by requests], and then the full section (all entries) sorted by key.

Search Options

These options are used to limit the analysis to requests matching a pattern. The pattern is supplied in the form of a perl regular expression, except that the characters "+" and "." are escaped automatically unless the -noescape option is given. Enclose the pattern in single-quotes to prevent the command shell from interpreting some special characters.

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.

-a regexp
-A regexp
Include (-a) or exclude (-A) all requests containing a hostname/IP address matching the given perl regular expression.
-c regexp
-C regexp
Include (-c) or exclude (-C) all requests resulting in an HTTP status code matching the given perl regular expression.
-d regexp
-D regexp
Include (-d) or exclude (-D) all requests occurring on a date (e.g., "Feb 2 1994") matching the given perl regular expression.
-t regexp
-T regexp
Include (-t) or exclude (-T) all requests occurring during the hour (e.g., "23" is 11pm - 12pm) matching the given perl regular expression.
-m regexp
-M regexp
Include (-m) or exclude (-M) all requests using an HTTP method (e.g., "HEAD") matching the given perl regular expression.
-n regexp
-N regexp
Include (-n) or exclude (-N) all requests on a URL (archive name) matching the given perl regular expression.
-noescape
Do not escape the special characters ("+" and ".") in the remaining search options.

INPUT

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 [+].
-
Read from standard input (STDIN).
+
Read the default logfile. [as configured]
filename...
Read the given file and determine from the first line whether it is a previous output summary or a CLF logfile. If the filename's extension indicates that is is compressed (gz|z|Z), then pipe it through the configured decompression program [gunzip -c] 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.

USAGE

wwwstat is used for many purposes:
  • as a diagnostic utility for measuring server activity, finding incorrect URL references, and detecting attempted misuse of the server;
  • as a public relations tool for measuring technology or information transfer (i.e., Is the message getting out? To the right people?);
  • as an archival tool for tracking web usage over time without storing the entire logfile; and,
  • 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.

In most cases, wwwstat is run on a periodic basis (nightly, weekly, and/or monthly) by a wrapper program as a crontab 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).

wwwstat can be run as a CGI script (-cgi), but that is not recommended unless the input logfile is very small.

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 wwwstat.rc). These files are actually perl 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.

Perl Regular Expressions

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 -noescape option). Most people only need to know the following special characters:

^
at start of pattern, means "starts with pattern".
$
at end of pattern, means "ends with pattern".
(...)
groups pattern elements as a single element.
?
matches preceding element zero or one times.
*
matches preceding element zero or more times.
+
matches preceding element one or more times.
.
matches any single character.
[...]
denotes a class of characters to match. [^...] negates the class. Inside a class, '-' indicates a range of characters.
(A|B|C)
matches if A or B or C matches.

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.

EXAMPLES

Summarize requests from commercial domains.
wwwstat -a '.com$'
Summarize requests from the host kiwi.ics.uci.edu
wwwstat -a '^kiwi.ics.uci.edu$'
Summarize requests not from kiwi.ics.uci.edu
wwwstat -A '^kiwi.ics.uci.edu$'
Summarize requests resulting in temporary redirects
wwwstat -c '302'
Summarize requests resulting in server errors
wwwstat -c '^5'
Summarize unsuccessful requests
wwwstat -C '^2' -C '304'
Summarize requests in first week of the month
wwwstat -d ' [1-7] '
Summarize requests in second week of the month
wwwstat -d ' ([89]|1[0-4]) '
Summarize requests in third week of the month
wwwstat -d ' (1[5-9]|2[01]) '
Summarize requests in fourth week of the month
wwwstat -d ' 2[2-8] '
Summarize requests in leftover days of the month
wwwstat -d ' (29|30|31) '
Summarize requests in February
wwwstat -d 'Feb'
Summarize requests in year 1994
wwwstat -d '1994'
Summarize requests not in April
wwwstat -D 'Apr'
Summarize requests between midnight and 1am
wwwstat -t '00'
Summarize requests not received between noon and 1pm
wwwstat -T '12'
Summarize requests with a gif extension
wwwstat -n '.gif$'
Summarize requests under user's URL
wwwstat -n '^/~user/'
Summarize requests not under "hidden" paths
wwwstat -N '/hidden/'

ENVIRONMENT

HOME
Location of user's home directory, placed on INC path.
LOGDIR
Used instead of HOME if latter is undefined.
PERLLIB
A colon-separated list of directories in which to look for include and configuration files.

FILES

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).
.wwwstatrc
User configuration file.
wwwstat.rc
System configuration file.
domains.pl
Mapping of Internet domain to country or organization.
dnscache.dir
dnscache.pag
DBM files for persistent DNS cache.

SEE ALSO

crontab(1), gwstat(1), httpd(1m), perl(1), splitlog(1)
More info and the latest version of wwwstat can be obtained from
http://www.ics.uci.edu/pub/websoft/wwwstat/
ftp://www.ics.uci.edu/pub/websoft/wwwstat/
If you have any suggestions, bug reports, fixes, or enhancements, please join the <wwwstat-users@ics.uci.edu> mailing list by sending e-mail with "subscribe" in the subject of the message to the request address <wwwstat-users-request@ics.uci.edu>. The list is archived at the above address.

More About HTTP

HTTP/1.1 Proposed Standard
R. Fielding, J. Gettys, J. C. Mogul, H. Frystyk, and T. Berners-Lee. "Hypertext Transfer Protocol -- HTTP/1.1", U.C. Irvine, DEC, MIT/LCS, August 1996.
http://www.ics.uci.edu/pub/ietf/http/

More About Perl

The Perl Language Home Page
http://www.perl.com/perl/index.html
Johan Vromans' Perl Reference Guide
http://www.xs4all.nl/~jvromans/perlref.html

DIAGNOSTICS

See also the Diagnostic Options above.
"[none] to [none]" dates
wwwstat 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 -e option to show invalid data.
100% unresolved
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 -dns option to have wwwstat perform the hostname lookups. If 100% of the hosts are still unresolved with the -dns 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.

NOTES

Hits vs Requests vs Visitors

wwwstat counts HTTP requests received by the server. When a request is successful, it is often referred to as a "hit". 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.

In all sections except the archive section, wwwstat 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 wwwstat is used with the search options -n, -c, and -C, since those options are normally used for finding error conditions.

wwwstat does not count "visitors" -- 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.

With the exception of the ident section, wwwstat does not reveal information about the individual people making requests. Unless the output is limited to a specific URL or a specific hostname, wwwstat's output does not connect the requester to the URL being requested.

Common Logfile Format

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:

remote_host ident authuser [date-time zone] "Request-Line" Status-Code bytes

where means
remote_host Client DNS hostname or IP address
ident Identity check token or "-"
authuser Authorization user-id or "-"
date-time dd/Mmm/yyyy:hh:mm:ss
zone +dddd or -dddd
Request-Line The first line of the HTTP request, which normally includes the method, URL, and HTTP-version.
Status-Code Response status from server or "-"
bytes Size of Entity-Body transmitted or "-"

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).

LIMITATIONS

wwwstat cannot be more accurate than its input.

The common logfile format does not include the amount of bytes transferred in HTTP header fields and in error responses. wwwstat 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.

Modern httpd servers have extended the CLF to include additional fields (Referer and User-Agent) or to make the entire format configurable. Although wwwstat is able to read logfiles which append information to the CLF, it will not make use of that additional information. However, wwwstat is written in perl, so if you want to parse a different format all you have to do is change the parsing code.

wwwstat 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 perl.

AUTHOR

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 mailing list.

wwwstat was originally based on a multi-server statistics program called fwgstat-0.035 by Jonathan Magid (jem@sunsite.unc.edu) which, in turn, was heavily based on xferstats (packaged with the version 17 of the Wuarchive FTP daemon) by Chris Myers (chris@wugate.wustl.edu).

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.

iwi.ics.uci.edu
wwwstat -A '^kiwi.ics.uci.edu$'
Summarize requests resulting in temporary redirects
wwwstat -c '302'
Summarize requests resulting in server errors
wwwstat -c '^5'
Summarize unsuccessful requests
wwwstat -C wwwstat-2.0/wwwstat.pl010064400060720000146000002120200623743725200157620ustar00fieldinggrad00002420013033#!YOUR_PERL_BINARY # ========================================================================== $Version = 'wwwstat-2.0'; # # Copyright (c) 1994, 1996 Regents of the University of California. # # This software has been developed by Roy Fielding as # part of the WebSoft project at the University of California, Irvine. # # See the file LICENSE for licensing and redistribution information. # See the file INSTALL for installation information. # See the file Changes for known problems and version information. # See the file README for more information. # See the wwwstat.1 man page for options and usage information. # sub usage { die <<"EndUsage"; usage: $Pname [-F system_config] [-f user_config] [-helLoOuUrRvx] [-a IP_address] [-c code] [-d date] [-t hour] [-n archive_name] [-A IP_address] [-C code] [-D date] [-T hour] [-N archive_name] [-m method] [-M method] [-H heading_title] [-X lastsummary] [-noescape] [-trunc N] [-files] [-nofiles] [-link] [-nolink] [-cgi] [-nocgi] [-dns] [-nodns] [-cache filename] [-daily] [-hourly] [-domain] [-subdomain] [-archive] [-ident] [-all] [-sort (key|byte|req)] [-top N] [-both] [-no (daily|hourly|domain|subdomain|archive|ident|all)] [--] [ logfile | summary | + | - ]... $Version Process a sequence of httpd Common Logfile Format access_log files and/or prior wwwstat output summary files (compressed if extension $Zhandle) and output an HTML summary of all the input. Configuration options: -F Get system configuration defaults from the given file. -f Get user configuration defaults from the given file. -- Last option (all later arguments are treated as filenames). Diagnostic Options: -h Help -- just display this message to STDERR and quit. -v Verbose display to STDERR of each log entry processed. -x Display to STDERR all requests of nonexistant URLs. -e Display to STDERR all invalid log entries. Display Options: -H Use the following string as the heading and title for output. -X Use the following string as the URL for last summary link. -R Display daily stats sorted in reverse. -l Do display full IP address of clients in my domain. -L Don't (i.e. strip the machine name from local addresses). -o Do display full IP address of clients from other domains. -O Don't (i.e. strip the machine name from non-local addresses). -u Do display IP address from unresolved domain names. -U Don't (i.e. group all "unresolved" addresses under that name). -dns Use DNS to lookup unresolved IP addresses (may be slow). -nodns Do not lookup unresolved IP addresses. -cache Use the given dbm file to read/write DNS cache. -trunc Truncate archive URL after Nth hierarchy level. -files Show filename in archive URL. -nofiles Truncate filename (if any) from archive URL. -link Add a hypertext link around each archive URL. -nolink Do not add a hypertext link around each archive URL. -cgi Check HTTP method and output like a CGI script. -nocgi Do not produce CGI output. Section Options,
=(all|daily|hourly|domain|subdomain|archive|ident): -no
Exclude the given section from the output. -
Include the given section and set scope for -sort and -top. -sort (key|byte|req) Sort this section by key, bytes, or requests. -top N Include only the top N entries for this section. -both Do the top N as sorted and then do full by key. Search Options (include in summary only those log entries ...): -a Containing a hostname/IP address matching the given perl regexp. -A Not containing " " " " " " " " -c Containing a server response code matching the given perl regexp. -C Not containing " " " " " " " " -d Containing a date ("Feb 2 1994") matching the given perl regexp. -D Not containing " " " " " " " " -t Containing an hour ("00" -- "23") matching the given perl regexp. -T Not containing " " " " " " " " -n Containing an archive (URL) name matching perl regexp (except +.). -N Not containing " " " " " " " " -m Using an HTTP method name matching the given perl regexp. -M Not using the HTTP method " " " " "" -noescape Do not escape "." and "+" in remaining search options. Filenames (none implies "+"): - Read standard input (STDIN). + Read the default logfile $DefaultLog. ... Anything else is treated as the name of a file to be read, with the first line indicating whether it is a logfile or a summary. EndUsage } # ========================================================================== # The main program is really quite simple ... $Pname = $0; if ($Pname =~ s#^(.*)/##) { push(@INC, $1); } # Modify include path for bin, # current dir, and home dir unshift(@INC, '.', ($ENV{'HOME'} || $ENV{'LOGDIR'})); $StartTime = time; # Get the current date-time stamp $Updated = &wtime($StartTime,''); # Format it as local time $UpdatedGMT = &wtime($StartTime,'GMT'); # and also as GMT time &init_defaults; # Set the default configuration &get_configuration; # Get system and user configuration &get_commandline; # Get command-line options &init_summary; # Initialize the accumulaters &output_cgi if $Do_CGI; # Output CGI headers (if desired) &init_DNS if $LookupDNS; # Initialize the DNS cache if ($Verbose) { print STDERR "$Version: $Updated\n"; } if ($ARGV[0]) # Check for explicit filenames { foreach $filename (@ARGV) { &process_file($filename); } } else # if none, just read the default { &process_file($DefaultLog); } if ($Verbose) { print STDERR "Done processing files, now doing summary\n"; } &output_summary; # Give us the dirty details &close_DNS if $LookupDNS; # Close the DNS cache exit(0); # and we are finished. # ========================================================================== # ========================================================================== # Initialize default configuration options. NOTE that all of these options # can be overridden in either the system or user configuration files and # many can be overridden on the command-line. # sub init_defaults { @ArchiveMap = (); require "domains.pl"; # Get the domain mapping (%DomainMap) # Specify the URL of the previous summary period (for use only as a # hypertext link). Set it = "" if link is unwanted. # The three-letter abbrev for last month is substituted at any "%M". # The four-number year of last month is substituted at any "%Y". # Note that this is the month prior to the earliest one in this summary. $LastSummary = "stats-%Y/%M.wwwstats.html.gz"; # Specify the perl regex pattern for directory index files. This will be # dependent on the server's DirectoryIndex config (usually in srm.conf). # 'index.html?' # matches "index.html" and "index.htm" # 'index(.(html?|cgi))?' # matches "index", "index.html", "index.htm", and "index.cgi" # '(([Oo]verview)|(index)).html?' # matches "Overview.html", "Overview.htm", "index.html", "index.htm", # "overview.html", and "overview.htm" $DirectoryIndex = 'index(.(html?|cgi))?'; # Specify the default location of your access log $DefaultLog = '/usr/local/etc/httpd/logs/access_log'; # Specify the command for displaying compressed files to STDOUT $Zcat = 'gunzip -c'; # specify as null string if none are available $Zhandle = '(gz|Z|z)'; # list file extensions that indicate compressed # If address in log entry is one word (a local host), append what? # Specify an appropriate '.sub.dom.ain' $AppendToLocalhost = '.no_where.com'; # Specify whether (1) or not (0) you want to display the IP address # on reversed subdomain listings as follows: $LocalFullAddress = 0; # Show full address for local hosts? $OthersFullAddress = 0; # Show full address for non-local hosts? $ShowUnresolved = 0; # Show all unresolved addresses? # Specify whether (1) or not (0) you want to insert a hypertext # anchor for each URL in the archive section (-link option). $InsertLink = 0; # Specify whether (1) or not (0) you want to add CGI output headers # before the HTML summary. $Do_CGI = 0; # Specify whether (1) or not (0) you want the Archive URL to be # truncated (this saves output space and runtime memory, but loses info). $TruncateLevel = 0; # Truncate after Nth hierarchy level $TruncateFile = 0; # Truncate any trailing filename # Specify whether (1) or not (0) you want to lookup unresolved # IP addresses via DNS. Note that this could be *very* slow! $LookupDNS = 0; $DNScachefile = 'dnscache'; # DBM files for persistent cache $DNSexpires = 5356800; # Cache for two months (in seconds) # The following lines define the visible header fields for HTML output. # They may be changed/nationalized, but changing some may affect the # parsing algorithm for reading old summary files. Test all changes! $OutputTitle = 'World Wide Web Access Statistics for www' . $AppendToLocalhost; $UpdateHeader = 'Last updated: '; $LastSumHeader = 'Previous Full Summary Period'; $TotalsHeader = 'Totals for Summary Period: '; $ReqRcvHeader = 'Requests Received During Summary Period '; $BtransHeader = 'Bytes Transmitted During Summary Period '; $AvgReqHeader = 'Average Requests Received Daily '; $AvgByteHeader = 'Average Bytes Transmitted Daily '; $TotalsFormat = "%s %14.0f\n"; $StatsHeader = '%Reqs %Byte Bytes Sent Requests '; $StatsRule = '----- ----- ------------ -------- |'; $StatsFormat = '%s %s %12.0f %8d |'; $PrefixTop = 'Top'; $PrefixTotal = 'Total'; $DailyHeader = 'Transfers by Request Date'; $HourlyHeader = 'Transfers by Request Hour'; $DomainHeader = 'Transfers by Client Domain'; $SubdomainHeader = 'Transfers by Reversed Subdomain'; $ArchiveHeader = 'Transfers by URL/Archive Section'; $IdentHeader = 'Transfers by Remote Identity'; # These Old headers are for reading old summary files $OldDailyHeader = 'Daily Transmission Statistics'; $OldHourlyHeader = 'Hourly Transmission Statistics'; $OldDomainHeader = 'Total Transfers by Client Domain'; $OldSubdomainHeader = 'Total Transfers by Reversed Subdomain'; $OldArchiveHeader = 'Total Transfers from each Archive Section'; $OldIdentHeader = 'Total Transfers to each Remote Identifier'; # The following sets the default ordering for the daily stats. # Change this to 1 if you always want gwstat-style output. $ReverseDateSort = 0; # Display daily stats in reverse order. # The following sets the default sort key for each section, # where 0 means sort by the primary key value (day, hour, domain, ...) # 1 means sort by the number of requests # 2 means sort by the number of bytes transferred $SortDaily = 0; $SortHourly = 0; $SortDomain = 0; $SortSubdomain = 0; $SortArchive = 0; $SortIdent = 0; # If the output of a section is sorted, you may also want to restrict # the output to only the N best in that section. $TopDaily = 0; $TopHourly = 0; $TopDomain = 0; $TopSubdomain = 0; $TopArchive = 0; $TopIdent = 0; # On the other hand, you may want to exclude (0) an entire section. # If set = 2, the top N is done first and then followed by normal section. $Do_Daily = 1; # Display the Daily Statistics $Do_Hourly = 1; # Display the Hourly Statistics $Do_Domain = 1; # Display the Domain (Country) Statistics $Do_Subdomain = 1; # Display the Subdomain Statistics $Do_Archive = 1; # Display the Archive Statistics # The following option is only useful if the server is running with # rfc931/ident support (i.e. "IdentityCheck on" appears in httpd.conf) # or for resources which require user authentication. # NOTE: For security reasons, you should not publish to the web any report # that lists the Remote Identities. This option is intended for server # maintenance only. Use the -r or -ident command-line option instead. $Do_Ident = 0; # Set 1 or 2 ONLY if Ident is ALWAYS desired. # The rest of these options are normally only changed on the command-line $Verbose = 0; # Display valid log entries on STDERR? $PrintInvalids = 0; # Display invalid log entries on STDERR? $PrintNonexist = 0; # Display nonexistant file requests on STDERR? $SearchAddress = ''; # Pattern to look for in hostname/IP addresses. $SearchCode = ''; # Pattern to look for in Code. $SearchDate = ''; # Pattern to look for in Date. $SearchTime = ''; # Pattern to look for in Hour. $SearchArchive = ''; # Pattern to look for in Archive names. $SearchMethod = ''; # Pattern to look for in Method. $NotAddress = ''; # Pattern to reject entry if in IP addresses. $NotCode = ''; # Pattern to reject entry if in Code. $NotDate = ''; # Pattern to reject entry if in Date. $NotTime = ''; # Pattern to reject entry if in Hour. $NotArchive = ''; # Pattern to reject entry if in Archive names. $NotMethod = ''; # Pattern to reject entry if in Method. $EscapeSpecials = '[+.]'; # Most users forget about regexp syntax # The default system and user configuration filenames should only # be changed if your filesystem can't handle these names. $SconfigFile = 'wwwstat.rc'; # System file for overriding defaults $UconfigFile = '.wwwstatrc'; # User file for overriding defaults } # ========================================================================== # Get the system configuration and user configuration # sub get_configuration { local($forced) = 0; if (defined($ARGV[0]) && ($ARGV[0] eq '-F')) { shift @ARGV; $SconfigFile = shift @ARGV; $forced = 1; } if ($SconfigFile) { eval 'require $SconfigFile;'; if ($@ && $forced) { die "Unable to read $SconfigFile: $!\n"; } else { $! = 0; undef $@; } } if (defined($ARGV[0]) && ($ARGV[0] eq '-f')) { shift @ARGV; $UconfigFile = shift @ARGV; $forced = 1; } else { $forced = 0; } if ($UconfigFile) { eval 'require $UconfigFile;'; if ($@ && $forced) { die "Unable to read $UconfigFile: $!\n"; } else { $! = 0; undef $@; } } } # ========================================================================== # Get the command-line options. # sub get_commandline { local($_, $first, $rest, $pos); local($scope) = 0; local($letteropts) = 'helLoOuUrRvxis:H:X:f:F:m:M:c:C:t:T:a:A:n:N:d:D:'; local(@args) = split(//, $letteropts); while (defined($_ = $ARGV[0])) { if ($_ eq '--') { shift @ARGV; last; } # Last option indicator if ($_ eq '-') { last; } # STDIN file indicator if (!s/^-//) { last; } # Not an option if (/^no(.*)/) # Exclude some option { # indicated by suffix unless ($_ = $1) { # or next argument shift @ARGV; &badarg('-no requires value') unless ($_ = $ARGV[0]); } if (/^escape$/) { $EscapeSpecials = ''; } elsif (/^link$/) { $InsertLink = 0; } elsif (/^files$/) { $TruncateFile = 1; } elsif (/^dns$/) { $LookupDNS = 0; } elsif (/^cgi$/) { $Do_CGI = 0; } elsif (/^da(y|aily|ate)$/) { $Do_Daily = 0; } elsif (/^hour(ly)?$/) { $Do_Hourly = 0; } elsif (/^dom(ain)?$/) { $Do_Domain = 0; } elsif (/^sub(domain)?$/) { $Do_Subdomain = 0; } elsif (/^arc(hive)?$/) { $Do_Archive = 0; } elsif (/^id(ent)?$/) { $Do_Ident = 0; } elsif (/^all$/) { $Do_Daily = $Do_Hourly = $Do_Domain = $Do_Subdomain = $Do_Archive = $Do_Ident = 0; } else { &badarg('-no',$_); } } elsif (/^all$/) # Scope determines what sections are active { # and how to apply the -top and -sort options $scope = 0; $Do_Daily = $Do_Hourly = $Do_Domain = $Do_Subdomain = $Do_Archive = $Do_Ident = 1; } elsif (/^da(y|aily|ate)$/) { $scope = 1; $Do_Daily = 1; } elsif (/^hour(ly)?$/) { $scope = 2; $Do_Hourly = 1; } elsif (/^dom(ain)?$/) { $scope = 3; $Do_Domain = 1; } elsif (/^sub(domain)?$/) { $scope = 4; $Do_Subdomain = 1; } elsif (/^arc(hive)?$/) { $scope = 5; $Do_Archive = 1; } elsif (/^id(ent)?$/) { $scope = 6; $Do_Ident = 1; } elsif (/^link$/) { $InsertLink = 1; # Add anchors to archive } elsif (/^files$/) # Show filename in URL { $TruncateFile = 0; } elsif (/^trunc(.*)/) # Truncate Archive URL { # after Nth level unless ($_ = $1) { shift @ARGV; &badarg('-trunc requires value') unless ($_ = $ARGV[0]); } &badarg('-trunc', $_) unless (/^\d+$/); $TruncateLevel = $_; } elsif (/^cgi$/) # Output CGI headers { $Do_CGI = 1; } elsif (/^dns$/) # Resolve IP addresses { $LookupDNS = 1; } elsif (/^cache(.*)/) # Change cache filename { unless ($_ = $1) { shift @ARGV; &badarg('-cache requires value') unless ($_ = $ARGV[0]); } $DNScachefile = $_; } elsif (/^top(.*)/) # Limit to top N { unless ($_ = $1) { shift @ARGV; &badarg('-top requires value') unless ($_ = $ARGV[0]); } &badarg('-top', $_) unless (/^\d+$/); if ($scope == 1) { $TopDaily = $_; } elsif ($scope == 2) { $TopHourly = $_; } elsif ($scope == 3) { $TopDomain = $_; } elsif ($scope == 4) { $TopSubdomain = $_; } elsif ($scope == 5) { $TopArchive = $_; } elsif ($scope == 6) { $TopIdent = $_; } else { $TopDaily = $TopHourly = $TopDomain = $TopSubdomain = $TopArchive = $TopIdent = $_; } } elsif (/^sort(.*)/) # Change sort method { unless ($_ = $1) { shift @ARGV; &badarg('-sort requires value') unless ($_ = $ARGV[0]); } if (/^key/) { $sortkey = 0; } # Sort by primary key elsif (/^req/) { $sortkey = 1; } # Sort by requests rcvd elsif (/^byt/) { $sortkey = 2; } # Sort by bytes transmitted else { &badarg('-sort',$_); } if ($scope == 1) { $SortDaily = $sortkey; } elsif ($scope == 2) { $SortHourly = $sortkey; } elsif ($scope == 3) { $SortDomain = $sortkey; } elsif ($scope == 4) { $SortSubdomain = $sortkey; } elsif ($scope == 5) { $SortArchive = $sortkey; } elsif ($scope == 6) { $SortIdent = $sortkey; } else { $SortDaily = $SortHourly = $SortDomain = $SortSubdomain = $SortArchive = $SortIdent = $sortkey; } } elsif (/^both$/) # Do both top N and normal { if ($scope == 1) { $Do_Daily = 2; if (!$TopDaily) { $TopDaily = 10; } if (!$SortDaily) { $SortDaily = 1; } } elsif ($scope == 2) { $Do_Hourly = 2; if (!$TopHourly) { $TopHourly = 10; } if (!$SortHourly) { $SortHourly = 1; } } elsif ($scope == 3) { $Do_Domain = 2; if (!$TopDomain) { $TopDomain = 10; } if (!$SortDomain) { $SortDomain = 1; } } elsif ($scope == 4) { $Do_Subdomain = 2; if (!$TopSubdomain) { $TopSubdomain = 10; } if (!$SortSubdomain) { $SortSubdomain = 1; } } elsif ($scope == 5) { $Do_Archive = 2; if (!$TopArchive) { $TopArchive = 10; } if (!$SortArchive) { $SortArchive = 1; } } elsif ($scope == 6) { $Do_Ident = 2; if (!$TopIdent) { $TopIdent = 10; } if (!$SortIdent) { $SortIdent = 1; } } else { $Do_Daily = $Do_Hourly = $Do_Domain = $Do_Subdomain = $Do_Archive = $Do_Ident = 2; $TopDaily = $TopHourly = $TopDomain = $TopSubdomain = $TopArchive = $TopIdent = 10; $SortDaily = $SortHourly = $SortDomain = $SortSubdomain = $SortArchive = $SortIdent = 1; } } else # End of full-word option arguments { while() # Loop by each character { ($first,$rest) = /^(.)(.*)/; if (($pos = index($letteropts,$first)) < 0) { &badarg("Unknown option:",$first); } if ($args[$pos+1] eq ':') { shift(@ARGV); if ($rest eq '') { &badarg($first,"requires value") unless @ARGV; $rest = $ARGV[0]; } &set_option($first, $rest); last; } else { &set_option($first, 1); $_ = $rest; last unless $_; } } } } continue { shift @ARGV; } } # ========================================================================== # Set the single-letter command-line option given. Gee, this is fun. # sub set_option { local($opt, $value) = @_; if ($opt eq 'h') { &usage; } elsif ($opt eq 'e') { $PrintInvalids = 1; } elsif ($opt eq 'l') { $LocalFullAddress = 1; } elsif ($opt eq 'L') { $LocalFullAddress = 0; } elsif ($opt eq 'o') { $OthersFullAddress = 1; } elsif ($opt eq 'O') { $OthersFullAddress = 0; } elsif ($opt eq 'u') { $ShowUnresolved = 1; } elsif ($opt eq 'U') { $ShowUnresolved = 0; } elsif ($opt eq 'r') { $Do_Ident = 2; } elsif ($opt eq 'R') { $ReverseDateSort = 1; } elsif ($opt eq 'v') { $Verbose = 1; } elsif ($opt eq 'x') { $PrintNonexist = 1; } elsif ($opt eq 'X') { $LastSummary = $value; } elsif ($opt eq 'H') { $OutputTitle = $value; } elsif ($opt eq 'm') { if ($SearchMethod) { $SearchMethod = "($SearchMethod|$value)"; } else { $SearchMethod = $value; } } elsif ($opt eq 'M') { if ($NotMethod) { $NotMethod = "($NotMethod|$value)"; } else { $NotMethod = $value; } } elsif ($opt eq 'c') { if ($SearchCode) { $SearchCode = "($SearchCode|$value)"; } else { $SearchCode = $value; } } elsif ($opt eq 'C') { if ($NotCode) { $NotCode = "($NotCode|$value)"; } else { $NotCode = $value; } } elsif ($opt eq 't') { if ($SearchTime) { $SearchTime = "($SearchTime|$value)"; } else { $SearchTime = $value; } } elsif ($opt eq 'T') { if ($NotTime) { $NotTime = "($NotTime|$value)"; } else { $NotTime = $value; } } elsif ($opt eq 'a') { if ($EscapeSpecials) { $value =~ s/($EscapeSpecials)/\\$1/go; } if ($SearchAddress) { $SearchAddress = "($SearchAddress|$value)"; } else { $SearchAddress = $value; } } elsif ($opt eq 'A') { if ($EscapeSpecials) { $value =~ s/($EscapeSpecials)/\\$1/go; } if ($NotAddress) { $NotAddress = "($NotAddress|$value)"; } else { $NotAddress = $value; } } elsif ($opt eq 'n') { if ($EscapeSpecials) { $value =~ s/($EscapeSpecials)/\\$1/go; } if ($SearchArchive) { $SearchArchive = "($SearchArchive|$value)"; } else { $SearchArchive = $value; } } elsif ($opt eq 'N') { if ($EscapeSpecials) { $value =~ s/($EscapeSpecials)/\\$1/go; } if ($NotArchive) { $NotArchive = "($NotArchive|$value)"; } else { $NotArchive = $value; } } elsif ($opt eq 'd') { if ($value eq 'today') { $value = substr($Updated, 8, 4) . substr($Updated, 5, 3) . substr($Updated, 12, 4); $value =~ s/ 0(\d) / $1 /; } if ($SearchDate) { $SearchDate = "($SearchDate|$value)"; } else { $SearchDate = $value; } } elsif ($opt eq 'D') { if ($value eq 'today') { $value = substr($Updated, 8, 4) . substr($Updated, 5, 3) . substr($Updated, 12, 4); $value =~ s/ 0(\d) / $1 /; } if ($NotDate) { $NotDate = "($NotDate|$value)"; } else { $NotDate = $value; } } elsif ($opt eq 'F') { die "The -F option MUST be first option on command-line\n"; } elsif ($opt eq 'f') { die "The -f option MUST be first option after -F option (if any)\n"; } elsif ($opt eq 'i') { warn "Option -i is no longer needed, ignoring it.\n"; } elsif ($opt eq 's') { warn "Option -s is no longer used, ignoring it.\n"; } else { &badarg("Unknown option:", $opt); } } # ========================================================================== sub badarg { local($dreck) = join(' ', @_); warn "Bad command option: $dreck\n"; &usage; } # ========================================================================== # Initialize summary accumulaters and non-optional configuration. # These settings may be customized, but are unlikely to need changing. # sub init_summary { # Setup the table of response codes and (if not '') the name for archive %RespCodes = ( '100', 'Code 100 Continue', '101', 'Code 101 Switching Protocols', '200', '', # OK response '201', '', # Created response '202', '', # Accepted response '203', '', # Non-Authoritative response '204', '', # No Content response '205', '', # Reset Content response '206', '', # Partial Content response '300', 'Code 300 Multiple Choices', '301', 'Code 301 Moved Permanently', '302', 'Code 302 Moved Temporarily', '303', 'Code 303 See Other', '304', '', # Not Modified response '305', 'Code 305 Use Proxy', '400', 'Code 400 Bad Request', '401', 'Code 401 Unauthorized', '402', 'Code 402 Payment Required', '403', 'Code 403 Forbidden', '404', 'Code 404 Not Found', '405', 'Code 405 Method Not Allowed', '406', 'Code 406 Not Acceptable', '407', 'Code 407 Proxy Authentication Required', '408', 'Code 408 Request Time-out', '409', 'Code 409 Conflict', '410', 'Code 410 Gone', '411', 'Code 411 Length Required', '412', 'Code 412 Precondition Failed', '413', 'Code 413 Request Entity Too Large', '414', 'Code 414 Request-URI Too Large', '415', 'Code 415 Unsupported Media Type', '500', 'Code 500 Internal Server Error', '501', 'Code 501 Not Implemented', '502', 'Code 502 Bad Gateway', '503', 'Code 503 Service Unavailable', '504', 'Code 504 Gateway Time-out', '505', 'Code 505 HTTP Version Not Supported', ); # Estimate the size (in bytes) of typical responses not counted in logfile # For better accuracy, tailor to your particular site's server %RespEstimates = ( '100', 100, # Continue response (never happens) '101', 100, # Switching Protocols response (never happens) '200', 200, # OK response (headers only) '201', 200, # Created response (headers only) '202', 200, # Accepted response (headers only) '203', 200, # Non-Authoritative response (headers only) '204', 200, # No Content response (headers only) '205', 200, # Reset Content response (headers only) '206', 200, # Partial Content response (headers only) '300', 400, # Multiple choices message '301', 400, # Permanent redirect message '302', 400, # Temporary redirect message '303', 400, # See other URL redirect message '304', 100, # Not Modified response to a Conditional GET '305', 400, # Use Proxy redirect message '400', 300, # Bad Request response message '401', 300, # Unauthorized response message '402', 300, # Payment Required response message '403', 300, # Forbidden response message '404', 300, # Not Found message '405', 300, # Method Not Allowed message '406', 300, # Not Acceptable message '407', 300, # Proxy Authentication Required message '408', 300, # Request Time-out message '409', 300, # Conflict message '410', 300, # Gone message '411', 300, # Length Required message '412', 300, # Precondition Failed message '413', 300, # Request Entity Too Large message '414', 300, # Request-URI Too Large message '415', 300, # Unsupported Media Type message '500', 500, # Server Error response message '501', 500, # Not Implemented response message '502', 500, # Bad Gateway message '503', 500, # Service Unavailable message '504', 500, # Gateway Time-out message '505', 500, # HTTP Version Not Supported message ); $TotalRequests = 0; # total requests received %HourRequests = (); # per hour %DayRequests = (); # per day %ArchiveRequests = (); # per file %DomainRequests = (); # per domain %SubdomainRequests = (); # per subdomain %IdentRequests = (); # per ident $TotalBytes = 0; # total bytes sent %HourBytes = (); # per hour %DayBytes = (); # per day %ArchiveBytes = (); # per file %DomainBytes = (); # per domain %SubdomainBytes = (); # per subdomain %IdentBytes = (); # per ident $StartTag = "
\n";     # Note that these vars are used by both
    $EndTag   = "
\n"; # input and output of summaries. $TimeZone = ''; $AllMonths = 'JanFebMarAprMayJunJulAugSepOctNovDec'; } # ========================================================================== # process the given filename as FILE, based on the content of its first line. # sub output_cgi { local($method) = $ENV{'REQUEST_METHOD'}; local($crlf) = "\x0D\x0A"; $| = 1; # Unbuffer STDOUT if (!defined($method) || ($method eq 'GET') || ($method eq 'HEAD')) { print 'Content-Type: text/html', $crlf, $crlf; exit(0) if ($method eq 'HEAD'); } else { print 'Status: 405 Method Not Allowed', $crlf; print 'Allow: GET, HEAD', $crlf; print 'Content-Type: text/html', $crlf, $crlf; print '', $crlf; print '405 Method Not Allowed', $crlf; print '', $crlf; print '

405 Method Not Allowed

', $crlf; print 'Only GET and HEAD are allowed for this URL', $crlf; print '', $crlf; exit(0); } } # ========================================================================== # process the given filename as FILE, based on the content of its first line. # sub process_file { local($filename) = @_; if ($Verbose) { print STDERR "Processing file \"$filename\"\n"; } if ($filename eq '+') { $filename = $DefaultLog; } if ($Zhandle && ($filename =~ /\.$Zhandle$/o)) { if (!$Zcat) { warn "No zcat decompression command has been defined\n"; return; } $filename = "$Zcat $filename |"; } if (!open(FILE,$filename)) { warn "Error opening $filename: $!\n"; return; } if ($_ = ) { if (/^/) { &process_summary; } else { &process_log($_); } } close(FILE); } # ========================================================================== # Process the summary FILE by reading in our own output, section by section. # We must assume that the old output file was created with the same options # and that its content is disjunct from all other input files. # NOTE that using search options with inclusion cannot work unless the # included file was also created with those search options. # NOTE that Top N sections are skipped, since they cannot accumulate. # sub process_summary { local($_, $date, $hour, $domain, $subdomain, $pathkey, $ident); # This code depends on the content of the output being similar # to the default distribution. If you change the output content, # you must also check to ensure this code still works. local($heading_tag) = '

'; local($table_rule) = '-----'; # The first thing to do is read past the HEAD and crossreferences # until we get to the first preformatted section (the totals) do { return unless ($_ = ); } until ($_ eq $StartTag); # Next line should be "Files Transmitted ..." or "Requests Received ..." if (($_ = ) && (/\s(\d+)$/)) { return unless $1; $TotalRequests += $1; } else { warn "Invalid summary file, skipping"; return; } # Next line should be "Bytes Transmitted ..." if (($_ = ) && (/\s(\d+)$/)) { $TotalBytes += $1; } else { warn "Invalid summary file, skipping"; return; } # We don't care about the rest of the totals for (;;) # Loop through each section { do { return unless ($_ = ); } until (/^$heading_tag/o); next if (/>$PrefixTop /o); # Skip any Top N sections if (/$DailyHeader/o || /$OldDailyHeader/o) { do { return unless ($_ = ); } until (/^$table_rule/o); while (($_ = ) && ($_ ne $EndTag)) { if (/\s(\d+)\s+(\d+)\s+\|\s+(\S.*)/) { $date = $3; # the date after "|" $DayRequests{$date} += $2; # 1st number left of "|" $DayBytes{$date} += $1; # 2nd number left of "|" } else { warn "Invalid summary line"; } } } elsif (/$HourlyHeader/o || /$OldHourlyHeader/o) { next unless $Do_Hourly; do { return unless ($_ = ); } until (/^$table_rule/o); while (($_ = ) && ($_ ne $EndTag)) { if (/\s(\d+)\s+(\d+)\s+\|\s+(\S+)/) { $hour = $3; # the hour after "|" $HourRequests{$hour} += $2; # 1st number left of "|" $HourBytes{$hour} += $1; # 2nd number left of "|" } else { warn "Invalid summary line"; } } } elsif (/$DomainHeader/o || /$OldDomainHeader/o) { next unless $Do_Domain; do { return unless ($_ = ); } until (/^$table_rule/o); while (($_ = ) && ($_ ne $EndTag)) { if (/\s(\d+)\s+(\d+)\s+\|\s+(\S+)/) { $domain = $3; # the word after "|" $DomainRequests{$domain} += $2; # 1st number left of "|" $DomainBytes{$domain} += $1; # 2nd number left of "|" } else { warn "Invalid summary line"; } } } elsif (/$SubdomainHeader/o || /$OldSubdomainHeader/o) { next unless $Do_Subdomain; do { return unless ($_ = ); } until (/^$table_rule/o); while (($_ = ) && ($_ ne $EndTag)) { if (/\s(\d+)\s+(\d+)\s+\|\s+(\S.*)/) { $subdomain = $3; $SubdomainRequests{$subdomain} += $2; $SubdomainBytes{$subdomain} += $1; } else { warn "Invalid summary line"; } } } elsif (/$ArchiveHeader/o || /$OldArchiveHeader/o) { next unless $Do_Archive; do { return unless ($_ = ); } until (/^$table_rule/o); while (($_ = ) && ($_ ne $EndTag)) { if (/\s(\d+)\s+(\d+)\s+\|\s+(\S.*)/) { $pathkey = &striplink($3); # the pathkey after "|" $ArchiveRequests{$pathkey} += $2; # 1st number left of "|" $ArchiveBytes{$pathkey} += $1; # 2nd number left of "|" } else { warn "Invalid summary line"; } } } elsif (/$IdentHeader/o || /$OldIdentHeader/o) { next unless $Do_Ident; do { return unless ($_ = ); } until (/^$table_rule/o); while (($_ = ) && ($_ ne $EndTag)) { if (/\s(\d+)\s+(\d+)\s+\|\s+(\S.*)/) { $ident = $3; # the identity after "|" $IdentRequests{$ident} += $2; # 1st number left of "|" $IdentBytes{$ident} += $1; # 2nd number left of "|" } else { warn "Invalid summary line"; } } } else { warn "Invalid summary file, skipping"; return; } } } # ========================================================================== # Strip the potential anchor tags from around an archive entry # sub striplink { local($_) = @_; s#^##; s#$##; return &truncated($_); } # ========================================================================== # If the options call for it, truncate the archive URL down to the # Nth hierarchy level and/or remove filename (if any) # sub truncated { local($_) = @_; local(@levels); return $_ unless m#^/#; if ($TruncateFile) { s#[^/]+$##; } if ($TruncateLevel > 0) { @levels = split(/\//); if ($#levels > $TruncateLevel) { $_ = join('/', @levels[0 .. $TruncateLevel], ''); } } return $_; } # ========================================================================== # Process the access_log FILE by reading each entry, validating and # categorizing the access, and then adding to that category's stats # sub process_log { local($_) = @_; # The first line has already been read. local($host, $rfc931, $authuser, $timestamp, $request, $status, $bytes); local($ident, $hour, $date, $method, $htv, $has_head, $idx); local($fname, $rname, $dvalue, $pathkey, @address, $domain, $subdomain); local($saveline); LINE: while() { s/^\0+//; # This is due to a bug in perl 5.002 s/\0//g; # because this line should be sufficient $saveline = $_; # # First, parse the logfile entry into its seven basic components # ($host, $rfc931, $authuser, $timestamp, $request, $status, $bytes) = /^(\S+) (\S+) (\S+) \[([^\]]*)\] \"([^"]*)\" (\S+) (\S+)/; #" Now, is this garbage or is it memorex? Note that $bytes can be 0 if (!($host && $rfc931 && $authuser && $timestamp && $request && $status)) { if ($PrintInvalids) { print STDERR "$.:$saveline"; } next LINE; } if ($status eq '-') # Test the response code { $status = "200"; } elsif (!defined($RespEstimates{$status})) { if ($PrintInvalids) { print STDERR "$.:$saveline"; } next LINE; } if ($SearchCode) { next LINE unless ($status =~ m#$SearchCode#o); } if ($NotCode) { next LINE unless ($status !~ m#$NotCode#o );} if ($bytes eq '-') { $bytes = '0'; } elsif ($bytes !~ /^\d+$/ ) # Test the bytes transferred { if ($PrintInvalids) { print STDERR "$.:$saveline"; } next LINE; } if ($rfc931 ne '-') # Test the remote ident { $ident = $rfc931; # Save ident for later use $ident =~ s/\[[^\]]*\]/COOKIE/g; # Replace all magic cookies } elsif ($authuser ne '-') { $ident = $authuser; # Jury rig support for authuser $ident =~ s/\[[^\]]*\]/COOKIE/g; # Replace all magic cookies } else { $ident = "unknown"; } # # Looks okay so far -- Now figure out when the request was made. # $timestamp =~ s/^0/ /; # Remove leading zero from day if ($timestamp =~ m#^([ 1-3]?\d)/([A-Za-z]+)/(\d{4}):(\d\d):\d\d:\d\d ([+ -]\d{1,4})#) { $date = "$2 $1 $3"; $hour = "$4"; $TimeZone = "$5"; } else { if ($PrintInvalids) { print STDERR "$.:$saveline"; } next LINE; } if ($SearchDate) { next LINE unless ($date =~ m#$SearchDate#o); } if ($NotDate) { next LINE unless ($date !~ m#$NotDate#o); } if ($SearchTime) { next LINE unless ($hour =~ m#$SearchTime#o); } if ($NotTime) { next LINE unless ($hour !~ m#$NotTime#o); } # # Then parse the method and URL pathname from request # ($method, $fname, $htv) = split(' ',$request,3); if ($SearchMethod) { next LINE unless ($method =~ m#$SearchMethod#o); } if ($NotMethod) { next LINE unless ($method !~ m#$NotMethod#o); } $has_head = 0; # Check for HTTP/version tag if ($htv) { if ($htv !~ m#^HTTP/#i) { if ($PrintInvalids) { print STDERR "$.:$saveline"; } } else { $has_head = 1; } } # # Now we update the actual bytes transferred to include header/errors # if ($has_head || ($status ne '200')) { $bytes += $RespEstimates{$status}; } # # And then determine what the archive name should be # if ($rname = $RespCodes{$status}) # If not a successful status code { if ($PrintNonexist && ($status >= 400)) { print STDERR "$status $date $hour $fname BY $host\n"; } $fname = $rname unless ($SearchCode || $NotCode); } elsif (!$fname || ($fname =~ m#^HTTP/#i)) { $fname = '/'; } else { $fname =~ s/\#.*$//; # Remove any trailing anchor $fname =~ s/\?.*$//; # Remove any trailing query $fname =~ s/%7E/~/i; # Fix munging of URLs $fname =~ s/%3A/:/ig; $fname =~ s#/[^/]+/\.\./#/#; # Fix usage of relative paths $fname =~ s#/\./#/#; # and another one $fname =~ y#/#/#s; # Remove any extra slashes $fname =~ s#/$DirectoryIndex$#/#o; # Remove trailing index name } if ($SearchArchive) { next LINE unless ($fname =~ m#$SearchArchive#o); } if ($NotArchive) { next LINE unless ($fname !~ m#$NotArchive#o); } if ($Verbose) { print STDERR "$date $hour $bytes $fname\n"; } unless ($rname || $SearchArchive || $SearchCode || $NotCode) { for ($idx = 0; $idx < $#ArchiveMap; $idx += 3) { if ($ArchiveMap[$idx] eq 'i') { if ($fname =~ m/${ArchiveMap[$idx+1]}/i) { $fname = $ArchiveMap[$idx+2]; last; } } elsif ($fname =~ m/${ArchiveMap[$idx+1]}/) { $fname = $ArchiveMap[$idx+2]; last; } } next LINE unless $fname; # No value indicates URI exclusion } $pathkey = &truncated($fname); # Truncate parts if that is desired # # Get hostname/IP address and determine domain and reversed subdomain. # undef $domain; undef $subdomain; $host =~ tr/A-Z/a-z/; $host =~ s/\.$//; if ($host =~ /^[^.]+$/) # Unqualified hostname { if ($AppendToLocalhost) { $host .= $AppendToLocalhost; } else { if ($PrintInvalids) { print STDERR "$.:$saveline"; } $domain = 'localhost'; $subdomain = $host; } } elsif ($host =~ /^\d+\.\d+\.\d+\.\d+$/) # IP number { if ($LookupDNS && ($dvalue = &resolve($host))) { $host = $dvalue; if ($AppendToLocalhost && ($host =~ /^[^.]+$/)) { $host .= $AppendToLocalhost; } } else { $domain = 'unresolved'; $subdomain = $ShowUnresolved ? $host : 'Unresolved'; } } $host =~ s/\.[\d.]*in-addr\.arpa$//; # Remove any DNS garbage $ident .= '@' . $host; if ($SearchAddress) { next LINE unless ($host =~ m#$SearchAddress#o); } if ($NotAddress) { next LINE unless ($host !~ m#$NotAddress#o); } # # If we haven't already set the subdomain and we don't want the # full subdomain address and this one has a machine name, strip # the machine name and store it reversed (for later sorting/display). # if ($Do_Subdomain && !defined($subdomain)) { @address = split(/\./, $host); # Split into component names if ($host =~ /$AppendToLocalhost$/o) { if (!$LocalFullAddress && ($#address > 1)) { shift(@address); # clip off the machine name } } else { if (!$OthersFullAddress && ($#address > 1)) { shift(@address); # clip off the machine name } } $subdomain = join('.', reverse(@address)); } # # If we haven't already set the domain, find it in %DomainMap # by looking for the longest match. If none, just use last component. # Note that this destroys the value of $host. # if (!defined($domain)) { for (;;) { if (defined($dvalue = $DomainMap{$host})) { next LINE if ($dvalue eq ''); # Indicates domain exclusion last; } last unless ($host =~ s/^[^.]*\.//); } $domain = $host; } # # Now that we have categorized it, add it to the corresponding counters # $TotalRequests++; # Total requests received $TotalBytes += $bytes; # Total bytes sent $DayRequests{$date}++; # Add to Daily Table $DayBytes{$date} += $bytes; if ($Do_Hourly) # Add to Hourly Table? { $HourRequests{$hour}++; $HourBytes{$hour} += $bytes; } if ($Do_Domain) # Add to Domain Table? { $DomainRequests{$domain}++; $DomainBytes{$domain} += $bytes; } if ($Do_Subdomain) # Add to Subdomain Table? { $SubdomainRequests{$subdomain}++; $SubdomainBytes{$subdomain} += $bytes; } if ($Do_Archive) # Add to Archive Table? { $ArchiveRequests{$pathkey}++; $ArchiveBytes{$pathkey} += $bytes; } if ($Do_Ident) # Add to Ident Table? { $IdentRequests{$ident}++; $IdentBytes{$ident} += $bytes; } } continue { last if eof(FILE); $_ = ; } } # ========================================================================== # Initialize the DNS cache and remove entries that have expired. # sub init_DNS { local($ipnum, $value, $host, $seen, @expired); if ($DNScachefile) { dbmopen(%DNScache, $DNScachefile, 0666) || die "Cannot open DBM files $DNScachefile: $!\n"; while (($ipnum, $value) = each %DNScache) { ($host, $seen) = split(/\|/, $value); if ($StartTime > ($seen + $DNSexpires)) { push(@expired, $ipnum); } } foreach $ipnum (@expired) { delete $DNScache{$ipnum}; } } else { %DNScache = (); } } # ========================================================================== # Close the DNS cache # sub close_DNS { if ($DNScachefile) { dbmclose(%DNScache); } } # ========================================================================== # Resolve an IP address to its DNS hostname (if it has one) with caching. # sub resolve { local($ip) = @_; local($ipnum, $value, $host, $seen, $aliases, $addrtype, $length, @addrs); $ipnum = pack('C4', split(/\./, $ip)); if (defined($value = $DNScache{$ipnum})) { ($host, $seen) = split(/\|/, $value); return $host; } ($host, $aliases, $addrtype, $length, @addrs) = gethostbyaddr($ipnum, 2); if (!defined($host)) { $host = ''; } # Many hosts have no DNS names $DNScache{$ipnum} = join('|', $host, time); return $host; } # ========================================================================== # Output the summary in HTML # sub output_summary { local($prefix, $earliest, $latest, $section, $value, @dupes); # # We first need to combine slashless directory names with slashful ones # @dupes = (); while (($section, $value) = each %ArchiveRequests) { if (($section !~ m#/$#) && defined($ArchiveRequests{"$section/"})) { push(@dupes, $section); } } foreach $section (@dupes) { $ArchiveRequests{"$section/"} += $ArchiveRequests{$section}; delete $ArchiveRequests{$section}; $ArchiveBytes{"$section/"} += $ArchiveBytes{$section}; delete $ArchiveBytes{$section}; } undef @dupes; # # And create a sorted date array for later output # @SortedDates = sort datecompare keys %DayRequests; if ($#SortedDates < 0) # Handle case of no data to summarize { $SortedDates[0] = '[none]'; $LastSummary = ''; } if ($ReverseDateSort) { $earliest = $SortedDates[$#SortedDates]; $latest = $SortedDates[0]; } else { $earliest = $SortedDates[0]; $latest = $SortedDates[$#SortedDates]; } # # Finally, we can print out the resulting statistics by section. # # Note: if you have a heavily used server, you may need to increase # the length of the numeric output fields in the forms below. print "\n"; print "$OutputTitle\n"; print "\n"; print "

$OutputTitle

\n"; if ($TimeZone) { $Updated .= "(GMT $TimeZone)"; } else { $Updated .= "($UpdatedGMT)"; } print "", $UpdateHeader, $Updated, "\n"; print "
    \n"; &output_xref($Do_Daily, $TopDaily, 'Daily', $DailyHeader); &output_xref($Do_Hourly, $TopHourly, 'Hourly', $HourlyHeader); &output_xref($Do_Domain, $TopDomain, 'Domain', $DomainHeader); &output_xref($Do_Subdomain, $TopSubdomain, 'Subdomain', $SubdomainHeader); &output_xref($Do_Archive, $TopArchive, 'Archive', $ArchiveHeader); &output_xref($Do_Ident, $TopIdent, 'Ident', $IdentHeader); if ($LastSummary) { local($prevmonth, $prevyear) = &lastmonth($earliest); $LastSummary =~ s/%M/$prevmonth/g; $LastSummary =~ s/%Y/$prevyear/g; print "
  • $LastSumHeader\n"; } print "
\n"; print "

", $TotalsHeader, $earliest," to ", $latest, "

\n"; print $StartTag; printf $TotalsFormat, $ReqRcvHeader, $TotalRequests; printf $TotalsFormat, $BtransHeader, $TotalBytes; printf $TotalsFormat, $AvgReqHeader, ($TotalRequests/($#SortedDates + 1)); printf $TotalsFormat, $AvgByteHeader, ($TotalBytes/($#SortedDates + 1)); print $EndTag; if ($Do_Daily) { &output_daily('Daily'); if ($Do_Daily == 2) { $TopDaily = 0; $SortDaily = 0; &output_daily('AllDaily'); } } if ($Do_Hourly) { &output_hourly('Hourly'); if ($Do_Hourly == 2) { $TopHourly = 0; $SortHourly = 0; &output_hourly('AllHourly'); } } if ($Do_Domain) { &output_domain('Domain'); if ($Do_Domain == 2) { $TopDomain = 0; $SortDomain = 0; &output_domain('AllDomain'); } } if ($Do_Subdomain) { &output_subdomain('Subdomain'); if ($Do_Subdomain == 2) { $TopSubdomain = 0; $SortSubdomain = 0; &output_subdomain('AllSubdomain'); } } if ($Do_Archive) { &output_archive('Archive'); if ($Do_Archive == 2) { $TopArchive = 0; $SortArchive = 0; &output_archive('AllArchive'); } } if ($Do_Ident) { &output_ident('Ident'); if ($Do_Ident == 2) { $TopIdent = 0; $SortIdent = 0; &output_ident('AllIdent'); } } print "
\n"; print "
This summary was generated by \n"; print ""; print "$Version\n"; print "
\n"; print "\n"; } # ========================================================================== # Output the stats for each calendar day represented in the input file(s) # sub output_xref { local($do_section, $topn, $frag, $header) = @_; if ($do_section) { local($prefix) = $topn ? "$PrefixTop $topn" : $PrefixTotal; print "
  • $prefix $header\n"; if ($do_section == 2) { print "
  • $PrefixTotal $header\n"; } } } # ========================================================================== # Output the stats for each calendar day represented in the input file(s) # sub output_daily { local($frag) = @_; local($rqsts, $bytes, $pctrqsts, $pctbytes); local($top) = $TopDaily; local($prefix) = $top ? "$PrefixTop $top" : $PrefixTotal; print "
    \n"; print "

    $prefix $DailyHeader

    \n"; print $StartTag; print $StatsHeader, " Date\n"; print $StatsRule, "------------\n"; local($fmt) = "$StatsFormat %s\n"; foreach $date (@SortedDates) { $rqsts = $DayRequests{$date} || 0; $bytes = $DayBytes{$date} || 0; if ($rqsts == $TotalRequests) { $pctrqsts = "100.0"; } else { $pctrqsts = sprintf("%5.2f", 100*$rqsts/$TotalRequests); } if ($bytes == $TotalBytes) { $pctbytes = "100.0"; } else { $pctbytes = sprintf("%5.2f", 100*$bytes/$TotalBytes); } printf $fmt, $pctrqsts, $pctbytes, $bytes, $rqsts, $date; last if ($top && (--$top == 0)); } print $EndTag; } # ========================================================================== # Output the stats for each hour of the day, accumulating over all days. # sub output_hourly { local($frag) = @_; local($rqsts, $bytes, $pctrqsts, $pctbytes); local($top) = $TopHourly; local($prefix) = $top ? "$PrefixTop $top" : $PrefixTotal; print "
    \n"; print "

    $prefix $HourlyHeader

    \n"; print $StartTag; print $StatsHeader, " Time\n"; print $StatsRule, "-----\n"; local($fmt) = "$StatsFormat %s\n"; foreach $hour (sort hourcompare keys %HourRequests) { $rqsts = $HourRequests{$hour}; $bytes = $HourBytes{$hour}; if ($rqsts == $TotalRequests) { $pctrqsts = "100.0"; } else { $pctrqsts = sprintf("%5.2f", 100*$rqsts/$TotalRequests); } if ($bytes == $TotalBytes) { $pctbytes = "100.0"; } else { $pctbytes = sprintf("%5.2f", 100*$bytes/$TotalBytes); } printf $fmt, $pctrqsts, $pctbytes, $bytes, $rqsts, $hour; last if ($top && (--$top == 0)); } print $EndTag; } # ========================================================================== # Output the stats for each requesting client's domain/country/organization # sub output_domain { local($frag) = @_; local($rqsts, $bytes, $pctrqsts, $pctbytes); local($top) = $TopDomain; local($prefix) = $top ? "$PrefixTop $top" : $PrefixTotal; print "
    \n"; print "

    $prefix $DomainHeader

    \n"; print $StartTag; print $StatsHeader, " Domain\n"; print $StatsRule, "------------------------------------\n"; local($fmt) = "$StatsFormat %-5s %s\n"; foreach $domain (sort domaincompare keys %DomainRequests) { $country = $DomainMap{$domain} || ''; $rqsts = $DomainRequests{$domain}; $bytes = $DomainBytes{$domain}; if ($rqsts == $TotalRequests) { $pctrqsts = "100.0"; } else { $pctrqsts = sprintf("%5.2f", 100*$rqsts/$TotalRequests); } if ($bytes == $TotalBytes) { $pctbytes = "100.0"; } else { $pctbytes = sprintf("%5.2f", 100*$bytes/$TotalBytes); } printf $fmt, $pctrqsts, $pctbytes, $bytes, $rqsts, $domain, $country; last if ($top && (--$top == 0)); } print $EndTag; } # ========================================================================== # Output the stats for each requesting client's DNS subdomain # sub output_subdomain { local($frag) = @_; local($rqsts, $bytes, $pctrqsts, $pctbytes); local($top) = $TopSubdomain; local($prefix) = $top ? "$PrefixTop $top" : $PrefixTotal; print "
    \n"; print "

    $prefix $SubdomainHeader

    \n"; print $StartTag; print $StatsHeader, " Reversed Subdomain\n"; print $StatsRule, "------------------------------------\n"; local($fmt) = "$StatsFormat %s\n"; foreach $subdomain (sort subdomcompare keys %SubdomainRequests) { $rqsts = $SubdomainRequests{$subdomain}; $bytes = $SubdomainBytes{$subdomain}; if ($rqsts == $TotalRequests) { $pctrqsts = "100.0"; } else { $pctrqsts = sprintf("%5.2f", 100*$rqsts/$TotalRequests); } if ($bytes == $TotalBytes) { $pctbytes = "100.0"; } else { $pctbytes = sprintf("%5.2f", 100*$bytes/$TotalBytes); } printf $fmt, $pctrqsts, $pctbytes, $bytes, $rqsts, $subdomain; last if ($top && (--$top == 0)); } print $EndTag; } # ========================================================================== # Output the stats for each archive (URL path or category) # sub output_archive { local($frag) = @_; local($rqsts, $bytes, $pctrqsts, $pctbytes, $asec); local($top) = $TopArchive; local($prefix) = $top ? "$PrefixTop $top" : $PrefixTotal; print "
    \n"; print "

    $prefix $ArchiveHeader

    \n"; print $StartTag; print $StatsHeader, " Archive Section\n"; print $StatsRule, "------------------------------------\n"; local($fmt) = "$StatsFormat %s\n"; foreach $section (sort archivecompare keys %ArchiveRequests) { $rqsts = $ArchiveRequests{$section}; $bytes = $ArchiveBytes{$section}; next unless $rqsts; if ($rqsts == $TotalRequests) { $pctrqsts = "100.0"; } else { $pctrqsts = sprintf("%5.2f", 100*$rqsts/$TotalRequests); } if ($bytes == $TotalBytes) { $pctbytes = "100.0"; } else { $pctbytes = sprintf("%5.2f", 100*$bytes/$TotalBytes); } $asec = $section; $asec =~ s/\&/\&/g; # Replace HTML specials $asec =~ s//\>/g; if ($InsertLink && ($asec =~ m:^/:)) { $asec = "$asec"; } printf $fmt, $pctrqsts, $pctbytes, $bytes, $rqsts, $asec; last if ($top && (--$top == 0)); } print $EndTag; } # ========================================================================== # Output the stats for each calendar day represented in the input file(s) # sub output_ident { local($frag) = @_; local($rqsts, $bytes, $pctrqsts, $pctbytes); local($top) = $TopIdent; local($prefix) = $top ? "$PrefixTop $top" : $PrefixTotal; print "
    \n"; print "

    $prefix $IdentHeader

    \n"; print $StartTag; print $StatsHeader, " Remote Identity\n"; print $StatsRule, "------------------------------------\n"; local($fmt) = "$StatsFormat %s\n"; foreach $ident (sort identcompare keys %IdentRequests) { $rqsts = $IdentRequests{$ident}; $bytes = $IdentBytes{$ident}; if ($rqsts == $TotalRequests) { $pctrqsts = "100.0"; } else { $pctrqsts = sprintf("%5.2f", 100*$rqsts/$TotalRequests); } if ($bytes == $TotalBytes) { $pctbytes = "100.0"; } else { $pctbytes = sprintf("%5.2f", 100*$bytes/$TotalBytes); } printf $fmt, $pctrqsts, $pctbytes, $bytes, $rqsts, $ident; last if ($top && (--$top == 0)); } print $EndTag; } # ========================================================================== # ========================================================================== # The following sort comparison functions take $a and $b as the two # arguments keys or values to compare. Speed is important here. sub datecompare { local($date1) = substr($a, 7, 4) * 512; # Years local($date2) = substr($b, 7, 4) * 512; $date1 += index($AllMonths, substr($a,0,3)) * 12; # Months $date2 += index($AllMonths, substr($b,0,3)) * 12; $date1 += substr($a, 4, 2); # Days $date2 += substr($b, 4, 2); if ($SortDaily == 0) { return ($ReverseDateSort ? $date2 <=> $date1 : $date1 <=> $date2); } if ($SortDaily == 1) { $sdiff = $DayRequests{$b} - $DayRequests{$a}; } else { $sdiff = $DayBytes{$b} - $DayBytes{$a}; } ($sdiff < 0) ? -1 : ($sdiff > 0) ? 1 : ($date1 <=> $date2); } sub hourcompare { if ($SortHourly == 0) { return ($a <=> $b); } if ($SortHourly == 1) { $sdiff = $HourRequests{$b} - $HourRequests{$a}; } else { $sdiff = $HourBytes{$b} - $HourBytes{$a}; } ($sdiff < 0) ? -1 : ($sdiff > 0) ? 1 : ($a <=> $b); } sub domaincompare { if ($SortDomain == 0) { $sdiff = length($a) - length($b); } elsif ($SortDomain == 1) { $sdiff = $DomainRequests{$b} - $DomainRequests{$a}; } else { $sdiff = $DomainBytes{$b} - $DomainBytes{$a}; } ($sdiff < 0) ? -1 : ($sdiff > 0) ? 1 : ($a cmp $b); } sub subdomcompare { if ($SortSubdomain == 0) { return ($a cmp $b); } if ($SortSubdomain == 1) { $sdiff = $SubdomainRequests{$b} - $SubdomainRequests{$a}; } else { $sdiff = $SubdomainBytes{$b} - $SubdomainBytes{$a}; } ($sdiff < 0) ? -1 : ($sdiff > 0) ? 1 : ($a cmp $b); } sub archivecompare { if ($SortArchive == 0) { return ($a cmp $b); } if ($SortArchive == 1) { $sdiff = $ArchiveRequests{$b} - $ArchiveRequests{$a}; } else { $sdiff = $ArchiveBytes{$b} - $ArchiveBytes{$a}; } ($sdiff < 0) ? -1 : ($sdiff > 0) ? 1 : ($a cmp $b); } sub identcompare { if ($SortIdent == 0) { return ($a cmp $b); } if ($SortIdent == 1) { $sdiff = $IdentRequests{$b} - $IdentRequests{$a}; } else { $sdiff = $IdentBytes{$b} - $IdentBytes{$a}; } ($sdiff < 0) ? -1 : ($sdiff > 0) ? 1 : ($a cmp $b); } # =========================================================================== # This is a modified (by Roy Fielding) version of Perl 4.036's ctime.pl # library by Waldemar Kebsch and # Marion Hakanson . It is distributed under the # Artistic License (included with your Perl distribution files). # # # wtime returns a time string in the format "Wkd, Dy Mon Year HH:MM:SS Zone" # with no newline appended. # # USAGE: # # wtime(time,''); -- returns the local time with no timezone appended # As in "Wed, 15 Dec 1993 23:59:59 " # # wtime(time,'GMT'); -- returns GMT time # As in "Wed, 16 Dec 1993 07:59:59 GMT" # sub wtime { local($time, $TZ) = @_; local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); local(@DoW) = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); local(@MoY) = ('Jan','Feb','Mar','Apr','May','Jun', 'Jul','Aug','Sep','Oct','Nov','Dec'); # Determine what time zone is in effect. Use local time if # TZ is anything other than 'GMT' # There's no portable way to find the system default timezone. ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = ($TZ eq 'GMT') ? gmtime($time) : localtime($time); $year += ($year < 70) ? 2000 : 1900; sprintf("%s, %02d %s %4d %02d:%02d:%02d %s", $DoW[$wday], $mday, $MoY[$mon], $year, $hour, $min, $sec, $TZ); } # =========================================================================== # This last routine returns the three letter abbreviation for the month # before the one in the date that was passed as an argument, and its year. # sub lastmonth { local($date) = @_; # Must be in the format "Feb 01 1994" local($midx) = index($AllMonths, substr($date,0,3)); local($year) = substr($date,7,4); if ($midx < 0) { return ('Err', ''); } elsif ($midx == 0) { return ('Dec', ($year - 1)); } else { return (substr($AllMonths,($midx - 3),3), $year); } } ($rqsts == $TotalRequests) { $pctrqsts = "100.0"; } else { $pctrqsts = sprintf("%5.2f", 100*$rqsts/$TotalRequests); } if ($bytes == $TotalBytes) { $pctbytes = "100.0"; } else { $pctbytes = sprintf("%5.2f", 100*$bytes/$TotalBytes); } printf $fmt, $pctrqsts, $pctbytes, $bytes, $rqsts, $hour; last if ($top && (--$top == 0)); } print $EndTag; } # =====================================wwwstat-2.0/wwwstat.ps010064400060720000146000002525670623726126300160120ustar00fieldinggrad00002420013033%!PS-Adobe-1.0 %%DocumentFonts: %%Creator: troff->tpscript %%CreationDate: Sun Nov 3 18:10:41 1996 %%Pages: (atend) %%EndComments /vmstat save def initmatrix 0.1000 dup scale clippath pathbbox pop pop exch pop 0 exch translate clippath pathbbox /pgtop exch def pop pop pop /page { copypage erasepage restore save home } def /home { newpath 0 pgtop moveto } def /mf { statusdict /manualfeed true put } def /af { statusdict /manualfeed false put } def af 0 0 moveto 2 setlinecap /y { neg 0 exch rmoveto } def /X { currentpoint exch pop moveto } def /Y { pgtop exch sub currentpoint pop exch moveto } def /s { show } def /l { neg rlineto currentpoint stroke moveto } def /c { 2 div /rad exch def currentpoint /y0 exch def /x0 exch def newpath x0 rad add y0 rad 0 360 arc stroke x0 rad add rad add y0 moveto } def /a { /y2 exch neg def /x2 exch def /y1 exch neg def /x1 exch def x1 y1 rmoveto currentpoint currentpoint x2 x2 mul y2 y2 mul add sqrt y1 neg x1 neg atan y2 x2 atan newpath arc stroke moveto x2 y2 rmoveto } def /e { 2 div /yrad exch def 2 div /xrad exch def currentpoint /y0 exch def /x0 exch def x0 xrad add y0 translate xrad yrad scale newpath 0 0 1 0 360 arc savematrix setmatrix stroke x0 xrad add xrad add y0 moveto } def /spln { rcurveto currentpoint stroke moveto } def /ft { /fonttype exch def /xsiz exch def /ysiz exch def /sl exch def fonttype [ xsiz pt 0 sl sin sl cos div ysiz pt mul ysiz pt 0 0 ] makefont setfont xsiz 1.7 div setlinewidth } def /pt { 10 mul } def -90 230 translate /savematrix matrix currentmatrix def /BracketFontDict 9 dict def /$workingdict 10 dict def BracketFontDict begin /FontType 3 def /FontName (Bracket) cvn def /FontMatrix [ 0.001 0 0 0.001 0 0] def /FontBBox [ -50 -250 1000 1000 ] def /Encoding 256 array def 0 1 255 { Encoding exch /.notdef put } for Encoding dup 65 /Cbv put dup 66 /Clt put dup 67 /Clk put dup 68 /Clb put dup 69 /Crt put dup 70 /Crk put dup 71 /Crb put dup 72 /Clc put dup 73 /Clf put dup 74 /Crc put dup 75 /Crf put dup 76 /Cbr put dup 77 /Crn put dup 78 /Cci put dup 79 /C|| put dup 80 /C^^ put dup 81 /Cr1 put dup 82 /Cr2 put pop /CharProcs 24 dict dup begin /setC { 0 -50 -250 500 1000 setcachedevice} def /C.bv {220 -250 moveto 0 1000 rlineto 60 0 rlineto 0 -1000 rlineto fill } def /C.barc { 750 moveto 180 0 rlineto 0 -60 rlineto -180 0 rlineto fill } def /C.barf { -250 moveto 180 0 rlineto 0 60 rlineto -180 0 rlineto fill } def /C.brk.end { 1 setlinewidth moveto rlineto rcurveto reversepath 60 0 rlineto rlineto rcurveto fill } def /C.setl {dup dtransform exch round exch idtransform pop setlinewidth } def /Cbv { 500 setC C.bv } def /Clt { 500 setC 0 150 50 210 140 250 0 730 0 150 50 250 200 250 0 750 220 -250 C.brk.end } def /Clk { 500 setC 1 setlinewidth 220 -250 moveto 0 400 rlineto 0 50 -50 100 -100 100 rcurveto 50 0 100 50 100 100 rcurveto 0 400 rlineto 60 0 rlineto 0 -400 rlineto 0 -50 -50 -100 -100 -100 rcurveto 50 0 100 -50 100 -100 rcurveto 0 -400 rlineto closepath fill } def /Clb { 500 setC 0 -150 50 -210 140 -250 0 -730 0 -150 50 -250 200 -250 0 -750 220 750 C.brk.end } def /Crt { 500 setC 0 150 -50 250 -200 250 0 750 0 150 -50 210 -140 250 0 730 220 -250 C.brk.end } def /Crk { 500 setC 1 setlinewidth 220 -250 moveto 0 400 rlineto 0 50 50 100 100 100 rcurveto -50 0 -100 50 -100 100 rcurveto 0 400 rlineto 60 0 rlineto 0 -400 rlineto 0 -50 50 -100 100 -100 rcurveto -50 0 -100 -50 -100 -100 rcurveto 0 -400 rlineto fill } def /Crb { 500 setC 0 -150 -50 -250 -200 -250 0 -750 0 -150 -50 -210 -140 -250 0 -730 220 750 C.brk.end } def /Clc { 500 setC C.bv 280 C.barc } def /Clf { 500 setC C.bv 280 C.barf } def /Crc { 500 setC C.bv 40 C.barc } def /Crf { 500 setC C.bv 40 C.barf } def /Cbr { 0 0 -50 -250 0 1000 setcachedevice 40 C.setl 0 -250 moveto 0 1000 rlineto stroke } def /Crn { 500 setC 40 C.setl 0 895 moveto 500 0 rlineto stroke } def /Cci { 1000 0 -50 -250 1000 1000 setcachedevice 40 C.setl 500 250 400 0 360 arc stroke } def /C|| { 170 0 -50 -250 170 1000 setcachedevice } def /C^^ { 80 0 -50 -250 80 1000 setcachedevice } def /Cr1 { 800 0 -50 -250 800 1000 setcachedevice 40 C.setl 0 setlinejoin 700 180 moveto -650 currentlinewidth add 0 rlineto 200 -200 rlineto 50 360 moveto 650 currentlinewidth sub 0 rlineto -200 200 rlineto stroke } def /Cr2 { 800 0 -50 -250 800 1000 setcachedevice 40 C.setl 2 setlinejoin 217 18 moveto -150 150 rlineto 150 150 rlineto -150 -150 rlineto 633 0 rlineto 50 360 moveto 633 0 rlineto -150 150 rlineto 150 -150 rlineto -150 -150 rlineto stroke } def end def /BuildChar { $workingdict begin /charcode exch def /fontdict exch def fontdict /CharProcs get begin fontdict /Encoding get charcode get load gsave 0 setlinecap 0 setgray newpath exec grestore end end } def end /BracketFont BracketFontDict definefont pop /f.R /Times-Roman findfont def /f.I /Times-Italic findfont def /f.B /Times-Bold findfont def /f.BI /Times-BoldItalic findfont def /f.H /Helvetica findfont def /f.HB /Helvetica-Bold findfont def /f.HO /Helvetica-Oblique findfont def /f.HX /Helvetica-BoldOblique findfont def /f.C /Courier findfont def /f.CB /Courier-Bold findfont def /f.CO /Courier-Oblique findfont def /f.CX /Courier-BoldOblique findfont def /f.BR /Bookman-Light findfont def /f.BO /Bookman-LightItalic findfont def /f.BB /Bookman-Demi findfont def /f.BX /Bookman-DemiItalic findfont def /f.S /Symbol findfont def /f.S2 /BracketFont findfont def 0.0 10 10 f.R ft save home %%EndProlog 0 Y %%Page: 1 1 694 X 480 Y(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4852 X(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 0.0 9 9 f.B ft(NAME)s 992 X 0.0 9 9 f.S2 ft(O)s 1030 X(O)s 1068 X(O)s 1106 X(O)s 1144 X(O)s 694 X 1080 Y 1054 X 0.0 10 10 f.R ft(wwwstat)s 1434 X(\261)s 1509 X(summarize)s 1972 X(WWW)s 2279 X(server)s 2547 X(\(httpd\))s 2844 X(access)s 3123 X(statistics)s 694 X 1248 Y 0.0 9 9 f.B ft(SYNOPSIS)s 1157 X 0.0 9 9 f.S2 ft(O)s 1195 X(O)s 1233 X(O)s 1271 X(O)s 1309 X(O)s 694 X 1368 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1450 X 0.0 10 10 f.R ft([)s 0.0 10 10 f.B ft(\261F)s 1619 X 0.0 10 10 f.I ft(system_con\256g)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft(])s 2245 X([)s 0.0 10 10 f.B ft(\261f)s 2386 X 0.0 10 10 f.I ft(user_con\256g)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft(])s 2918 X([)s 0.0 10 10 f.I ft(options)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft(...])s 3387 X([)s 0.0 10 10 f.B ft(--)s 0.0 10 10 f.R ft(])s 3544 X([)s 3602 X 0.0 10 10 f.I ft(summary)s 0.0 10 10 f.S2 ft(P)s 4001 X 0.0 10 10 f.R ft(|)s 4046 X 0.0 10 10 f.I ft(log\256le)s 0.0 10 10 f.S2 ft(P)s 4329 X 0.0 10 10 f.R ft(|)s 4374 X 0.0 10 10 f.B ft(+)s 4456 X 0.0 10 10 f.R ft(|)s 4501 X 0.0 10 10 f.B ft(\261)s 4576 X 0.0 10 10 f.R ft(]...)s 694 X 1536 Y 0.0 9 9 f.B ft(DESCRIPTION)s 1342 X 0.0 9 9 f.S2 ft(O)s 1380 X(O)s 1418 X(O)s 1456 X(O)s 1494 X(O)s 694 X 1656 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1459 X 0.0 10 10 f.R ft(reads)s 1703 X(a)s 1781 X(sequence)s 2180 X(of)s 2297 X 0.0 10 10 f.B ft(httpd)s 2565 X 0.0 10 10 f.R ft(common)s 2949 X(log\256le)s 3239 X(format)s 3539 X(\(CLF\))s 3823 X(access_log)s 4288 X(\256les)s 4488 X(and/or)s 4776 X(prior)s 5003 X 0.0 10 10 f.B ft(wwwstat)s 694 X 1776 Y 1054 X 0.0 10 10 f.R ft(output)s 1335 X(summary)s 1732 X(\256les)s 1924 X(and/or)s 2204 X(the)s 2351 X(standard)s 2714 X(input)s 2945 X(and)s 3114 X(outputs)s 3434 X(a)s 3503 X(summary)s 3900 X(of)s 4008 X(the)s 4155 X(access)s 4434 X(statistics)s 4804 X(in)s 4907 X(HTML.)s 694 X 1944 Y 1054 X(Since)s 1309 X 0.0 10 10 f.B ft(wwwstat)s 1713 X 0.0 10 10 f.R ft(does)s 1929 X(not)s 2090 X(make)s 2339 X(any)s 2516 X(changes)s 2870 X(to)s 2981 X(the)s 3136 X(input)s 3375 X(\256les)s 3574 X(or)s 3689 X(write)s 3926 X(any)s 4102 X(\256les)s 4301 X(in)s 4411 X(the)s 4565 X(server)s 4840 X(directories,)s 5318 X(it)s 694 X 2064 Y 1054 X(can)s 1230 X(be)s 1362 X(run)s 1533 X(by)s 1671 X(any)s 1853 X(user)s 2056 X(with)s 2271 X(read)s 2479 X(access)s 2770 X(to)s 2885 X(the)s 3044 X(input)s 3287 X(log\256le\(s\))s 3685 X(and)s 3866 X(summary)s 4275 X(\256le\(s\).)s 4595 X(This)s 4810 X(allows)s 5108 X(people)s 694 X 2184 Y 1054 X(other)s 1284 X(than)s 1481 X(the)s 1628 X(webmaster)s 2085 X(to)s 2188 X(run)s 2346 X(specialized)s 2814 X(analyses)s 3177 X(of)s 3285 X(just)s 3455 X(the)s 3602 X(things)s 3872 X(they)s 4069 X(are)s 4215 X(interested)s 4628 X(in)s 4731 X(summarizing.)s 694 X 2352 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1460 X 0.0 10 10 f.R ft(provides)s 1839 X(World)s 2129 X(Wide)s 2380 X(Web)s 2603 X(\(WWW\))s 2986 X(access)s 3275 X(statistics,)s 3680 X(which)s 3959 X(does)s 4177 X(not)s 4340 X(necessarily)s 4818 X(correspond)s 5296 X(to)s 694 X 2472 Y 1054 X(statistics)s 1425 X(on)s 1551 X(individual)s 1983 X(users.)s 2239 X(It)s 2326 X(counts)s 2613 X(the)s 2761 X(number)s 3092 X(of)s 3201 X 0.0 10 10 f.B ft(HTTP)s 3500 X 0.0 10 10 f.R ft(requests)s 3853 X(received)s 4216 X(by)s 4342 X(the)s 4490 X(server)s 4758 X(and)s 4927 X(the)s 5074 X(amount)s 694 X 2592 Y 1054 X(of)s 1169 X(bytes)s 1412 X(transmitted)s 1894 X(in)s 2004 X(response)s 2385 X(to)s 2495 X(those)s 2738 X(requests,)s 3122 X(according)s 3547 X(to)s 3657 X(what)s 3883 X(is)s 3982 X(in)s 4092 X(the)s 4245 X(log\256le\(s\),)s 4662 X(and)s 4837 X(outputs)s 5163 X(those)s 694 X 2712 Y 1054 X(counts)s 1340 X(as)s 1448 X(tables)s 1706 X(broken)s 2008 X(down)s 2255 X(by)s 2380 X(category)s 2748 X(of)s 2856 X(request.)s 694 X 2880 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1461 X 0.0 10 10 f.R ft(output)s 1753 X(summaries)s 2222 X(can)s 2396 X(be)s 2526 X(read)s 2733 X(by)s 2868 X 0.0 10 10 f.B ft(gwstat)s 3180 X 0.0 10 10 f.R ft(to)s 3293 X(produce)s 3649 X(fancy)s 3905 X(graphs)s 4206 X(of)s 4324 X(the)s 4481 X(summarized)s 5004 X(statistics.)s 694 X 3000 Y 1054 X(The)s 1234 X 0.0 10 10 f.B ft(splitlog)s 1571 X 0.0 10 10 f.R ft(program)s 1934 X(can)s 2097 X(be)s 2216 X(used)s 2424 X(to)s 2527 X(split)s 2725 X(a)s 2794 X(large)s 3018 X(log\256le)s 3299 X(into)s 3480 X(separate)s 3831 X(\256les)s 4023 X(by)s 4148 X(entry)s 4378 X(pre\256x)s 4636 X(or)s 4744 X(URL)s 4969 X(path.)s 694 X 3168 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1455 X 0.0 10 10 f.R ft(is)s 1552 X(a)s 1625 X 0.0 10 10 f.B ft(perl)s 1826 X 0.0 10 10 f.R ft(script,)s 2102 X(which)s 2375 X(means)s 2659 X(you)s 2838 X(need)s 3055 X(to)s 3162 X(have)s 3379 X(a)s 3452 X 0.0 10 10 f.B ft(perl)s 3653 X 0.0 10 10 f.R ft(interpreter)s 4097 X(to)s 4204 X(run)s 4366 X(the)s 4517 X(program.)s 4934 X(It)s 5024 X(has)s 5186 X(been)s 694 X 3288 Y 1054 X(tested)s 1312 X(with)s 1515 X 0.0 10 10 f.B ft(perl)s 1712 X 0.0 10 10 f.R ft(versions)s 2070 X(4.036)s 2320 X(and)s 2489 X(5.002.)s 694 X 3456 Y 874 X 0.0 9 9 f.B ft(Output)s 1177 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Sections)s 1530 X 0.0 9 9 f.S2 ft(O)s 1568 X(O)s 1606 X(O)s 1644 X(O)s 694 X 3576 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 0.0 10 10 f.R ft('s)s 1530 X(output)s 1819 X(consists)s 2169 X(of)s 2285 X(a)s 2362 X(set)s 2506 X(of)s 2622 X(cross-reference)s 3262 X(links,)s 3515 X(the)s 3670 X(sum)s 3870 X(totals)s 4120 X(and)s 4297 X(averages)s 4678 X(for)s 4827 X(the)s 4981 X(processed)s 694 X 3696 Y 1054 X(data,)s 1286 X(and)s 1471 X(a)s 1556 X(sequence)s 1962 X(of)s 2086 X(amount-by-category)s 2936 X(tables)s 3210 X(partitioned)s 3683 X(into)s 3879 X(sections.)s 4291 X(The)s 4486 X(section)s 4809 X(categories)s 5253 X(are)s 694 X 3816 Y 1054 X(based)s 1308 X(on)s 1435 X(the)s 1584 X(characteristics)s 2181 X(evident)s 2502 X(from)s 2723 X(the)s 2872 X(access)s 3153 X(request,)s 3493 X(as)s 3603 X(provided)s 3985 X(by)s 4112 X(the)s 4261 X(common)s 4638 X(log\256le)s 4921 X(format)s 5214 X(\(see)s 694 X 3936 Y 1054 X 0.0 10 10 f.B ft(NOTES)s 0.0 10 10 f.R ft(\).)s 1502 X(These)s 1765 X(include:)s 694 X 4104 Y 1054 X(Request)s 1401 X(Date)s 2054 X(e.g.,)s 2248 X("Feb)s 2489 X(2)s 2564 X(1996")s 694 X 4272 Y 1054 X(Request)s 1401 X(Hour)s 2054 X(e.g.,)s 2248 X("00")s 2455 X(through)s 2791 X("23")s 694 X 4440 Y 1054 X(Client)s 1324 X(Domain)s 2054 X(The)s 2278 X(Fully-Quali\256ed)s 2964 X(Domain)s 3355 X(Name)s 3662 X(\(FQDN\))s 4069 X(su)s /Cff { (f) show xsiz pt 20 div neg 0 rmoveto (f) s } def Cff(ix)s 4366 X(that)s 4584 X(corresponds)s 5134 X(to)s 5280 X(an)s 694 X 4560 Y 2054 X(organization)s 2578 X(type)s 2775 X(or)s 2883 X(country)s 3213 X(name.)s 694 X 4728 Y 1054 X(Reversed)s 1450 X(Subdomain)s 2054 X(The)s 2246 X(FQDN,)s 2579 X(usually)s 2904 X(minus)s 3185 X(the)s 3343 X(\256rst)s 3535 X(\(machine)s 3942 X(name\))s 4227 X(component,)s 4732 X(and)s 4912 X(reversed)s 5285 X(so)s 694 X 4848 Y 2054 X(that)s 2229 X(it)s 2310 X(is)s 2402 X(easier)s 2659 X(to)s 2762 X(read)s 2958 X(when)s 3199 X(sorted.)s 694 X 5016 Y 1054 X(URL/Archive)s 2054 X(Grouping)s 2462 X(based)s 2714 X(on)s 2839 X(Request-URI)s 3391 X(or)s 3499 X(non-success)s 4006 X(status)s 4259 X(code.)s 694 X 5184 Y 1054 X(Identity)s 2054 X(The)s 2234 X(user)s 2425 X(identity)s 2756 X(based)s 3008 X(on)s 3133 X(IdentityCheck)s 3724 X(token)s 3971 X(or)s 4079 X(Authorization)s 4659 X(\256eld.)s 694 X 5352 Y 1054 X(Each)s 1290 X(section)s 1610 X(can)s 1784 X(be)s 1914 X(enabled/disabled)s 2621 X(using)s 2874 X(the)s 3032 X(con\256guration)s 3601 X(\256les)s 3804 X(or)s 3923 X(command-line)s 4536 X(options)s 4867 X(\(see)s 5063 X 0.0 10 10 f.B ft(Section)s 694 X 5472 Y 1054 X(Display)s 1402 X(Options)s 0.0 10 10 f.R ft(\).)s 694 X 5640 Y 874 X 0.0 9 9 f.B ft(Output)s 1177 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Table)s 1435 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Format)s 1763 X 0.0 9 9 f.S2 ft(O)s 1801 X(O)s 1839 X(O)s 694 X 5760 Y 1054 X 0.0 10 10 f.R ft(Inside)s 1323 X(each)s 1530 X(section,)s 1863 X(the)s 2010 X(statistics)s 2380 X(are)s 2526 X(presented)s 2933 X(as)s 3041 X(a)s 3110 X(preformatted)s 3650 X(table.)s 694 X 5928 Y 1054 X 0.0 10 10 f.C ft(%Reqs)s 1414 X(%Byte)s 1834 X(Bytes)s 2194 X(Sent)s 2554 X(Requests)s 3179 X 0.0 10 10 f.I ft(category-type)s 694 X 6048 Y 1054 X 0.0 10 10 f.C ft(-----)s 1414 X(-----)s 1774 X(------------)s 2554 X(--------)s 3094 X(|---------------)s 694 X 6168 Y 1054 X(NN.NN)s 1414 X(NN.NN)s 1774 X(NNNNNNNNNNNN)s 2554 X(NNNNNNNN)s 3094 X(|)s 3179 X 0.0 10 10 f.I ft(category-value)s 694 X 6288 Y 1054 X 0.0 10 10 f.C ft(100.0)s 1414 X(100.0)s 1774 X(NNNNNNNNNNNN)s 2554 X(NNNNNNNN)s 3094 X(|)s 3179 X 0.0 10 10 f.I ft(category-value)s 694 X 6456 Y 1054 X 0.0 10 10 f.R ft(Requests)s 1654 X(Requests)s 2040 X(received)s 2402 X(for)s 2543 X(this)s 2713 X(category-value.)s 694 X 6576 Y 1054 X(Bytes)s 1307 X(Sent)s 1654 X(Bytes)s 1907 X(transmitted)s 2382 X(for)s 2523 X(this)s 2693 X(category-value.)s 694 X 6696 Y 1054 X(%Reqs)s 1654 X(\(/\))s 0.0 10 10 f.S ft(*)s 0.0 10 10 f.R ft(100.)s 694 X 6816 Y 1054 X(%Byte)s 1654 X(\(/\))s 0.0 10 10 f.S ft(*)s 0.0 10 10 f.R ft(100.)s 694 X 6984 Y 1054 X(The)s 1238 X(table)s 1461 X(can)s 1628 X(be)s 1751 X(sorted)s 2024 X(by)s 2153 X(category-value)s 2774 X(\()s 0.0 10 10 f.B ft(\261sort)s 3051 X(key)s 0.0 10 10 f.R ft(\),)s 3287 X(number)s 3620 X(of)s 3731 X(requests)s 4086 X(received)s 4451 X(\()s 0.0 10 10 f.B ft(\261sort)s 4728 X(req)s 0.0 10 10 f.R ft(\),)s 4958 X(or)s 5069 X(number)s 694 X 7104 Y 1054 X(of)s 1162 X(bytes)s 1398 X(received)s 1760 X(\()s 0.0 10 10 f.B ft(\261sort)s 2034 X(byte)s 0.0 10 10 f.R ft(\).)s 2325 X(It)s 2411 X(can)s 2574 X(also)s 2760 X(be)s 2879 X(limited)s 3188 X(to)s 3291 X(the)s 3438 X 0.0 10 10 f.B ft(\261top)s 3652 X 0.0 10 10 f.I ft(N)s 3744 X 0.0 10 10 f.R ft(entries.)s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(1)s 7920 Y page 0.0 10 10 f.R ft %%Page: 2 2 694 X 480 Y(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4852 X(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 0.0 9 9 f.B ft(OPTIONS)s 1122 X 0.0 9 9 f.S2 ft(O)s 1160 X(O)s 1198 X(O)s 1236 X(O)s 1274 X(O)s 694 X 1080 Y 874 X 0.0 9 9 f.B ft(Con\256guration)s 1437 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Options)s 1780 X 0.0 9 9 f.S2 ft(O)s 1818 X(O)s 1856 X(O)s 1894 X(O)s 694 X 1200 Y 1054 X 0.0 10 10 f.R ft(These)s 1317 X(options)s 1637 X(de\256ne)s 1906 X(how)s 2103 X 0.0 10 10 f.B ft(wwwstat)s 2499 X 0.0 10 10 f.R ft(should)s 2791 X(establish)s 3166 X(defaults)s 3507 X(and)s 3676 X(interpret)s 4039 X(the)s 4186 X(command-line.)s 694 X 1368 Y 1054 X 0.0 10 10 f.B ft(\261F)s 1190 X 0.0 10 10 f.I ft(\256lename)s 694 X 1488 Y 1414 X 0.0 10 10 f.R ft(Get)s 1589 X(system)s 1898 X(con\256guration)s 2462 X(defaults)s 2809 X(from)s 3034 X(the)s 3187 X(given)s 3440 X(\256le.)s 3649 X(If)s 3746 X(used,)s 3985 X(this)s 4161 X 0.0 10 10 f.B ft(must)s 4403 X 0.0 10 10 f.R ft(be)s 4528 X(the)s 4681 X(\256rst)s 4867 X(argument)s 5274 X(on)s 694 X 1608 Y 1414 X(the)s 1575 X(command-line,)s 2216 X(since)s 2460 X(it)s 2555 X(needs)s 2821 X(to)s 2938 X(be)s 3071 X(interpreted)s 3542 X(before)s 3835 X(the)s 3995 X(other)s 4238 X(command)s 4670 X(options.)s 5053 X(The)s 5246 X(\256le)s 694 X 1728 Y 1414 X 0.0 10 10 f.B ft(wwwstat.rc)s 1937 X 0.0 10 10 f.R ft(is)s 2043 X(included)s 2426 X(with)s 2643 X(the)s 2804 X(distribution)s 3305 X(as)s 3427 X(an)s 3560 X(example)s 3937 X(of)s 4059 X(this)s 4243 X(\256le;)s 4438 X(it)s 4533 X(contains)s 4904 X 0.0 10 10 f.B ft(perl)s 5114 X 0.0 10 10 f.R ft(source)s 694 X 1848 Y 1414 X(code)s 1629 X(which)s 1900 X(directly)s 2232 X(sets)s 2409 X(the)s 2558 X(control)s 2867 X(and)s 3037 X(display)s 3352 X(options)s 3673 X(provided)s 4054 X(by)s 4180 X 0.0 10 10 f.B ft(wwwstat)s 0.0 10 10 f.R ft(.)s 4627 X(If)s 4719 X 0.0 10 10 f.I ft(\256lename)s 5083 X 0.0 10 10 f.R ft(is)s 5176 X(not)s 5330 X(a)s 694 X 1968 Y 1414 X(pathname,)s 1865 X(the)s 2025 X(include)s 2357 X(path)s 2567 X(\(see)s 2765 X 0.0 10 10 f.B ft(FILES)s 0.0 10 10 f.R ft(\))s 3126 X(is)s 3231 X(searched)s 3617 X(for)s 3771 X 0.0 10 10 f.I ft(\256lename)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft(.)s 4205 X(An)s 4364 X(empty)s 4651 X(string)s 4916 X(as)s 5036 X 0.0 10 10 f.I ft(\256lename)s 694 X 2088 Y 1414 X 0.0 10 10 f.R ft(will)s 1595 X(disable)s 1903 X(this)s 2073 X(feature.)s 2424 X([)s 0.0 10 10 f.B ft(\261F)s 2593 X 0.0 10 10 f.R ft("wwwstat.rc"])s 694 X 2256 Y 1054 X 0.0 10 10 f.B ft(\261f)s 1162 X 0.0 10 10 f.I ft(\256lename)s 694 X 2376 Y 1414 X 0.0 10 10 f.R ft(Get)s 1588 X(user)s 1784 X(con\256guration)s 2347 X(defaults)s 2693 X(from)s 2917 X(the)s 3069 X(given)s 3321 X(\256le.)s 3504 X(If)s 3600 X(used,)s 3838 X(this)s 4013 X 0.0 10 10 f.B ft(must)s 4254 X 0.0 10 10 f.R ft(be)s 4378 X(the)s 4530 X(\256rst)s 4716 X(argument)s 5123 X(on)s 5252 X(the)s 694 X 2496 Y 1414 X(command-line)s 2019 X(after)s 2229 X 0.0 10 10 f.B ft(\261F)s 2367 X 0.0 10 10 f.R ft(\(if)s 2488 X(any\).)s 2717 X(The)s 2899 X(\256le)s 3054 X(is)s 3148 X(the)s 3297 X(same)s 3529 X(format)s 3822 X(as)s 3932 X(for)s 4075 X(the)s 4224 X 0.0 10 10 f.B ft(\261F)s 4362 X 0.0 10 10 f.R ft(option)s 4645 X(\(see)s 4832 X 0.0 10 10 f.B ft(wwwstat.rc)s 0.0 10 10 f.R ft(\).)s 694 X 2616 Y 1414 X(If)s 1514 X 0.0 10 10 f.I ft(\256lename)s 1886 X 0.0 10 10 f.R ft(is)s 1987 X(not)s 2149 X(a)s 2227 X(pathname,)s 2674 X(the)s 2829 X(include)s 3156 X(path)s 3361 X(\(see)s 3554 X 0.0 10 10 f.B ft(FILES)s 0.0 10 10 f.R ft(\))s 3910 X(is)s 4010 X(searched)s 4391 X(for)s 4540 X 0.0 10 10 f.I ft(\256lename)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft(.)s 4969 X(An)s 5124 X(empty)s 694 X 2736 Y 1414 X(string)s 1667 X(as)s 1775 X 0.0 10 10 f.I ft(\256lename)s 2138 X 0.0 10 10 f.R ft(will)s 2319 X(disable)s 2627 X(this)s 2797 X(feature.)s 3148 X([)s 0.0 10 10 f.B ft(\261f)s 3289 X 0.0 10 10 f.R ft(".wwwstatrc"])s 694 X 2904 Y 1054 X 0.0 10 10 f.B ft(--)s 1414 X 0.0 10 10 f.R ft(Last)s 1611 X(option)s 1892 X(\(the)s 2072 X(remaining)s 2502 X(arguments)s 2943 X(are)s 3089 X(treated)s 3385 X(as)s 3493 X(input)s 3724 X(\256les\).)s 694 X 3072 Y 874 X 0.0 9 9 f.B ft(Diagnostic)s 1302 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Options)s 1645 X 0.0 9 9 f.S2 ft(O)s 1683 X(O)s 1721 X(O)s 1759 X(O)s 694 X 3192 Y 1054 X 0.0 10 10 f.R ft(These)s 1329 X(options)s 1661 X(provide)s 2003 X(information)s 2512 X(about)s 2771 X 0.0 10 10 f.B ft(wwwstat)s 3178 X 0.0 10 10 f.R ft(usage)s 3441 X(or)s 3560 X(about)s 3818 X(some)s 4065 X(unusual)s 4412 X(aspects)s 4736 X(of)s 4855 X(the)s 5013 X(log\256le\(s\))s 694 X 3312 Y 1054 X(being)s 1301 X(processed.)s 694 X 3480 Y 1054 X 0.0 10 10 f.B ft(\261h)s 1414 X 0.0 10 10 f.R ft(Help)s 1633 X(\320)s 1758 X(display)s 2072 X(usage)s 2324 X(information)s 2821 X(to)s 2924 X(STDERR)s 3333 X(and)s 3502 X(then)s 3699 X(exit.)s 694 X 3648 Y 1054 X 0.0 10 10 f.B ft(\261v)s 1414 X 0.0 10 10 f.R ft(Verbose)s 1771 X(display)s 2085 X(to)s 2188 X(STDERR)s 2597 X(of)s 2705 X(each)s 2912 X(log)s 3065 X(entry)s 3295 X(processed.)s 694 X 3816 Y 1054 X 0.0 10 10 f.B ft(\261x)s 1414 X 0.0 10 10 f.R ft(Display)s 1750 X(to)s 1853 X(STDERR)s 2262 X(all)s 2387 X(requests)s 2739 X(resulting)s 3114 X(in)s 3217 X(HTTP)s 3492 X(error)s 3710 X(responses.)s 694 X 3984 Y 1054 X 0.0 10 10 f.B ft(\261e)s 1414 X 0.0 10 10 f.R ft(Display)s 1752 X(to)s 1857 X(STDERR)s 2268 X(all)s 2395 X(invalid)s 2700 X(log)s 2855 X(entries.)s 3173 X(Invalid)s 3483 X(log)s 3638 X(entries)s 3931 X(can)s 4096 X(occur)s 4343 X(if)s 4430 X(the)s 4578 X(server)s 4847 X(is)s 4940 X(miswriting)s 694 X 4104 Y 1414 X(or)s 1533 X(overwriting)s 2035 X(its)s 2166 X(own)s 2374 X(log,)s 2563 X(if)s 2660 X(the)s 2818 X(request)s 3142 X(is)s 3245 X(made)s 3497 X(by)s 3633 X(a)s 3712 X(broken)s 4024 X(client)s 4281 X(or)s 4399 X(proxy,)s 4692 X(or)s 4810 X(if)s 4906 X(a)s 4985 X(malicious)s 694 X 4224 Y 1414 X(attacker)s 1765 X(is)s 1868 X(trying)s 2143 X(to)s 2257 X(gain)s 2465 X(privileged)s 2906 X(access)s 3196 X(to)s 3310 X(your)s 3529 X(system.)s 3893 X(For)s 4068 X(the)s 4225 X(latter)s 4465 X(reason,)s 4785 X(the)s 4942 X(webmaster)s 694 X 4344 Y 1414 X(should)s 1706 X(run)s 1864 X 0.0 10 10 f.B ft(wwwstat)s 2260 X 0.0 10 10 f.R ft(with)s 2463 X(this)s 2633 X(option)s 2914 X(on)s 3039 X(a)s 3108 X(regular)s 3415 X(basis.)s 694 X 4512 Y 874 X 0.0 9 9 f.B ft(Display)s 1187 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Options)s 1530 X 0.0 9 9 f.S2 ft(O)s 1568 X(O)s 1606 X(O)s 1644 X(O)s 694 X 4632 Y 1054 X 0.0 10 10 f.R ft(These)s 1317 X(options)s 1637 X(modify)s 1951 X(the)s 2098 X(output)s 2379 X(format.)s 694 X 4800 Y 1054 X 0.0 10 10 f.B ft(\261H)s 1207 X 0.0 10 10 f.I ft(string)s 694 X 4920 Y 1414 X 0.0 10 10 f.R ft(Use)s 1594 X(the)s 1741 X(given)s 1988 X(string)s 2241 X(as)s 2349 X(the)s 2496 X(HTML)s 2804 X(title)s 2985 X(and)s 3154 X(heading)s 3495 X(for)s 3636 X(output.)s 694 X 5088 Y 1054 X 0.0 10 10 f.B ft(\261X)s 1201 X 0.0 10 10 f.I ft(string)s 694 X 5208 Y 1414 X 0.0 10 10 f.R ft(Use)s 1604 X(the)s 1761 X(given)s 2018 X(string)s 2280 X(as)s 2397 X(the)s 2553 X(cross-reference)s 3194 X(URL)s 3428 X(to)s 3540 X(the)s 3696 X(last)s 3869 X(summary)s 4275 X(output.)s 4615 X(Any)s 4821 X(occurrence)s 5291 X(of)s 694 X 5328 Y 1414 X(the)s 1563 X(characters)s 1993 X("%M")s 2274 X(or)s 2384 X("%Y")s 2648 X(are)s 2796 X(replaced)s 3160 X(by)s 3286 X(the)s 3434 X(month)s 3716 X(and)s 3886 X(year,)s 4108 X(respectively,)s 4641 X(of)s 4750 X(the)s 4898 X(month)s 5180 X(prior)s 694 X 5448 Y 1414 X(to)s 1517 X(the)s 1664 X(\256rst)s 1845 X(log)s 1998 X(entry)s 2228 X(date.)s 2469 X(The)s 2649 X(empty)s 2924 X(string)s 3177 X(will)s 3358 X(exclude)s 3693 X(any)s 3862 X(cross-reference.)s 694 X 5616 Y 1054 X 0.0 10 10 f.B ft(\261R)s 1414 X 0.0 10 10 f.R ft(Display)s 1764 X(the)s 1925 X(daily)s 2164 X(stats)s 2381 X(table)s 2614 X(sorted)s 2897 X(in)s 3014 X(reverse.)s 3365 X(This)s 3582 X(option)s 3877 X(is)s 3983 X(primarily)s 4394 X(for)s 4549 X(use)s 4721 X(with)s 4937 X(the)s 5097 X 0.0 10 10 f.B ft(gwstat)s 694 X 5736 Y 1414 X 0.0 10 10 f.R ft(program)s 1777 X(for)s 1918 X(producing)s 2348 X(graphs)s 2639 X(of)s 2747 X(the)s 2894 X(output.)s 694 X 5904 Y 1054 X 0.0 10 10 f.B ft(\261l)s 694 X 6024 Y 1054 X(\261L)s 1414 X 0.0 10 10 f.R ft(Do)s 1574 X(\()s 0.0 10 10 f.B ft(\261l)s 0.0 10 10 f.R ft(\))s 1756 X(or)s 1877 X(don't)s 2126 X(\()s 0.0 10 10 f.B ft(\261L)s 0.0 10 10 f.R ft(\))s 2347 X(display)s 2674 X(the)s 2834 X(full)s 3011 X(DNS)s 3249 X(hostname)s 3670 X(of)s 3791 X(clients)s 4090 X(in)s 4205 X(your)s 4425 X(local)s 4656 X(domain)s 4993 X(\(which)s 5307 X(is)s 694 X 6144 Y 1414 X(determined)s 1921 X(by)s 2079 X(the)s 2259 X(con\256gured)s 2744 X(value)s 3018 X(of)s 3159 X($AppendToLocalhost\))s 4121 X(in)s 4257 X(the)s 4437 X(section)s 4778 X(on)s 4935 X(subdomain)s 694 X 6264 Y 1414 X(statistics.)s 1834 X(The)s 2014 X(default)s 2316 X([)s 0.0 10 10 f.B ft(\261L)s 0.0 10 10 f.R ft(])s 2524 X(is)s 2616 X(to)s 2719 X(strip)s 2922 X(the)s 3069 X(machine)s 3432 X(name)s 3673 X(from)s 3892 X(local)s 4111 X(addresses.)s 694 X 6432 Y 1054 X 0.0 10 10 f.B ft(\261o)s 694 X 6552 Y 1054 X(\261O)s 1414 X 0.0 10 10 f.R ft(Do)s 1568 X(\()s 0.0 10 10 f.B ft(\261o)s 0.0 10 10 f.R ft(\))s 1766 X(or)s 1881 X(don't)s 2124 X(\()s 0.0 10 10 f.B ft(\261O)s 0.0 10 10 f.R ft(\))s 2350 X(display)s 2671 X(the)s 2825 X(full)s 2996 X(DNS)s 3228 X(hostname)s 3643 X(of)s 3758 X(clients)s 4051 X(outside)s 4372 X(your)s 4587 X(local)s 4812 X(domain)s 5143 X(in)s 5252 X(the)s 694 X 6672 Y 1414 X(section)s 1743 X(on)s 1889 X(subdomain)s 2374 X(statistics.)s 2815 X(The)s 3016 X(default)s 3338 X([)s 0.0 10 10 f.B ft(\261O)s 0.0 10 10 f.R ft(])s 3577 X(is)s 3689 X(to)s 3812 X(strip)s 4035 X(the)s 4202 X(machine)s 4585 X(name)s 4846 X(from)s 5085 X(outside)s 694 X 6792 Y 1414 X(addresses.)s 694 X 6960 Y 1054 X 0.0 10 10 f.B ft(\261u)s 694 X 7080 Y 1054 X(\261U)s 1414 X 0.0 10 10 f.R ft(Do)s 1578 X(\()s 0.0 10 10 f.B ft(\261u)s 0.0 10 10 f.R ft(\))s 1792 X(or)s 1917 X(don't)s 2170 X(\()s 0.0 10 10 f.B ft(\261U)s 0.0 10 10 f.R ft(\))s 2400 X(display)s 2731 X(the)s 2895 X(IP)s 3026 X(address)s 3367 X(of)s 3492 X(clients)s 3795 X(with)s 4015 X(unresolved)s 4495 X(domain)s 4837 X(names)s 5133 X(in)s 5252 X(the)s 694 X 7200 Y 1414 X(section)s 1723 X(on)s 1849 X(subdomain)s 2314 X(statistics.)s 2710 X(The)s 2891 X 0.0 10 10 f.B ft(\261dns)s 3118 X 0.0 10 10 f.R ft(option)s 3400 X(can)s 3564 X(be)s 3684 X(used)s 3893 X(to)s 3997 X(resolve)s 4311 X(some)s 4548 X(names,)s 4854 X(but)s 5007 X(not)s 5160 X(all)s 5285 X(IP)s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(2)s 7920 Y page 0.0 10 10 f.R ft %%Page: 3 3 694 X 480 Y(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4852 X(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 1414 X(hosts)s 1679 X(have)s 1926 X(a)s 2029 X(DNS)s 2287 X(name)s 2561 X(\(SLIP/PPP)s 3054 X(connections\))s 3622 X(and)s 3824 X(sometimes)s 4310 X(a)s 4412 X(host's)s 4709 X(DNS)s 4967 X(service)s 5307 X(is)s 694 X 1080 Y 1414 X(inaccessible.)s 1946 X(The)s 2126 X(default)s 2428 X([)s 0.0 10 10 f.B ft(\261U)s 0.0 10 10 f.R ft(])s 2641 X(is)s 2733 X(to)s 2836 X(group)s 3094 X(all)s 3219 X(such)s 3427 X(addresses)s 3834 X(under)s 4086 X(the)s 4233 X(category)s 4601 X("Unresolved".)s 694 X 1248 Y 1054 X 0.0 10 10 f.B ft(\261dns)s 694 X 1368 Y 1054 X(\261nodns)s 1414 X 0.0 10 10 f.R ft(Do)s 1589 X(\()s 0.0 10 10 f.B ft(\261dns)s 0.0 10 10 f.R ft(\))s 1909 X(or)s 2045 X(don't)s 2309 X(\()s 0.0 10 10 f.B ft(\261nodns)s 0.0 10 10 f.R ft(\))s 2735 X(use)s 2921 X(the)s 3096 X(system's)s 3499 X(hostname)s 3935 X(lookup)s 4266 X(facilities)s 4662 X(to)s 4792 X(\256nd)s 5000 X(the)s 5174 X(DNS)s 694 X 1488 Y 1414 X(hostname)s 1837 X(associated)s 2287 X(with)s 2505 X(any)s 2689 X(unresolved)s 3167 X(IP)s 3296 X(addresses.)s 3743 X(Looking)s 4122 X(up)s 4262 X(a)s 4346 X(DNS)s 4586 X(name)s 4842 X(may)s 5053 X(be)s 5186 X 0.0 10 10 f.B ft(very)s 694 X 1608 Y 1414 X 0.0 10 10 f.R ft(slow,)s 1654 X(particularly)s 2140 X(when)s 2382 X(the)s 2530 X(results)s 2817 X(are)s 2964 X(negative)s 3328 X(\(no)s 3487 X(DNS)s 3713 X(name\),)s 4013 X(which)s 4283 X(is)s 4376 X(why)s 4574 X(a)s 4644 X(caching)s 4980 X(capability)s 694 X 1728 Y 1414 X(is)s 1506 X(included)s 1875 X(as)s 1983 X(well.)s 2230 X([)s 0.0 10 10 f.B ft(\261nodns)s 0.0 10 10 f.R ft(])s 694 X 1896 Y 1054 X 0.0 10 10 f.B ft(\261cache)s 1367 X 0.0 10 10 f.I ft(\256lename)s 694 X 2016 Y 1414 X 0.0 10 10 f.R ft(Use)s 1599 X(the)s 1751 X(given)s 2003 X(DBM)s 2261 X(database)s 2634 X(as)s 2747 X(the)s 2899 X(read/write)s 3333 X(persistent)s 3746 X(DNS)s 3976 X(cache)s 4232 X(\(the)s 4416 X(.dir)s 4581 X(and)s 4754 X(.pag)s 4952 X(extensions)s 694 X 2136 Y 1414 X(are)s 1578 X(appended)s 2003 X(automatically\).)s 2648 X(Cached)s 2990 X(entries)s 3299 X(\(including)s 3753 X(negative)s 4134 X(results\))s 4471 X(are)s 4635 X(removed)s 5027 X(after)s 5252 X(the)s 694 X 2256 Y 1414 X(time)s 1620 X(con\256gured)s 2075 X(for)s 2219 X($DNSexpires)s 2785 X([two)s 2996 X(months].)s 3402 X(No)s 3552 X(caching)s 3890 X(is)s 3985 X(performed)s 4428 X(if)s 4516 X 0.0 10 10 f.I ft(\256lename)s 4881 X 0.0 10 10 f.R ft(is)s 4975 X(the)s 5124 X(empty)s 694 X 2376 Y 1414 X(string,)s 1713 X(which)s 2003 X(may)s 2221 X(be)s 2361 X(needed)s 2689 X(if)s 2795 X(your)s 3023 X(system)s 3346 X(does)s 3574 X(not)s 3747 X(support)s 4092 X(DBM)s 4365 X(or)s 4493 X(NDBM)s 4838 X(functionality.)s 694 X 2496 Y 1414 X(Running)s 1784 X 0.0 10 10 f.B ft(\261dns)s 2010 X 0.0 10 10 f.R ft(without)s 2341 X(a)s 2410 X(persistent)s 2818 X(cache)s 3069 X(is)s 3161 X(not)s 3314 X(recommended.)s 3954 X([)s 0.0 10 10 f.B ft(\261cache)s 4300 X 0.0 10 10 f.R ft("dnscache"])s 694 X 2664 Y 1054 X 0.0 10 10 f.B ft(\261trunc)s 1362 X 0.0 10 10 f.I ft(N)s 694 X 2784 Y 1414 X 0.0 10 10 f.R ft(Truncate)s 1816 X(the)s 1986 X(URLs)s 2272 X(listed)s 2536 X(in)s 2661 X(the)s 2830 X(archive)s 3170 X(section)s 3500 X(after)s 3729 X(the)s 3898 X 0.0 10 10 f.I ft(Nth)s 4090 X 0.0 10 10 f.R ft(hierarchy)s 4513 X(level.)s 4779 X(This)s 5004 X(option)s 5307 X(is)s 694 X 2904 Y 1414 X(commonly)s 1874 X(used)s 2089 X(to)s 2199 X(reduce)s 2496 X(the)s 2649 X(output)s 2936 X(size)s 3122 X(and)s 3297 X(memory)s 3661 X(requirements)s 4213 X(of)s 4327 X 0.0 10 10 f.B ft(wwwstat)s 4729 X 0.0 10 10 f.R ft(by)s 4860 X(grouping)s 5252 X(the)s 694 X 3024 Y 1414 X(requests)s 1770 X(by)s 1899 X(directory)s 2287 X(tree)s 2464 X(instead)s 2775 X(of)s 2886 X(listing)s 3165 X(every)s 3414 X(URL.)s 3692 X(The)s 3875 X(default)s 4180 X([)s 0.0 10 10 f.B ft(\261trunc)s 4524 X(0)s 0.0 10 10 f.R ft(])s 4635 X(is)s 4730 X(to)s 4836 X(display)s 5153 X(every)s 694 X 3144 Y 1414 X(requested)s 1821 X(URL.)s 694 X 3312 Y 1054 X 0.0 10 10 f.B ft(\261\256les)s 694 X 3432 Y 1054 X(\261no\256les)s 1414 X 0.0 10 10 f.R ft(Do)s 1569 X(\()s 0.0 10 10 f.B ft(\261\256les)s 0.0 10 10 f.R ft(\))s 1885 X(or)s 2001 X(don't)s 2245 X(\()s 0.0 10 10 f.B ft(\261no\256les)s 0.0 10 10 f.R ft(\))s 2667 X(include)s 2994 X(the)s 3149 X(last)s 3321 X(component)s 3798 X(of)s 3914 X(a)s 3991 X(URL)s 4224 X(\(usually)s 4579 X(the)s 4733 X(\256lename\))s 5142 X(in)s 5252 X(the)s 694 X 3552 Y 1414 X(archive)s 1734 X(section.)s 2069 X(This)s 2274 X(option)s 2557 X(is)s 2651 X(commonly)s 3106 X(used)s 3316 X(to)s 3421 X(reduce)s 3713 X(the)s 3861 X(output)s 4143 X(size)s 4324 X(and)s 4494 X(memory)s 4853 X(requirements)s 694 X 3672 Y 1414 X(of)s 1541 X 0.0 10 10 f.B ft(wwwstat)s 1956 X 0.0 10 10 f.R ft(by)s 2100 X(grouping)s 2505 X(the)s 2671 X(requests)s 3042 X(by)s 3186 X(directory)s 3590 X(instead)s 3917 X(of)s 4044 X(listing)s 4339 X(every)s 4604 X(URL.)s 4898 X(The)s 5097 X(default)s 694 X 3792 Y 1414 X([)s 0.0 10 10 f.B ft(\261\256les)s 0.0 10 10 f.R ft(])s 1722 X(is)s 1814 X(to)s 1917 X(display)s 2231 X(the)s 2378 X(entire)s 2630 X(requested)s 3037 X(URL.)s 694 X 3960 Y 1054 X 0.0 10 10 f.B ft(\261link)s 694 X 4080 Y 1054 X(\261nolink)s 1414 X 0.0 10 10 f.R ft(Do)s 1562 X(\()s 0.0 10 10 f.B ft(\261link)s 0.0 10 10 f.R ft(\))s 1872 X(or)s 1980 X(don't)s 2216 X(\()s 0.0 10 10 f.B ft(\261nolink)s 0.0 10 10 f.R ft(\))s 2631 X(add)s 2800 X(a)s 2869 X(hypertext)s 3271 X(link)s 3452 X(around)s 3754 X(each)s 3961 X(archive)s 4279 X(URL.)s 4554 X(This)s 4757 X(option)s 5038 X(is)s 5130 X(useful)s 694 X 4200 Y 1414 X(for)s 1568 X(local)s 1800 X(maintenance,)s 2367 X(but)s 2533 X(it)s 2627 X(is)s 2732 X(not)s 2898 X(recommended)s 3501 X(for)s 3655 X(publication)s 4143 X(of)s 4264 X(the)s 4424 X(HTML)s 4745 X(results)s 5043 X(\(it)s 5169 X(often)s 694 X 4320 Y 1414 X(results)s 1714 X(in)s 1831 X(links)s 2064 X(to)s 2180 X(temporary)s 2628 X(or)s 2749 X(nonexistant)s 3248 X(resources,)s 3687 X(and)s 3869 X(leads)s 4112 X(people/robots)s 4694 X(to)s 4810 X(resources)s 5224 X(that)s 694 X 4440 Y 1414 X(might)s 1673 X(not)s 1826 X(be)s 1945 X(publically)s 2370 X(available\).)s 2838 X([)s 0.0 10 10 f.B ft(\261nolink)s 0.0 10 10 f.R ft(])s 694 X 4608 Y 1054 X 0.0 10 10 f.B ft(\261cgi)s 694 X 4728 Y 1054 X(\261nocgi)s 1414 X 0.0 10 10 f.R ft(Do)s 1566 X(\()s 0.0 10 10 f.B ft(\261cgi)s 0.0 10 10 f.R ft(\))s 1834 X(or)s 1947 X(don't)s 2188 X(\()s 0.0 10 10 f.B ft(\261nocgi)s 0.0 10 10 f.R ft(\))s 2562 X(pre\256x)s 2825 X(the)s 2977 X(summary)s 3379 X(output)s 3665 X(with)s 3872 X(CGI)s 4073 X(header)s 4367 X(\256elds)s 4613 X(appropriate)s 5096 X(for)s 5241 X(use)s 694 X 4848 Y 1414 X(with)s 1624 X(the)s 1778 X(HTTP)s 2060 X(common)s 2442 X(gateway)s 2806 X(interface.)s 3235 X(Using)s 3505 X 0.0 10 10 f.B ft(wwwstat)s 3907 X 0.0 10 10 f.R ft(as)s 4021 X(a)s 4096 X(CGI)s 4299 X(script)s 4552 X(is)s 4650 X(not)s 4809 X(recommended)s 694 X 4968 Y 1414 X(\320)s 1546 X(it)s 1634 X(is)s 1733 X(usually)s 2054 X(better)s 2313 X(to)s 2423 X(simply)s 2727 X(run)s 2891 X(the)s 3044 X(wwwstat)s 3430 X(program)s 3799 X(periodically)s 4307 X(and)s 4482 X(serve)s 4723 X(the)s 4876 X(static)s 5118 X(output)s 694 X 5088 Y 1414 X(\256le.)s 1617 X([)s 0.0 10 10 f.B ft(\261nocgi)s 0.0 10 10 f.R ft(])s 694 X 5256 Y 874 X 0.0 9 9 f.B ft(Section)s 1177 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Display)s 1505 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Options)s 1848 X 0.0 9 9 f.S2 ft(O)s 1886 X(O)s 1924 X(O)s 694 X 5376 Y 1054 X 0.0 10 10 f.R ft(These)s 1322 X(options)s 1647 X(change)s 1959 X(the)s 2111 X(display)s 2430 X(of)s 2543 X(entire)s 2799 X(sections)s 3150 X(\(as)s 3295 X(opposed)s 3657 X(to)s 3764 X(the)s 3915 X(entries)s 4210 X(within)s 4495 X(those)s 4735 X(sections\).)s 5169 X(They)s 694 X 5496 Y 1054 X(allow)s 1310 X(the)s 1466 X(user)s 1666 X(to)s 1778 X(enable)s 2072 X(or)s 2189 X(disable)s 2506 X(an)s 2634 X(entire)s 2895 X(section,)s 3236 X(set)s 3380 X(the)s 3535 X(sorting)s 3846 X(method)s 4179 X(for)s 4328 X(that)s 4511 X(section,)s 4852 X(and)s 5029 X(limit)s 5252 X(the)s 694 X 5616 Y 1054 X(number)s 1387 X(of)s 1497 X(displayed)s 1907 X(entries)s 2200 X(for)s 2343 X(that)s 2520 X(section.)s 2880 X(These)s 3145 X(options)s 3467 X(are)s 3615 X(context-sensitive)s 4319 X(and)s 4490 X(processed)s 4910 X(in)s 5015 X(the)s 5164 X(order)s 694 X 5736 Y 1054 X(given.)s 694 X 5904 Y 1054 X 0.0 10 10 f.B ft(\261all)s 694 X 6024 Y 1054 X(\261noall)s 1414 X 0.0 10 10 f.R ft(Include)s 1742 X(\()s 0.0 10 10 f.B ft(\261all)s 0.0 10 10 f.R ft(\))s 1993 X(or)s 2105 X(exclude)s 2444 X(\()s 0.0 10 10 f.B ft(\261noall)s 0.0 10 10 f.R ft(\))s 2801 X(all)s 2930 X(of)s 3041 X(the)s 3191 X(display)s 3508 X(sections.)s 3883 X(The)s 4066 X 0.0 10 10 f.B ft(\261noall)s 4356 X 0.0 10 10 f.R ft(option)s 4640 X(is)s 4735 X(commonly)s 5191 X(used)s 694 X 6144 Y 1414 X(just)s 1607 X(prior)s 1849 X(to)s 1975 X(one)s 2167 X(or)s 2298 X(more)s 2551 X(of)s 2681 X(the)s 2850 X(other)s 3102 X(section)s 3432 X(options,)s 3799 X(such)s 4029 X(that)s 4226 X(only)s 4451 X(the)s 4620 X(listed)s 4884 X(sections)s 5253 X(are)s 694 X 6264 Y 1414 X(displayed.)s 694 X 6432 Y 1054 X 0.0 10 10 f.B ft(\261daily)s 694 X 6552 Y 1054 X(\261nodaily)s 694 X 6672 Y 1414 X 0.0 10 10 f.R ft(Include)s 1748 X(\()s 0.0 10 10 f.B ft(\261daily)s 0.0 10 10 f.R ft(\))s 2111 X(or)s 2229 X(exclude)s 2574 X(\()s 0.0 10 10 f.B ft(\261nodaily)s 0.0 10 10 f.R ft(\))s 3043 X(the)s 3199 X(section)s 3516 X(of)s 3633 X(statistics)s 4012 X(by)s 4146 X(request)s 4468 X(date)s 4668 X(and)s 4846 X(set)s 4991 X(the)s 5147 X(scope)s 694 X 6792 Y 1414 X(for)s 1555 X(later)s 1757 X 0.0 10 10 f.B ft(\261sort)s 1998 X 0.0 10 10 f.R ft(and)s 2167 X 0.0 10 10 f.B ft(\261top)s 2381 X 0.0 10 10 f.R ft(options)s 2701 X(to)s 2804 X(this)s 2974 X(section.)s 694 X 6960 Y 1054 X 0.0 10 10 f.B ft(\261hourly)s 694 X 7080 Y 1054 X(\261nohourly)s 694 X 7200 Y 1414 X 0.0 10 10 f.R ft(Include)s 1755 X(\()s 0.0 10 10 f.B ft(\261hourly)s 0.0 10 10 f.R ft(\))s 2197 X(or)s 2322 X(exclude)s 2674 X(\()s 0.0 10 10 f.B ft(\261nohourly)s 0.0 10 10 f.R ft(\))s 3222 X(the)s 3386 X(section)s 3711 X(of)s 3835 X(statistics)s 4221 X(by)s 4362 X(request)s 4691 X(hour)s 4915 X(and)s 5100 X(set)s 5252 X(the)s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(3)s 7920 Y page 0.0 10 10 f.R ft %%Page: 4 4 694 X 480 Y(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4852 X(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 1414 X(scope)s 1666 X(for)s 1807 X(later)s 2009 X 0.0 10 10 f.B ft(\261sort)s 2250 X 0.0 10 10 f.R ft(and)s 2419 X 0.0 10 10 f.B ft(\261top)s 2633 X 0.0 10 10 f.R ft(options)s 2953 X(to)s 3056 X(this)s 3226 X(section.)s 694 X 1128 Y 1054 X 0.0 10 10 f.B ft(\261domain)s 694 X 1248 Y 1054 X(\261nodomain)s 694 X 1368 Y 1414 X 0.0 10 10 f.R ft(Include)s 1738 X(\()s 0.0 10 10 f.B ft(\261domain)s 0.0 10 10 f.R ft(\))s 2202 X(or)s 2310 X(exclude)s 2645 X(\()s 0.0 10 10 f.B ft(\261nodomain)s 0.0 10 10 f.R ft(\))s 3215 X(the)s 3362 X(section)s 3670 X(of)s 3778 X(statistics)s 4148 X(by)s 4273 X(the)s 4420 X(client's)s 4739 X(Internet)s 5074 X(domain)s 694 X 1488 Y 1414 X(and)s 1583 X(set)s 1719 X(the)s 1866 X(scope)s 2118 X(for)s 2259 X(later)s 2461 X 0.0 10 10 f.B ft(\261sort)s 2702 X 0.0 10 10 f.R ft(and)s 2871 X 0.0 10 10 f.B ft(\261top)s 3085 X 0.0 10 10 f.R ft(options)s 3405 X(to)s 3508 X(this)s 3678 X(section.)s 694 X 1656 Y 1054 X 0.0 10 10 f.B ft(\261subdomain)s 694 X 1776 Y 1054 X(\261nosubdomain)s 694 X 1896 Y 1414 X 0.0 10 10 f.R ft(Include)s 1740 X(\()s 0.0 10 10 f.B ft(\261subdomain)s 0.0 10 10 f.R ft(\))s 2357 X(or)s 2467 X(exclude)s 2804 X(\()s 0.0 10 10 f.B ft(\261nosubdomain)s 0.0 10 10 f.R ft(\))s 3527 X(the)s 3676 X(section)s 3986 X(of)s 4096 X(statistics)s 4468 X(by)s 4595 X(the)s 4744 X(client's)s 5064 X(Internet)s 694 X 2016 Y 1414 X(subdomain)s 1878 X(\(reversed)s 2273 X(for)s 2414 X(display\))s 2761 X(and)s 2930 X(set)s 3066 X(the)s 3213 X(scope)s 3465 X(for)s 3606 X(later)s 3808 X 0.0 10 10 f.B ft(\261sort)s 4049 X 0.0 10 10 f.R ft(and)s 4218 X 0.0 10 10 f.B ft(\261top)s 4432 X 0.0 10 10 f.R ft(options)s 4752 X(to)s 4855 X(this)s 5025 X(section.)s 694 X 2184 Y 1054 X 0.0 10 10 f.B ft(\261archive)s 694 X 2304 Y 1054 X(\261noarchive)s 694 X 2424 Y 1414 X 0.0 10 10 f.R ft(Include)s 1740 X(\()s 0.0 10 10 f.B ft(\261archive)s 0.0 10 10 f.R ft(\))s 2199 X(or)s 2309 X(exclude)s 2646 X(\()s 0.0 10 10 f.B ft(\261noarchive)s 0.0 10 10 f.R ft(\))s 3211 X(the)s 3360 X(section)s 3669 X(of)s 3778 X(statistics)s 4149 X(by)s 4275 X(requested)s 4683 X(URL/archive)s 5230 X(and)s 694 X 2544 Y 1414 X(set)s 1550 X(the)s 1697 X(scope)s 1949 X(for)s 2090 X(later)s 2292 X 0.0 10 10 f.B ft(\261sort)s 2533 X 0.0 10 10 f.R ft(and)s 2702 X 0.0 10 10 f.B ft(\261top)s 2916 X 0.0 10 10 f.R ft(options)s 3236 X(to)s 3339 X(this)s 3509 X(section.)s 694 X 2712 Y 1054 X 0.0 10 10 f.B ft(\261r)s 694 X 2832 Y 1054 X(\261ident)s 694 X 2952 Y 1054 X(\261noident)s 694 X 3072 Y 1414 X 0.0 10 10 f.R ft(Include)s 1742 X(\()s 0.0 10 10 f.B ft(\261r)s 1898 X 0.0 10 10 f.R ft(or)s 2010 X 0.0 10 10 f.B ft(\261ident)s 0.0 10 10 f.R ft(\))s 2339 X(or)s 2451 X(exclude)s 2790 X(\()s 0.0 10 10 f.B ft(\261noident)s 0.0 10 10 f.R ft(\))s 3258 X(the)s 3409 X(section)s 3721 X(of)s 3833 X(statistics)s 4207 X(by)s 4336 X(the)s 4487 X(identity)s 4822 X(of)s 4934 X(the)s 5085 X(user)s 5280 X(\(if)s 694 X 3192 Y 1414 X(IdentityCheck)s 2006 X(is)s 2099 X(ON\))s 2302 X(or)s 2411 X(the)s 2559 X(authentication)s 3151 X(userid)s 3421 X(\(if)s 3541 X(supplied\))s 3939 X(and)s 4109 X(set)s 4246 X(the)s 4394 X(scope)s 4646 X(for)s 4787 X(later)s 4989 X 0.0 10 10 f.B ft(\261sort)s 5230 X 0.0 10 10 f.R ft(and)s 694 X 3312 Y 1414 X 0.0 10 10 f.B ft(\261top)s 1632 X 0.0 10 10 f.R ft(options)s 1956 X(to)s 2063 X(this)s 2237 X(section.)s 2598 X 0.0 10 10 f.B ft(DO)s 2776 X(NOT)s 3021 X(PUBLISH)s 3489 X 0.0 10 10 f.R ft(this)s 3662 X(information,)s 4187 X(as)s 4298 X(that)s 4476 X(would)s 4754 X(reveal)s 5025 X(security-)s 694 X 3432 Y 1414 X(related)s 1711 X(identities)s 2104 X(and)s 2274 X(be)s 2393 X(a)s 2462 X(violation)s 2843 X(of)s 2951 X(privacy.)s 3325 X(This)s 3528 X(option)s 3809 X(is)s 3901 X(provided)s 4281 X(for)s 4422 X(administrative)s 5019 X(purposes)s 694 X 3552 Y 1414 X(only.)s 694 X 3720 Y 1054 X 0.0 10 10 f.B ft(\261sort)s 1295 X 0.0 10 10 f.R ft(\()s 0.0 10 10 f.B ft(key|byte|req)s 0.0 10 10 f.R ft(\))s 694 X 3840 Y 1414 X(Sort)s 1617 X(this)s 1798 X(section)s 2117 X(by)s 2253 X(its)s 2384 X(primary)s 2736 X(key,)s 2941 X(the)s 3099 X(number)s 3440 X(of)s 3558 X(bytes)s 3804 X(transmitted,)s 4314 X(or)s 4432 X(the)s 4589 X(number)s 4929 X(of)s 5047 X(requests)s 694 X 3960 Y 1414 X(received.)s 1826 X([)s 0.0 10 10 f.B ft(\261sort)s 2100 X(key)s 0.0 10 10 f.R ft(])s 694 X 4128 Y 1054 X 0.0 10 10 f.B ft(\261top)s 1268 X 0.0 10 10 f.I ft(N)s 1414 X 0.0 10 10 f.R ft(Display)s 1754 X(only)s 1961 X(the)s 2112 X(top)s 2269 X(N)s 2370 X(entries)s 2665 X(for)s 2809 X(this)s 2982 X(section.)s 3318 X(This)s 3524 X(option)s 3808 X(assumes)s 4169 X(that)s 4347 X(the)s 4497 X 0.0 10 10 f.B ft(\261sort)s 4741 X 0.0 10 10 f.R ft(option)s 5025 X(has)s 5186 X(been)s 694 X 4248 Y 1414 X(set)s 1550 X(to)s 1653 X(either)s 1905 X(bytes)s 2141 X(or)s 2249 X(requests.)s 694 X 4416 Y 1054 X 0.0 10 10 f.B ft(\261both)s 1414 X 0.0 10 10 f.R ft(Display)s 1751 X(both)s 1955 X(the)s 2103 X(top)s 2257 X(N)s 2355 X(entries)s 2647 X(for)s 2789 X(this)s 2960 X(section)s 3269 X([10,)s 3452 X(sorted)s 3721 X(by)s 3846 X(requests],)s 4256 X(and)s 4425 X(then)s 4622 X(the)s 4769 X(full)s 4933 X(section)s 5241 X(\(all)s 694 X 4536 Y 1414 X(entries\))s 1738 X(sorted)s 2007 X(by)s 2132 X(key.)s 694 X 4704 Y 874 X 0.0 9 9 f.B ft(Search)s 1162 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Options)s 1505 X 0.0 9 9 f.S2 ft(O)s 1543 X(O)s 1581 X(O)s 1619 X(O)s 694 X 4824 Y 1054 X 0.0 10 10 f.R ft(These)s 1325 X(options)s 1653 X(are)s 1807 X(used)s 2023 X(to)s 2134 X(limit)s 2357 X(the)s 2512 X(analysis)s 2867 X(to)s 2978 X(requests)s 3337 X(matching)s 3741 X(a)s 3817 X(pattern.)s 4176 X(The)s 4363 X(pattern)s 4672 X(is)s 4771 X(supplied)s 5142 X(in)s 5252 X(the)s 694 X 4944 Y 1054 X(form)s 1279 X(of)s 1393 X(a)s 1467 X 0.0 10 10 f.B ft(perl)s 1669 X(regular)s 2015 X(expression)s 0.0 10 10 f.R ft(,)s 2520 X(except)s 2810 X(that)s 2990 X(the)s 3142 X(characters)s 3575 X("+")s 3743 X(and)s 3917 X(".")s 4054 X(are)s 4205 X(escaped)s 4550 X(automatically)s 5124 X(unless)s 694 X 5064 Y 1054 X(the)s 1214 X 0.0 10 10 f.B ft(\261noescape)s 1685 X 0.0 10 10 f.R ft(option)s 1979 X(is)s 2084 X(given.)s 2394 X(Enclose)s 2748 X(the)s 2908 X(pattern)s 3223 X(in)s 3339 X(single-quotes)s 3910 X(to)s 4026 X(prevent)s 4363 X(the)s 4523 X(command)s 4954 X(shell)s 5180 X(from)s 694 X 5184 Y 1054 X(interpreting)s 1545 X(some)s 1781 X(special)s 2083 X(characters.)s 694 X 5352 Y 1054 X(Multiple)s 1425 X(occurrences)s 1926 X(of)s 2035 X(the)s 2183 X(same)s 2414 X(option)s 2696 X(results)s 2983 X(in)s 3087 X(an)s 3207 X(OR-ing)s 3533 X(of)s 3642 X(the)s 3789 X(regular)s 4096 X(expressions.)s 4637 X(Search)s 4933 X(options)s 5253 X(are)s 694 X 5472 Y 1054 X(only)s 1277 X(applied)s 1616 X(to)s 1739 X(log\256le)s 2040 X(entries;)s 2379 X(any)s 2568 X(summary)s 2985 X(\256les)s 3197 X(input)s 3448 X(must)s 3688 X(have)s 3920 X(been)s 4152 X(created)s 4483 X(with)s 4705 X(the)s 4871 X(same)s 5120 X(search)s 694 X 5592 Y 1054 X(options.)s 694 X 5760 Y 1054 X 0.0 10 10 f.B ft(\261a)s 1179 X 0.0 10 10 f.I ft(regexp)s 694 X 5880 Y 1054 X 0.0 10 10 f.B ft(\261A)s 1201 X 0.0 10 10 f.I ft(regexp)s 694 X 6000 Y 1414 X 0.0 10 10 f.R ft(Include)s 1739 X(\()s 0.0 10 10 f.B ft(\261a)s 0.0 10 10 f.R ft(\))s 1930 X(or)s 2038 X(exclude)s 2373 X(\()s 0.0 10 10 f.B ft(\261A)s 0.0 10 10 f.R ft(\))s 2586 X(all)s 2711 X(requests)s 3063 X(containing)s 3510 X(a)s 3579 X(hostname/IP)s 4104 X(address)s 4428 X(matching)s 4825 X(the)s 4972 X(given)s 5219 X(perl)s 694 X 6120 Y 1414 X(regular)s 1721 X(expression.)s 694 X 6288 Y 1054 X 0.0 10 10 f.B ft(\261c)s 1173 X 0.0 10 10 f.I ft(regexp)s 694 X 6408 Y 1054 X 0.0 10 10 f.B ft(\261C)s 1201 X 0.0 10 10 f.I ft(regexp)s 694 X 6528 Y 1414 X 0.0 10 10 f.R ft(Include)s 1739 X(\()s 0.0 10 10 f.B ft(\261c)s 0.0 10 10 f.R ft(\))s 1925 X(or)s 2034 X(exclude)s 2370 X(\()s 0.0 10 10 f.B ft(\261C)s 0.0 10 10 f.R ft(\))s 2584 X(all)s 2710 X(requests)s 3063 X(resulting)s 3439 X(in)s 3543 X(an)s 3663 X 0.0 10 10 f.B ft(HTTP)s 3962 X 0.0 10 10 f.R ft(status)s 4215 X(code)s 4428 X(matching)s 4825 X(the)s 4972 X(given)s 5219 X(perl)s 694 X 6648 Y 1414 X(regular)s 1721 X(expression.)s 694 X 6816 Y 1054 X 0.0 10 10 f.B ft(\261d)s 1185 X 0.0 10 10 f.I ft(regexp)s 694 X 6936 Y 1054 X 0.0 10 10 f.B ft(\261D)s 1201 X 0.0 10 10 f.I ft(regexp)s 694 X 7056 Y 1414 X 0.0 10 10 f.R ft(Include)s 1748 X(\()s 0.0 10 10 f.B ft(\261d)s 0.0 10 10 f.R ft(\))s 1955 X(or)s 2073 X(exclude)s 2418 X(\()s 0.0 10 10 f.B ft(\261D)s 0.0 10 10 f.R ft(\))s 2641 X(all)s 2776 X(requests)s 3138 X(occurring)s 3555 X(on)s 3690 X(a)s 3768 X(date)s 3968 X(\(e.g.,)s 4204 X("Feb)s 4454 X(2)s 4538 X(1994"\))s 4846 X(matching)s 5252 X(the)s 694 X 7176 Y 1414 X(given)s 1661 X(perl)s 1841 X(regular)s 2148 X(expression.)s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(4)s 7920 Y page 0.0 10 10 f.R ft %%Page: 5 5 694 X 480 Y(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4852 X(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 1054 X 0.0 10 10 f.B ft(\261t)s 1162 X 0.0 10 10 f.I ft(regexp)s 694 X 1080 Y 1054 X 0.0 10 10 f.B ft(\261T)s 1196 X 0.0 10 10 f.I ft(regexp)s 694 X 1200 Y 1414 X 0.0 10 10 f.R ft(Include)s 1749 X(\()s 0.0 10 10 f.B ft(\261t)s 0.0 10 10 f.R ft(\))s 1934 X(or)s 2053 X(exclude)s 2399 X(\()s 0.0 10 10 f.B ft(\261T)s 0.0 10 10 f.R ft(\))s 2618 X(all)s 2754 X(requests)s 3117 X(occurring)s 3535 X(during)s 3832 X(the)s 3990 X(hour)s 4209 X(\(e.g.,)s 4446 X("23")s 4663 X(is)s 4765 X(11pm)s 5028 X(\261)s 5113 X(12pm\))s 694 X 1320 Y 1414 X(matching)s 1811 X(the)s 1958 X(given)s 2205 X(perl)s 2385 X(regular)s 2692 X(expression.)s 694 X 1488 Y 1054 X 0.0 10 10 f.B ft(\261m)s 1212 X 0.0 10 10 f.I ft(regexp)s 694 X 1608 Y 1054 X 0.0 10 10 f.B ft(\261M)s 1223 X 0.0 10 10 f.I ft(regexp)s 694 X 1728 Y 1414 X 0.0 10 10 f.R ft(Include)s 1748 X(\()s 0.0 10 10 f.B ft(\261m)s 0.0 10 10 f.R ft(\))s 1982 X(or)s 2100 X(exclude)s 2445 X(\()s 0.0 10 10 f.B ft(\261M)s 0.0 10 10 f.R ft(\))s 2690 X(all)s 2825 X(requests)s 3187 X(using)s 3438 X(an)s 3566 X(HTTP)s 3850 X(method)s 4184 X(\(e.g.,)s 4420 X("HEAD"\))s 4846 X(matching)s 5252 X(the)s 694 X 1848 Y 1414 X(given)s 1661 X(perl)s 1841 X(regular)s 2148 X(expression.)s 694 X 2016 Y 1054 X 0.0 10 10 f.B ft(\261n)s 1185 X 0.0 10 10 f.I ft(regexp)s 694 X 2136 Y 1054 X 0.0 10 10 f.B ft(\261N)s 1201 X 0.0 10 10 f.I ft(regexp)s 694 X 2256 Y 1414 X 0.0 10 10 f.R ft(Include)s 1739 X(\()s 0.0 10 10 f.B ft(\261n)s 0.0 10 10 f.R ft(\))s 1937 X(or)s 2046 X(exclude)s 2382 X(\()s 0.0 10 10 f.B ft(\261N)s 0.0 10 10 f.R ft(\))s 2596 X(all)s 2722 X(requests)s 3075 X(on)s 3201 X(a)s 3271 X(URL)s 3496 X(\(archive)s 3847 X(name\))s 4121 X(matching)s 4518 X(the)s 4665 X(given)s 4912 X(perl)s 5092 X(regular)s 694 X 2376 Y 1414 X(expression.)s 694 X 2544 Y 1054 X 0.0 10 10 f.B ft(\261noescape)s 694 X 2664 Y 1414 X 0.0 10 10 f.R ft(Do)s 1561 X(not)s 1714 X(escape)s 2004 X(the)s 2151 X(special)s 2453 X(characters)s 2881 X(\("+")s 3077 X(and)s 3246 X("."\))s 3411 X(in)s 3514 X(the)s 3661 X(remaining)s 4091 X(search)s 4370 X(options.)s 694 X 2832 Y 0.0 9 9 f.B ft(INPUT)s 997 X 0.0 9 9 f.S2 ft(O)s 1035 X(O)s 1073 X(O)s 1111 X(O)s 1149 X(O)s 694 X 2952 Y 1054 X 0.0 10 10 f.R ft(After)s 1291 X(parsing)s 1611 X(the)s 1759 X(options,)s 2105 X(the)s 2253 X(remaining)s 2684 X(arguments)s 3126 X(on)s 3252 X(the)s 3400 X(command-line)s 4003 X(are)s 4150 X(treated)s 4447 X(as)s 4556 X(input)s 4788 X(arguments)s 5230 X(and)s 694 X 3072 Y 1054 X(are)s 1200 X(read)s 1396 X(in)s 1499 X(the)s 1646 X(order)s 1881 X(given.)s 2178 X(If)s 2269 X(no)s 2394 X(input)s 2625 X(arguments)s 3066 X(are)s 3212 X(given,)s 3484 X(the)s 3631 X(con\256gured)s 4083 X(default)s 4385 X(log\256le)s 4666 X(is)s 4758 X(read)s 4954 X([)s 0.0 10 10 f.B ft(+)s 0.0 10 10 f.R ft(].)s 694 X 3240 Y 1054 X 0.0 10 10 f.B ft(\261)s 1414 X 0.0 10 10 f.R ft(Read)s 1644 X(from)s 1863 X(standard)s 2226 X(input)s 2457 X(\(STDIN\).)s 694 X 3408 Y 1054 X 0.0 10 10 f.B ft(+)s 1414 X 0.0 10 10 f.R ft(Read)s 1644 X(the)s 1791 X(default)s 2093 X(log\256le.)s 2399 X([as)s 2540 X(con\256gured])s 694 X 3576 Y 1054 X 0.0 10 10 f.I ft(\256lename)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft(...)s 694 X 3696 Y 1414 X(Read)s 1649 X(the)s 1801 X(given)s 2053 X(\256le)s 2211 X(and)s 2385 X(determine)s 2814 X(from)s 3038 X(the)s 3190 X(\256rst)s 3376 X(line)s 3555 X(whether)s 3905 X(it)s 3990 X(is)s 4086 X(a)s 4159 X(previous)s 4532 X(output)s 4817 X(summary)s 5218 X(or)s 5330 X(a)s 694 X 3816 Y 1414 X(CLF)s 1644 X(log\256le.)s 1996 X(If)s 2108 X(the)s 2276 X 0.0 10 10 f.I ft(\256lename)s 0.0 10 10 f.S2 ft(P)s 0.0 10 10 f.R ft('s)s 2740 X(extension)s 3169 X(indicates)s 3570 X(that)s 3766 X(is)s 3879 X(is)s 3992 X(compressed)s 4509 X(\(gz|z|Z\),)s 4884 X(then)s 5101 X(pipe)s 5318 X(it)s 694 X 3936 Y 1414 X(through)s 1759 X(the)s 1915 X(con\256gured)s 2376 X(decompression)s 3009 X(program)s 3381 X([)s 0.0 10 10 f.B ft(gunzip)s 3738 X(\261c)s 0.0 10 10 f.R ft(])s 3899 X(\256rst.)s 4114 X(Summary)s 4537 X(\256les)s 4737 X(must)s 4965 X(have)s 5186 X(been)s 694 X 4056 Y 1414 X(created)s 1754 X(with)s 1985 X(the)s 2160 X(same)s 2417 X(\(or)s 2585 X(similar\))s 2948 X(con\256guration)s 3533 X(and)s 3729 X(command-line)s 4358 X(options)s 4705 X(as)s 4840 X(the)s 5014 X(currently)s 694 X 4176 Y 1414 X(running)s 1750 X(program;)s 2141 X(if)s 2227 X(not,)s 2405 X(weird)s 2657 X(things)s 2927 X(will)s 3108 X(happen.)s 694 X 4344 Y 0.0 9 9 f.B ft(USAGE)s 1027 X 0.0 9 9 f.S2 ft(O)s 1065 X(O)s 1103 X(O)s 1141 X(O)s 1179 X(O)s 694 X 4464 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1450 X 0.0 10 10 f.R ft(is)s 1542 X(used)s 1750 X(for)s 1891 X(many)s 2138 X(purposes:)s 694 X 4632 Y 1104 X(\267)s 1414 X(as)s 1553 X(a)s 1653 X(diagnostic)s 2120 X(utility)s 2416 X(for)s 2588 X(measuring)s 3060 X(server)s 3359 X(activity,)s 3739 X(\256nding)s 4078 X(incorrect)s 4487 X(URL)s 4742 X(references,)s 5230 X(and)s 694 X 4752 Y 1414 X(detecting)s 1805 X(attempted)s 2224 X(misuse)s 2527 X(of)s 2635 X(the)s 2782 X(server;)s 694 X 4920 Y 1104 X(\267)s 1414 X(as)s 1536 X(a)s 1619 X(public)s 1908 X(relations)s 2291 X(tool)s 2485 X(for)s 2639 X(measuring)s 3093 X(technology)s 3575 X(or)s 3696 X(information)s 4206 X(transfer)s 4548 X(\(i.e.,)s 4766 X(Is)s 4876 X(the)s 5036 X(message)s 694 X 5040 Y 1414 X(getting)s 1717 X(out?)s 1914 X(To)s 2050 X(the)s 2197 X(right)s 2411 X(people?\);)s 694 X 5208 Y 1104 X(\267)s 1414 X(as)s 1522 X(an)s 1641 X(archival)s 1987 X(tool)s 2168 X(for)s 2309 X(tracking)s 2661 X(web)s 2852 X(usage)s 3104 X(over)s 3306 X(time)s 3509 X(without)s 3840 X(storing)s 4143 X(the)s 4290 X(entire)s 4542 X(log\256le;)s 4851 X(and,)s 694 X 5376 Y 1104 X(\267)s 1414 X(most)s 1640 X(often,)s 1901 X(as)s 2015 X(an)s 2139 X(easy)s 2346 X(mechanism)s 2831 X(for)s 2977 X(justifying)s 3391 X(all)s 3521 X(the)s 3673 X(hard)s 3880 X(work)s 4115 X(that)s 4295 X(went)s 4519 X(into)s 4705 X(creating)s 5056 X(the)s 5208 X(web)s 694 X 5496 Y 1414 X(content)s 1733 X(that)s 1908 X(people)s 2199 X(out)s 2352 X(there)s 2576 X(are)s 2722 X(requesting.)s 694 X 5664 Y 1054 X(In)s 1166 X(most)s 1390 X(cases,)s 1654 X 0.0 10 10 f.B ft(wwwstat)s 2054 X 0.0 10 10 f.R ft(is)s 2149 X(run)s 2310 X(on)s 2438 X(a)s 2510 X(periodic)s 2865 X(basis)s 3093 X(\(nightly,)s 3463 X(weekly,)s 3804 X(and/or)s 4087 X(monthly\))s 4482 X(by)s 4610 X(a)s 4682 X(wrapper)s 5036 X(program)s 694 X 5784 Y 1054 X(as)s 1174 X(a)s 1255 X 0.0 10 10 f.B ft(crontab)s 1625 X 0.0 10 10 f.R ft(entry)s 1867 X(shortly)s 2182 X(after)s 2401 X(midnight,)s 2825 X(typically)s 3212 X(in)s 3327 X(conjunction)s 3836 X(with)s 4051 X(rotating)s 4399 X(the)s 4558 X(current)s 4877 X(log\256le.)s 5219 X(The)s 694 X 5904 Y 1054 X(output)s 1355 X(is)s 1467 X(usually)s 1801 X(directed)s 2167 X(to)s 2290 X(a)s 2379 X(temporary)s 2834 X(\256le)s 3007 X(which)s 3296 X(can)s 3479 X(later)s 3701 X(be)s 3840 X(moved)s 4157 X(to)s 4280 X(a)s 4369 X(published)s 4803 X(location.)s 5219 X(The)s 694 X 6024 Y 1054 X(temporary)s 1493 X(\256le)s 1650 X(is)s 1746 X(necessary)s 2162 X(to)s 2269 X(avoid)s 2520 X(erasing)s 2836 X(your)s 3047 X(published)s 3464 X(\256le)s 3620 X(during)s 3909 X(wwwstat's)s 4364 X(processing)s 4819 X(\(which)s 5124 X(would)s 694 X 6144 Y 1054 X(look)s 1257 X(very)s 1459 X(odd)s 1634 X(if)s 1720 X(someone)s 2100 X(tried)s 2308 X(to)s 2411 X(GET)s 2630 X(it)s 2711 X(from)s 2930 X(your)s 3138 X(web\).)s 694 X 6312 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1461 X 0.0 10 10 f.R ft(can)s 1635 X(be)s 1765 X(run)s 1934 X(as)s 2053 X(a)s 2133 X(CGI)s 2341 X(script)s 2599 X(\()s 0.0 10 10 f.B ft(\261cgi)s 0.0 10 10 f.R ft(\),)s 2898 X(but)s 3062 X(that)s 3248 X(is)s 3351 X(not)s 3515 X(recommended)s 4116 X(unless)s 4402 X(the)s 4560 X(input)s 4802 X(log\256le)s 5094 X(is)s 5197 X(very)s 694 X 6432 Y 1054 X(small.)s 694 X 6600 Y 1054 X(All)s 1215 X(of)s 1331 X(the)s 1486 X(command-line)s 2096 X(options,)s 2449 X(and)s 2625 X(a)s 2701 X(few)s 2882 X(options)s 3209 X(that)s 3391 X(are)s 3544 X(not)s 3704 X(available)s 4096 X(from)s 4322 X(the)s 4476 X(command-line,)s 5110 X(can)s 5280 X(be)s 694 X 6720 Y 1054 X(changed)s 1428 X(within)s 1726 X(the)s 1890 X(user)s 2098 X(and)s 2284 X(system)s 2604 X(con\256guration)s 3179 X(\256les)s 3387 X(\(see)s 3588 X 0.0 10 10 f.B ft(wwwstat.rc)s 0.0 10 10 f.R ft(\).)s 4196 X(These)s 4475 X(\256les)s 4683 X(are)s 4845 X(actually)s 5202 X 0.0 10 10 f.B ft(perl)s 694 X 6840 Y 1054 X 0.0 10 10 f.R ft(library)s 1350 X(modules)s 1719 X(which)s 1993 X(are)s 2144 X(executed)s 2527 X(as)s 2639 X(part)s 2823 X(of)s 2935 X(the)s 3086 X(program's)s 3525 X(initialization.)s 4110 X(The)s 4294 X(example)s 4661 X(provided)s 5045 X(with)s 5252 X(the)s 694 X 6960 Y 1054 X(distribution)s 1541 X(includes)s 1899 X(complete)s 2290 X(documentation)s 2909 X(on)s 3034 X(what)s 3253 X(variables)s 3638 X(can)s 3801 X(be)s 3920 X(set)s 4056 X(and)s 4225 X(their)s 4433 X(range)s 4679 X(of)s 4787 X(values.)s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(5)s 7920 Y page 0.0 10 10 f.R ft %%Page: 6 6 694 X 480 Y(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4852 X(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 874 X 0.0 9 9 f.B ft(Perl)s 1057 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Regular)s 1405 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Expressions)s 1903 X 0.0 9 9 f.S2 ft(O)s 1941 X(O)s 1979 X(O)s 694 X 1080 Y 1054 X 0.0 10 10 f.R ft(The)s 1236 X(Search)s 1533 X(Options)s 1876 X(and)s 2046 X(many)s 2294 X(of)s 2403 X(the)s 2551 X(con\256guration)s 3110 X(\256le)s 3264 X(settings)s 3596 X(allow)s 3844 X(for)s 3986 X(full)s 4151 X(use)s 4310 X(of)s 4419 X(perl)s 4600 X(regular)s 4908 X(expressions)s 694 X 1200 Y 1054 X(\(with)s 1304 X(the)s 1465 X(exception)s 1892 X(that)s 2080 X(the)s 2240 X(\261a,)s 2397 X(\261A,)s 2582 X(\261n)s 2720 X(and)s 2902 X(\261N)s 3062 X(options)s 3395 X(treat)s 3610 X('+')s 3770 X(and)s 3952 X('.')s 4081 X(characters)s 4522 X(as)s 4643 X(normal)s 4964 X(alphabetic)s 694 X 1320 Y 1054 X(characters)s 1508 X(unless)s 1809 X(they)s 2032 X(are)s 2204 X(preceded)s 2614 X(by)s 2765 X(the)s 2938 X 0.0 10 10 f.B ft(\261noescape)s 3422 X 0.0 10 10 f.R ft(option\).)s 3812 X(Most)s 4069 X(people)s 4386 X(only)s 4614 X(need)s 4852 X(to)s 4980 X(know)s 5252 X(the)s 694 X 1440 Y 1054 X(following)s 1468 X(special)s 1770 X(characters:)s 694 X 1608 Y 1054 X 0.0 10 10 f.B ft(\303)s 1454 X 0.0 10 10 f.R ft(at)s 1551 X(start)s 1748 X(of)s 1856 X(pattern,)s 2183 X(means)s 2463 X("starts)s 2740 X(with)s 2943 X(pattern".)s 694 X 1728 Y 1054 X 0.0 10 10 f.B ft($)s 1454 X 0.0 10 10 f.R ft(at)s 1551 X(end)s 1720 X(of)s 1828 X(pattern,)s 2155 X(means)s 2435 X("ends)s 2684 X(with)s 2887 X(pattern".)s 694 X 1848 Y 1054 X 0.0 10 10 f.B ft(\(...\))s 1454 X 0.0 10 10 f.R ft(groups)s 1751 X(pattern)s 2053 X(elements)s 2433 X(as)s 2541 X(a)s 2610 X(single)s 2874 X(element.)s 694 X 1968 Y 1054 X 0.0 10 10 f.B ft(?)s 1454 X 0.0 10 10 f.R ft(matches)s 1806 X(preceding)s 2224 X(element)s 2565 X(zero)s 2761 X(or)s 2869 X(one)s 3038 X(times.)s 694 X 2088 Y 1054 X 0.0 10 10 f.S ft(*)s 1454 X 0.0 10 10 f.R ft(matches)s 1806 X(preceding)s 2224 X(element)s 2565 X(zero)s 2761 X(or)s 2869 X(more)s 3099 X(times.)s 694 X 2208 Y 1054 X 0.0 10 10 f.B ft(+)s 1454 X 0.0 10 10 f.R ft(matches)s 1806 X(preceding)s 2224 X(element)s 2565 X(one)s 2734 X(or)s 2842 X(more)s 3072 X(times.)s 694 X 2328 Y 1054 X 0.0 10 10 f.B ft(.)s 1454 X 0.0 10 10 f.R ft(matches)s 1806 X(any)s 1975 X(single)s 2239 X(character.)s 694 X 2448 Y 1054 X 0.0 10 10 f.B ft([...])s 1454 X 0.0 10 10 f.R ft(denotes)s 1788 X(a)s 1861 X(class)s 2084 X(of)s 2195 X(characters)s 2626 X(to)s 2732 X(match.)s 3029 X([\303...])s 3231 X(negates)s 3558 X(the)s 3708 X(class.)s 3980 X(Inside)s 4252 X(a)s 4324 X(class,)s 4571 X('-')s 4698 X(indicates)s 5081 X(a)s 5153 X(range)s 694 X 2568 Y 1454 X(of)s 1562 X(characters.)s 694 X 2688 Y 1054 X 0.0 10 10 f.B ft(\(A|B|C\))s 1454 X 0.0 10 10 f.R ft(matches)s 1806 X(if)s 1892 X(A)s 1989 X(or)s 2097 X(B)s 2189 X(or)s 2297 X(C)s 2389 X(matches.)s 694 X 2856 Y 1054 X(Depending)s 1523 X(on)s 1654 X(your)s 1868 X(command)s 2293 X(shell,)s 2538 X(some)s 2780 X(special)s 3088 X(characters)s 3521 X(may)s 3723 X(need)s 3941 X(to)s 4049 X(be)s 4173 X(escaped)s 4518 X(on)s 4648 X(the)s 4800 X(command)s 5224 X(line)s 694 X 2976 Y 1054 X(or)s 1162 X(enclosed)s 1536 X(in)s 1639 X(single-quotes)s 2197 X(to)s 2300 X(avoid)s 2547 X(shell)s 2761 X(interpretation.)s 694 X 3144 Y 0.0 9 9 f.B ft(EXAMPLES)s 1217 X 0.0 9 9 f.S2 ft(O)s 1255 X(O)s 1293 X(O)s 1331 X(O)s 1369 X(O)s 694 X 3264 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(from)s 2105 X(commercial)s 2601 X(domains.)s 694 X 3384 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261a)s 1935 X('.com$')s 694 X 3552 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(from)s 2105 X(the)s 2252 X(host)s 2444 X(kiwi.ics.uci.edu)s 694 X 3672 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261a)s 1935 X('\303kiwi.ics.uci.edu$')s 694 X 3840 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(not)s 2039 X(from)s 2258 X(kiwi.ics.uci.edu)s 694 X 3960 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261A)s 1957 X('\303kiwi.ics.uci.edu$')s 694 X 4128 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(resulting)s 2261 X(in)s 2364 X(temporary)s 2799 X(redirects)s 694 X 4248 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261c)s 1929 X('302')s 694 X 4416 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(resulting)s 2261 X(in)s 2364 X(server)s 2632 X(errors)s 694 X 4536 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261c)s 1929 X('\3035')s 694 X 4704 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(unsuccessful)s 2069 X(requests)s 694 X 4824 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261C)s 1957 X('\3032')s 2131 X(\261C)s 2278 X('304')s 694 X 4992 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(in)s 1989 X(\256rst)s 2170 X(week)s 2405 X(of)s 2513 X(the)s 2660 X(month)s 694 X 5112 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261d)s 1941 X(')s 1999 X([1-7])s 2223 X(')s 694 X 5280 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(in)s 1989 X(second)s 2291 X(week)s 2526 X(of)s 2634 X(the)s 2781 X(month)s 694 X 5400 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261d)s 1941 X(')s 1999 X(\([89]|1[0-4]\))s 2527 X(')s 694 X 5568 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(in)s 1989 X(third)s 2203 X(week)s 2438 X(of)s 2546 X(the)s 2693 X(month)s 694 X 5688 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261d)s 1941 X(')s 1999 X(\(1[5-9]|2[01]\))s 2577 X(')s 694 X 5856 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(in)s 1989 X(fourth)s 2258 X(week)s 2493 X(of)s 2601 X(the)s 2748 X(month)s 694 X 5976 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261d)s 1941 X(')s 1999 X(2[2-8])s 2273 X(')s 694 X 6144 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(in)s 1989 X(leftover)s 2324 X(days)s 2532 X(of)s 2640 X(the)s 2787 X(month)s 694 X 6264 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261d)s 1941 X(')s 1999 X(\(29|30|31\))s 2434 X(')s 694 X 6432 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(in)s 1989 X(February)s 694 X 6552 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261d)s 1941 X('Feb')s 694 X 6720 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(in)s 1989 X(year)s 2185 X(1994)s 694 X 6840 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261d)s 1941 X('1994')s 694 X 7008 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(not)s 2039 X(in)s 2142 X(April)s 694 X 7128 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261D)s 1957 X('Apr')s 694 X 7296 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(between)s 2243 X(midnight)s 2630 X(and)s 2799 X(1am)s 694 X 7776 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(6)s 7920 Y page 0.0 10 10 f.R ft %%Page: 7 7 694 X 480 Y(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4852 X(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261t)s 1918 X('00')s 694 X 1128 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(not)s 2039 X(received)s 2401 X(between)s 2758 X(noon)s 2983 X(and)s 3152 X(1pm)s 694 X 1248 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261T)s 1952 X('12')s 694 X 1416 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(with)s 2089 X(a)s 2158 X(gif)s 2294 X(extension)s 694 X 1536 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261n)s 1941 X('.gif$')s 694 X 1704 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(under)s 2138 X(user's)s 2401 X(URL)s 694 X 1824 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261n)s 1941 X('\303/\304user/')s 694 X 1992 Y 1054 X 0.0 10 10 f.R ft(Summarize)s 1534 X(requests)s 1886 X(not)s 2039 X(under)s 2291 X("hidden")s 2670 X(paths)s 694 X 2112 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1810 X(\261N)s 1957 X('/hidden/')s 694 X 2280 Y 0.0 9 9 f.B ft(ENVIRONMENT)s 1412 X 0.0 9 9 f.S2 ft(O)s 1450 X(O)s 1488 X(O)s 1526 X(O)s 1564 X(O)s 694 X 2400 Y 1054 X 0.0 10 10 f.B ft(HOME)s 1654 X 0.0 10 10 f.R ft(Location)s 2034 X(of)s 2142 X(user's)s 2405 X(home)s 2652 X(directory,)s 3062 X(placed)s 3347 X(on)s 3472 X(INC)s 3669 X(path.)s 694 X 2568 Y 1054 X 0.0 10 10 f.B ft(LOGDIR)s 1654 X 0.0 10 10 f.R ft(Used)s 1884 X(instead)s 2192 X(of)s 2300 X(HOME)s 2619 X(if)s 2705 X(latter)s 2935 X(is)s 3027 X(unde\256ned.)s 694 X 2736 Y 1054 X 0.0 10 10 f.B ft(PERLLIB)s 1654 X 0.0 10 10 f.R ft(A)s 1751 X(colon-separated)s 2407 X(list)s 2555 X(of)s 2663 X(directories)s 3109 X(in)s 3212 X(which)s 3481 X(to)s 3584 X(look)s 3787 X(for)s 3928 X(include)s 4247 X(and)s 4416 X(con\256guration)s 4974 X(\256les.)s 694 X 2904 Y 0.0 9 9 f.B ft(FILES)s 977 X 0.0 9 9 f.S2 ft(O)s 1015 X(O)s 1053 X(O)s 1091 X(O)s 1129 X(O)s 694 X 3024 Y 1054 X 0.0 10 10 f.R ft(Unless)s 1363 X(a)s 1444 X(pathname)s 1869 X(is)s 1973 X(supplied,)s 2374 X(the)s 2533 X(con\256guration)s 3103 X(\256les)s 3307 X(are)s 3465 X(obtained)s 3846 X(from)s 4077 X(the)s 4236 X(current)s 4555 X(directory,)s 4977 X(the)s 5136 X(user's)s 694 X 3144 Y 1054 X(home)s 1309 X(directory)s 1702 X(\()s 0.0 10 10 f.B ft(HOME)s 2085 X 0.0 10 10 f.R ft(or)s 2201 X 0.0 10 10 f.B ft(LOGDIR)s 0.0 10 10 f.R ft(\),)s 2697 X(the)s 2851 X(standard)s 3221 X(library)s 3519 X(path)s 3723 X(\()s 0.0 10 10 f.B ft(PERLLIB)s 0.0 10 10 f.R ft(\),)s 4286 X(and)s 4462 X(the)s 4616 X(directory)s 5008 X(indicated)s 694 X 3264 Y 1054 X(by)s 1179 X(the)s 1326 X(command)s 1745 X(pathname)s 2158 X(\(in)s 2294 X(that)s 2469 X(order\).)s 694 X 3432 Y 1054 X 0.0 10 10 f.B ft(.wwwstatrc)s 1804 X 0.0 10 10 f.R ft(User)s 2017 X(con\256guration)s 2575 X(\256le.)s 694 X 3600 Y 1054 X 0.0 10 10 f.B ft(wwwstat.rc)s 1804 X 0.0 10 10 f.R ft(System)s 2124 X(con\256guration)s 2682 X(\256le.)s 694 X 3768 Y 1054 X 0.0 10 10 f.B ft(domains.pl)s 1804 X 0.0 10 10 f.R ft(Mapping)s 2190 X(of)s 2298 X(Internet)s 2633 X(domain)s 2958 X(to)s 3061 X(country)s 3391 X(or)s 3499 X(organization.)s 694 X 3936 Y 1054 X 0.0 10 10 f.B ft(dnscache.dir)s 694 X 4056 Y 1054 X(dnscache.pag)s 1804 X 0.0 10 10 f.R ft(DBM)s 2057 X(\256les)s 2249 X(for)s 2390 X(persistent)s 2798 X(DNS)s 3023 X(cache.)s 694 X 4224 Y 0.0 9 9 f.B ft(SEE)s 887 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(ALSO)s 1170 X 0.0 9 9 f.S2 ft(O)s 1208 X(O)s 1246 X(O)s 1284 X(O)s 694 X 4344 Y 1054 X 0.0 10 10 f.B ft(crontab)s 0.0 10 10 f.R ft(\(1\),)s 1553 X 0.0 10 10 f.B ft(gwstat)s 0.0 10 10 f.R ft(\(1\),)s 1996 X 0.0 10 10 f.B ft(httpd)s 0.0 10 10 f.R ft(\(1m\),)s 2474 X 0.0 10 10 f.B ft(perl)s 0.0 10 10 f.R ft(\(1\),)s 2812 X 0.0 10 10 f.B ft(splitlog)s 0.0 10 10 f.R ft(\(1\))s 694 X 4512 Y 1054 X(More)s 1295 X(info)s 1481 X(and)s 1650 X(the)s 1797 X(latest)s 2033 X(version)s 2352 X(of)s 2460 X(wwwstat)s 2840 X(can)s 3003 X(be)s 3122 X(obtained)s 3491 X(from)s 694 X 4680 Y 1179 X(http://www.ics.uci.edu/pub/websoft/wwwstat/)s 694 X 4800 Y 1204 X(ftp://www.ics.uci.edu/pub/websoft/wwwstat/)s 694 X 4968 Y 1054 X(If)s 1195 X(you)s 1420 X(have)s 1683 X(any)s 1902 X(suggestions,)s 2469 X(bug)s 2694 X(reports,)s 3071 X(\256xes,)s 3360 X(or)s 3517 X(enhancements,)s 4181 X(please)s 4504 X(join)s 4734 X(the)s 4930 X()s 1873 X(mailing)s 2218 X(list)s 2380 X(by)s 2519 X(sending)s 2869 X(e-mail)s 3163 X(with)s 3380 X("subscribe")s 3878 X(in)s 3995 X(the)s 4156 X(subject)s 4478 X(of)s 4600 X(the)s 4760 X(message)s 5136 X(to)s 5252 X(the)s 694 X 5208 Y 1054 X(request)s 1367 X(address)s 1691 X(.)s 3311 X(The)s 3491 X(list)s 3639 X(is)s 3731 X(archived)s 4099 X(at)s 4196 X(the)s 4343 X(above)s 4606 X(address.)s 694 X 5376 Y 874 X 0.0 9 9 f.B ft(More)s 1107 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(About)s 1385 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(HTTP)s 1668 X 0.0 9 9 f.S2 ft(O)s 1706 X(O)s 1744 X(O)s 694 X 5496 Y 1054 X 0.0 10 10 f.R ft(HTTP/1.1)s 1482 X(Proposed)s 1879 X(Standard)s 694 X 5616 Y 1414 X(R.)s 1535 X(Fielding,)s 1923 X(J.)s 2016 X(Gettys,)s 2330 X(J.)s 2422 X(C.)s 2542 X(Mogul,)s 2862 X(H.)s 2987 X(Frystyk,)s 3346 X(and)s 3518 X(T.)s 3632 X(Berners-Lee.)s 4202 X("Hypertext)s 4670 X(Transfer)s 5035 X(Protocol)s 694 X 5736 Y 1414 X(--)s 1505 X(HTTP/1.1",)s 1999 X(U.C.)s 2213 X(Irvine,)s 2501 X(DEC,)s 2751 X(MIT/LCS,)s 3196 X(August)s 3510 X(1996.)s 694 X 5856 Y 1414 X(http://www.ics.uci.edu/pub/ietf/http/)s 694 X 6024 Y 874 X 0.0 9 9 f.B ft(More)s 1107 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(About)s 1385 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Perl)s 1583 X 0.0 9 9 f.S2 ft(O)s 1621 X(O)s 1659 X(O)s 694 X 6144 Y 1054 X 0.0 10 10 f.R ft(The)s 1234 X(Perl)s 1420 X(Language)s 1838 X(Home)s 2107 X(Page)s 694 X 6264 Y 1414 X(http://www.perl.com/perl/index.html)s 694 X 6432 Y 1054 X(Johan)s 1312 X(Vromans')s 1736 X(Perl)s 1922 X(Reference)s 2350 X(Guide)s 694 X 6552 Y 1414 X(http://www.xs4all.nl/\304jvromans/perlref.html)s 694 X 6720 Y 0.0 9 9 f.B ft(DIAGNOSTICS)s 1347 X 0.0 9 9 f.S2 ft(O)s 1385 X(O)s 1423 X(O)s 1461 X(O)s 1499 X(O)s 694 X 6840 Y 1054 X 0.0 10 10 f.R ft(See)s 1223 X(also)s 1409 X(the)s 1556 X 0.0 10 10 f.B ft(Diagnostic)s 2031 X(Options)s 2396 X 0.0 10 10 f.R ft(above.)s 694 X 7008 Y 1054 X("[none])s 1380 X(to)s 1483 X([none]")s 1809 X(dates)s 694 X 7128 Y 1414 X 0.0 10 10 f.B ft(wwwstat)s 1824 X 0.0 10 10 f.R ft(did)s 1991 X(not)s 2158 X(\256nd)s 2352 X(any)s 2534 X(matching)s 2944 X(data)s 3148 X(to)s 3264 X(summarize.)s 3790 X(If)s 3894 X(you)s 4082 X(get)s 4242 X(such)s 4463 X(an)s 4595 X(empty)s 4883 X(summary,)s 5318 X(it)s 694 X 7248 Y 1414 X(means)s 1696 X(that)s 1873 X(either:)s 2155 X(1\))s 2265 X(there)s 2491 X(was)s 2673 X(no)s 2800 X(valid)s 3027 X(data)s 3220 X(\(the)s 3402 X(input)s 3635 X(\256les)s 3829 X(are)s 3977 X(all)s 4104 X(invalid)s 4409 X(or)s 4519 X(empty\),)s 4853 X(or)s 4962 X(2\))s 5071 X(none)s 5291 X(of)s 694 X 7728 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(7)s 7920 Y page 0.0 10 10 f.R ft %%Page: 8 8 694 X 480 Y(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4852 X(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 1414 X(the)s 1561 X(data)s 1752 X(matched)s 2115 X(the)s 2262 X(search)s 2541 X(options)s 2861 X(given.)s 3158 X(Try)s 3327 X(using)s 3569 X(the)s 3716 X 0.0 10 10 f.B ft(\261e)s 3835 X 0.0 10 10 f.R ft(option)s 4116 X(to)s 4219 X(show)s 4455 X(invalid)s 4758 X(data.)s 694 X 1128 Y 1054 X(100%)s 1312 X(unresolved)s 694 X 1248 Y 1414 X(If)s 1511 X(the)s 1663 X(subdomain)s 2132 X(section)s 2445 X(indicates)s 2830 X(that)s 3010 X(all)s 3140 X(of)s 3253 X(the)s 3405 X(client)s 3657 X(requests)s 4014 X(come)s 4260 X(from)s 4484 X(unresolved)s 4952 X(hostnames)s 694 X 1368 Y 1414 X(\(IP)s 1567 X(addresses\),)s 2038 X(this)s 2214 X(probably)s 2600 X(means)s 2886 X(that)s 3067 X(your)s 3281 X(server)s 3555 X(is)s 3653 X(running)s 3995 X(without)s 4331 X(DNS)s 4561 X(resolution)s 4991 X(\(common)s 694 X 1488 Y 1414 X(for)s 1579 X(very)s 1805 X(busy)s 2043 X(sites\).)s 2353 X(You)s 2574 X(can)s 2761 X(use)s 2943 X(the)s 3114 X 0.0 10 10 f.B ft(\261dns)s 3364 X 0.0 10 10 f.R ft(option)s 3669 X(to)s 3796 X(have)s 4033 X 0.0 10 10 f.B ft(wwwstat)s 4452 X 0.0 10 10 f.R ft(perform)s 4821 X(the)s 4991 X(hostname)s 694 X 1608 Y 1414 X(lookups.)s 1815 X(If)s 1915 X(100%)s 2182 X(of)s 2299 X(the)s 2454 X(hosts)s 2693 X(are)s 2847 X(still)s 3031 X(unresolved)s 3502 X(with)s 3713 X(the)s 3868 X 0.0 10 10 f.B ft(\261dns)s 4102 X 0.0 10 10 f.R ft(option)s 4391 X(in)s 4502 X(e)s /Cff { (f) show xsiz pt 20 div neg 0 rmoveto (f) s } def Cff(ect,)s 4781 X(then)s 4986 X(it)s 5075 X(may)s 5280 X(be)s 694 X 1728 Y 1414 X(that)s 1608 X(all)s 1752 X(of)s 1879 X(the)s 2045 X(clients)s 2350 X(accessing)s 2776 X(your)s 3003 X(server)s 3290 X(are)s 3454 X(doing)s 3725 X(so)s 3857 X(from)s 4094 X(temporary)s 4547 X(SLIP/PPP)s 4992 X(addresses)s 694 X 1848 Y 1414 X(without)s 1753 X(DNS)s 1986 X(names,)s 2299 X(or)s 2415 X(it)s 2504 X(may)s 2708 X(be)s 2834 X(a)s 2910 X(problem)s 3275 X(with)s 3485 X(wwwstat's)s 3944 X(DNS)s 4176 X(cache)s 4434 X(\(delete)s 4737 X(the)s 4891 X(cache)s 5149 X(\256les\),)s 694 X 1968 Y 1414 X(with)s 1639 X(your)s 1869 X(system's)s 2266 X(DNS)s 2513 X(software)s 2903 X(\(contact)s 3271 X(your)s 3501 X(system)s 3826 X(administrator\),)s 4464 X(or)s 4594 X(with)s 4818 X(your)s 5047 X(network)s 694 X 2088 Y 1414 X(connection.)s 694 X 2256 Y 0.0 9 9 f.B ft(NOTES)s 1022 X 0.0 9 9 f.S2 ft(O)s 1060 X(O)s 1098 X(O)s 1136 X(O)s 1174 X(O)s 694 X 2376 Y 874 X 0.0 9 9 f.B ft(Hits)s 1057 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(vs)s 1175 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Requests)s 1558 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(vs)s 1676 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Visitors)s 2014 X 0.0 9 9 f.S2 ft(O)s 694 X 2496 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1453 X 0.0 10 10 f.R ft(counts)s 1742 X(HTTP)s 2020 X(requests)s 2375 X(received)s 2740 X(by)s 2868 X(the)s 3018 X(server.)s 3339 X(When)s 3604 X(a)s 3675 X(request)s 3990 X(is)s 4084 X(successful,)s 4546 X(it)s 4629 X(is)s 4723 X(often)s 4955 X(referred)s 5296 X(to)s 694 X 2616 Y 1054 X(as)s 1180 X(a)s 1267 X("hit".)s 1523 X(Retrieving)s 1988 X(a)s 2074 X(single)s 2355 X(image)s 2641 X(is)s 2750 X(one)s 2936 X(GET)s 3172 X(request.)s 3527 X(Retrieving)s 3991 X(an)s 4127 X(HTML)s 4452 X(page)s 4682 X(is)s 4791 X(also)s 4994 X(one)s 5180 X(GET)s 694 X 2736 Y 1054 X(request,)s 1393 X(but)s 1547 X(that)s 1723 X(does)s 1931 X(not)s 2084 X(include)s 2403 X(the)s 2550 X(separate)s 2901 X(requests)s 3253 X(made)s 3494 X(for)s 3635 X(in-line)s 3921 X(images)s 4229 X(or)s 4337 X(related)s 4633 X(objects.)s 4991 X(Checking)s 694 X 2856 Y 1054 X(to)s 1157 X(see)s 1309 X(if)s 1395 X(a)s 1464 X(cached)s 1765 X(image)s 2034 X(is)s 2126 X(still)s 2302 X(valid)s 2527 X(\(a)s 2629 X(HEAD)s 2931 X(or)s 3039 X(conditional)s 3514 X(GET\))s 3766 X(is)s 3858 X(also)s 4044 X(one)s 4213 X(request.)s 694 X 3024 Y 1054 X(In)s 1168 X(all)s 1299 X(sections)s 1652 X(except)s 1943 X(the)s 2096 X(archive)s 2420 X(section,)s 2759 X 0.0 10 10 f.B ft(wwwstat)s 3161 X 0.0 10 10 f.R ft(shows)s 3442 X(the)s 3594 X(statistics)s 3969 X(for)s 4115 X(all)s 4245 X(requests)s 4602 X(\(successful)s 5075 X(or)s 5188 X(not\).)s 694 X 3144 Y 1054 X(In)s 1167 X(the)s 1319 X(archive)s 1642 X(section,)s 1980 X(it)s 2066 X(normally)s 2457 X(shows)s 2736 X(all)s 2865 X(non-successful)s 3487 X(requests)s 3843 X(under)s 4099 X(a)s 4172 X(special)s 4478 X(category)s 4850 X(for)s 4995 X(the)s 5146 X(status)s 694 X 3264 Y 1054 X(code)s 1293 X(and)s 1488 X(only)s 1717 X(successful)s 2178 X(requests)s 2556 X(\(hits\))s 2818 X(under)s 3096 X(the)s 3269 X(URL)s 3520 X(or)s 3654 X(archive)s 3998 X(tree)s 4198 X(associated)s 4659 X(with)s 4888 X(the)s 5061 X(request.)s 694 X 3384 Y 1054 X(However,)s 1489 X(this)s 1679 X(grouping)s 2085 X(of)s 2213 X(non-successful)s 2851 X(requests)s 3223 X(is)s 3335 X(disabled)s 3713 X(when)s 3974 X 0.0 10 10 f.B ft(wwwstat)s 4390 X 0.0 10 10 f.R ft(is)s 4502 X(used)s 4730 X(with)s 4953 X(the)s 5120 X(search)s 694 X 3504 Y 1054 X(options)s 1374 X 0.0 10 10 f.B ft(\261n)s 0.0 10 10 f.R ft(,)s 1530 X 0.0 10 10 f.B ft(\261c)s 0.0 10 10 f.R ft(,)s 1674 X(and)s 1843 X 0.0 10 10 f.B ft(\261C)s 0.0 10 10 f.R ft(,)s 2015 X(since)s 2245 X(those)s 2481 X(options)s 2801 X(are)s 2947 X(normally)s 3333 X(used)s 3541 X(for)s 3682 X(\256nding)s 3991 X(error)s 4209 X(conditions.)s 694 X 3672 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1458 X 0.0 10 10 f.R ft(does)s 1673 X(not)s 1833 X(count)s 2087 X("visitors")s 2496 X(--)s 2594 X(individual)s 3032 X(people)s 3330 X(or)s 3445 X(programs)s 3854 X(making)s 4186 X(the)s 4340 X(requests.)s 4724 X(HTTP)s 5006 X(does)s 5221 X(not,)s 694 X 3792 Y 1054 X(by)s 1188 X(default,)s 1524 X(provide)s 1863 X(any)s 2041 X(information)s 2547 X(that)s 2731 X(can)s 2903 X(be)s 3031 X(accurately)s 3474 X(correlated)s 3906 X(to)s 4017 X(an)s 4144 X(individual)s 4583 X(person,)s 4907 X(though)s 5218 X(it)s 5307 X(is)s 694 X 3912 Y 1054 X(possible)s 1423 X(\(in)s 1575 X(an)s 1710 X(unreliable)s 2150 X(manner\))s 2523 X(to)s 2642 X(use)s 2816 X(HTTP)s 3107 X(extensions)s 3570 X(and)s 3754 X(request)s 4082 X(pro\256les)s 4422 X(as)s 4545 X(a)s 4629 X(means)s 4924 X(of)s 5047 X(tracking)s 694 X 4032 Y 1054 X(individual)s 1504 X(client)s 1770 X(programs.)s 2241 X(Such)s 2485 X(tracking)s 2856 X(requires)s 3221 X(extensive)s 3641 X(resources)s 4060 X(\(memory)s 4469 X(and)s 4656 X(diskspace\))s 5120 X(and)s 5307 X(is)s 694 X 4152 Y 1054 X(often)s 1284 X(considered)s 1741 X(a)s 1810 X(violation)s 2191 X(of)s 2299 X(privacy.)s 694 X 4320 Y 1054 X(With)s 1287 X(the)s 1442 X(exception)s 1863 X(of)s 1979 X(the)s 2133 X(ident)s 2365 X(section,)s 2705 X 0.0 10 10 f.B ft(wwwstat)s 3108 X 0.0 10 10 f.R ft(does)s 3323 X(not)s 3483 X(reveal)s 3758 X(information)s 4262 X(about)s 4516 X(the)s 4670 X(individual)s 5108 X(people)s 694 X 4440 Y 1054 X(making)s 1384 X(requests.)s 1791 X(Unless)s 2093 X(the)s 2245 X(output)s 2531 X(is)s 2628 X(limited)s 2942 X(to)s 3050 X(a)s 3124 X(speci\256c)s 3459 X(URL)s 3689 X(or)s 3802 X(a)s 3875 X(speci\256c)s 4209 X(hostname,)s 4646 X 0.0 10 10 f.B ft(wwwstat)s 0.0 10 10 f.R ft('s)s 5118 X(output)s 694 X 4560 Y 1054 X(does)s 1262 X(not)s 1415 X(connect)s 1750 X(the)s 1897 X(requester)s 2287 X(to)s 2390 X(the)s 2537 X(URL)s 2762 X(being)s 3009 X(requested.)s 694 X 4728 Y 874 X 0.0 9 9 f.B ft(Common)s 1252 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Log\256le)s 1555 X 0.0 9 9 f.S2 ft(O)s 0.0 9 9 f.B ft(Format)s 1883 X 0.0 9 9 f.S2 ft(O)s 1921 X(O)s 1959 X(O)s 694 X 4848 Y 1054 X 0.0 10 10 f.R ft(The)s 1235 X(httpd)s 1467 X(common)s 1843 X(log\256le)s 2125 X(format)s 2417 X(\(CLF\))s 2692 X(was)s 2872 X(de\256ned)s 3191 X(in)s 3294 X(early)s 3518 X(1994)s 3743 X(as)s 3851 X(the)s 3998 X(result)s 4245 X(of)s 4353 X(discussions)s 4834 X(among)s 5131 X(server)s 694 X 4968 Y 1054 X(and)s 1252 X(access_log)s 1738 X(analyzer)s 2129 X(developers)s 2615 X(\(Roy)s 2869 X(Fielding,)s 3282 X(John)s 3525 X(Franks,)s 3876 X(Kevin)s 4174 X(Hughes,)s 4558 X(Ari)s 4745 X(Luotonen,)s 5207 X(Rob)s 694 X 5088 Y 1054 X(McCool,)s 1437 X(and)s 1611 X(Tony)s 1852 X(Sanders\))s 2231 X(on)s 2361 X(how)s 2563 X(to)s 2671 X(make)s 2917 X(it)s 3003 X(easier)s 3264 X(for)s 3409 X(analysis)s 3760 X(tools)s 3984 X(to)s 4091 X(be)s 4214 X(used)s 4426 X(across)s 4704 X(multiple)s 5067 X(servers.)s 694 X 5208 Y 1054 X(The)s 1234 X(format)s 1525 X(is:)s 694 X 5376 Y 1054 X(remote_host)s 1573 X(ident)s 1798 X(authuser)s 2161 X([date-time)s 2596 X(zone])s 2842 X("Request-Line")s 3487 X(Status-Code)s 4001 X(bytes)s 694 X 5544 Y 1054 X(where)s 1804 X(means)s 694 X 5664 Y 1054 X(------------)s 1804 X(--------------------------------------)s 694 X 5784 Y 1054 X(remote_host)s 1804 X(Client)s 2074 X(DNS)s 2299 X(hostname)s 2707 X(or)s 2815 X(IP)s 2929 X(address)s 694 X 5904 Y 1054 X(ident)s 1804 X(Identity)s 2140 X(check)s 2397 X(token)s 2644 X(or)s 2752 X("\261")s 694 X 6024 Y 1054 X(authuser)s 1804 X(Authorization)s 2384 X(user-id)s 2686 X(or)s 2794 X("\261")s 694 X 6144 Y 1054 X(date-time)s 1804 X(dd/Mmm/yyyy:hh:mm:ss)s 694 X 6264 Y 1054 X(zone)s 1804 X(+dddd)s 2085 X(or)s 2193 X(\261dddd)s 694 X 6384 Y 1054 X(Request-Line)s 1804 X(The)s 2005 X(\256rst)s 2207 X(line)s 2402 X(of)s 2530 X(the)s 2697 X(HTTP)s 2992 X(request,)s 3350 X(which)s 3639 X(normally)s 4045 X(includes)s 4423 X(the)s 4590 X(method,)s 4960 X(URL,)s 5230 X(and)s 694 X 6504 Y 1804 X(HTTP-version.)s 694 X 6624 Y 1054 X(Status-Code)s 1804 X(Response)s 2212 X(status)s 2465 X(from)s 2684 X(server)s 2952 X(or)s 3060 X("\261")s 694 X 6744 Y 1054 X(bytes)s 1804 X(Size)s 2001 X(of)s 2109 X(Entity-Body)s 2629 X(transmitted)s 3104 X(or)s 3212 X("\261")s 694 X 6864 Y 1054 X(------------)s 1804 X(--------------------------------------)s 694 X 7032 Y 1054 X(with)s 1267 X(each)s 1484 X(\256eld)s 1697 X(separated)s 2108 X(by)s 2243 X(a)s 2322 X(single)s 2596 X(space)s 2852 X(\(it)s 2976 X(turns)s 3211 X(out)s 3374 X(that)s 3559 X(problems)s 3966 X(occur)s 4222 X(if)s 4317 X(the)s 4473 X(ident)s 4707 X(token)s 4963 X(contains)s 5330 X(a)s 694 X 7152 Y 1054 X(space,)s 1325 X(which)s 1594 X(was)s 1774 X(not)s 1927 X(anticipated)s 2390 X(by)s 2515 X(the)s 2662 X(original)s 2998 X(designers\).)s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(8)s 7920 Y page 0.0 10 10 f.R ft %%Page: 9 9 694 X 480 Y(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 2586 X(USER COMMANDS )s 4852 X(wwwstat)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\()s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(1)s 0.0 10 10 f.S2 ft(O)s 0.0 10 10 f.R ft(\))s 694 X 960 Y 0.0 9 9 f.B ft(LIMITATIONS)s 1337 X 0.0 9 9 f.S2 ft(O)s 1375 X(O)s 1413 X(O)s 1451 X(O)s 1489 X(O)s 694 X 1080 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1450 X 0.0 10 10 f.R ft(cannot)s 1741 X(be)s 1860 X(more)s 2090 X(accurate)s 2446 X(than)s 2643 X(its)s 2763 X(input.)s 694 X 1248 Y 1054 X(The)s 1239 X(common)s 1619 X(log\256le)s 1905 X(format)s 2201 X(does)s 2414 X(not)s 2572 X(include)s 2896 X(the)s 3048 X(amount)s 3378 X(of)s 3491 X(bytes)s 3732 X(transferred)s 4193 X(in)s 4301 X(HTTP)s 4581 X(header)s 4876 X(\256elds)s 5123 X(and)s 5296 X(in)s 694 X 1368 Y 1054 X(error)s 1291 X(responses.)s 1773 X 0.0 10 10 f.B ft(wwwstat)s 2188 X 0.0 10 10 f.R ft(attempts)s 2571 X(to)s 2693 X(estimate)s 3070 X(those)s 3325 X(bytes)s 3580 X(based)s 3850 X(on)s 3993 X(the)s 4158 X(response)s 4550 X(code.)s 4831 X(Although)s 5252 X(the)s 694 X 1488 Y 1054 X(built-in)s 1381 X(estimates)s 1785 X(will)s 1973 X(su)s /Cff { (f) show xsiz pt 20 div neg 0 rmoveto (f) s } def Cff(ice)s 2271 X(for)s 2419 X(most)s 2646 X(applications,)s 3186 X(your)s 3401 X(results)s 3694 X(will)s 3882 X(be)s 4007 X(more)s 4243 X(accurate)s 4605 X(if)s 4697 X(the)s 4850 X(estimates)s 5253 X(are)s 694 X 1608 Y 1054 X(customized)s 1534 X(for)s 1675 X(the)s 1822 X(particular)s 2229 X(server)s 2497 X(software)s 2865 X(that)s 3040 X(generated)s 3452 X(the)s 3599 X(log\256le.)s 694 X 1776 Y 1054 X(Modern)s 1406 X(httpd)s 1648 X(servers)s 1966 X(have)s 2190 X(extended)s 2586 X(the)s 2744 X(CLF)s 2964 X(to)s 3078 X(include)s 3408 X(additional)s 3844 X(\256elds)s 4097 X(\(Referer)s 4464 X(and)s 4644 X(User-Agent\))s 5178 X(or)s 5296 X(to)s 694 X 1896 Y 1054 X(make)s 1300 X(the)s 1452 X(entire)s 1709 X(format)s 2005 X(con\256gurable.)s 2583 X(Although)s 2990 X 0.0 10 10 f.B ft(wwwstat)s 3390 X 0.0 10 10 f.R ft(is)s 3486 X(able)s 3681 X(to)s 3788 X(read)s 3988 X(log\256les)s 4312 X(which)s 4585 X(append)s 4902 X(information)s 694 X 2016 Y 1054 X(to)s 1160 X(the)s 1310 X(CLF,)s 1547 X(it)s 1631 X(will)s 1815 X(not)s 1971 X(make)s 2215 X(use)s 2376 X(of)s 2487 X(that)s 2665 X(additional)s 3093 X(information.)s 3643 X(However,)s 4061 X 0.0 10 10 f.B ft(wwwstat)s 4460 X 0.0 10 10 f.R ft(is)s 4555 X(written)s 4866 X(in)s 4972 X 0.0 10 10 f.B ft(perl)s 0.0 10 10 f.R ft(,)s 5197 X(so)s 5313 X(if)s 694 X 2136 Y 1054 X(you)s 1229 X(want)s 1448 X(to)s 1551 X(parse)s 1786 X(a)s 1855 X(di)s Cff(erent)s 2218 X(format)s 2509 X(all)s 2634 X(you)s 2809 X(have)s 3022 X(to)s 3125 X(do)s 3250 X(is)s 3342 X(change)s 3649 X(the)s 3796 X(parsing)s 4115 X(code.)s 694 X 2304 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1474 X 0.0 10 10 f.R ft(does)s 1706 X(not)s 1883 X(do)s 2032 X(anything)s 2431 X(with)s 2658 X(Referer)s 3005 X([sic])s 3231 X(or)s 3363 X(User-Agent)s 3877 X(information)s 4398 X(that)s 4597 X(may)s 4818 X(be)s 4960 X(present)s 5296 X(in)s 694 X 2424 Y 1054 X(extended)s 1455 X(log\256les.)s 1841 X(In)s 1965 X(order)s 2216 X(to)s 2335 X(do)s 2475 X(anything)s 2865 X(interesting)s 3327 X(with)s 3545 X(Referer,)s 3908 X(the)s 4070 X(program)s 4448 X(would)s 4738 X(have)s 4966 X(to)s 5084 X(build)s 5330 X(a)s 694 X 2544 Y 1054 X(Request-URI)s 1607 X(x)s 1683 X(Referer)s 2007 X(x)s 2083 X(Count)s 2354 X(table,)s 2599 X(which)s 2869 X(would)s 3145 X(require)s 3453 X(huge)s 3673 X(gobs)s 3888 X(of)s 3997 X(memory)s 4356 X(and)s 4525 X(is)s 4617 X(better)s 4869 X(done)s 5088 X(using)s 5330 X(a)s 694 X 2664 Y 1054 X(separate)s 1405 X(program)s 1768 X(with)s 1971 X(a)s 2040 X(persistent)s 2448 X(database.)s 2866 X(Naturally,)s 3293 X(this)s 3463 X(is)s 3555 X(easy)s 3757 X(to)s 3860 X(do)s 3985 X(once)s 4198 X(you)s 4373 X(learn)s 4597 X 0.0 10 10 f.B ft(perl)s 0.0 10 10 f.R ft(.)s 694 X 2832 Y 0.0 9 9 f.B ft(AUTHOR)s 1112 X 0.0 9 9 f.S2 ft(O)s 1150 X(O)s 1188 X(O)s 1226 X(O)s 1264 X(O)s 694 X 2952 Y 1054 X 0.0 10 10 f.R ft(Roy)s 1268 X(Fielding)s 1648 X(\(\256elding@ics.uci.edu\),)s 2610 X(University)s 3078 X(of)s 3207 X(California,)s 3683 X(Irvine.)s 4017 X(Please)s 4318 X(do)s 4464 X(not)s 4638 X(send)s 4867 X(questions)s 5291 X(or)s 694 X 3072 Y 1054 X(requests)s 1409 X(to)s 1514 X(the)s 1663 X(author,)s 1970 X(since)s 2202 X(the)s 2351 X(number)s 2683 X(of)s 2793 X(requests)s 3147 X(has)s 3307 X(long)s 3512 X(since)s 3744 X(overwhelmed)s 4314 X(his)s 4458 X(ability)s 4741 X(to)s 4846 X(reply,)s 5103 X(and)s 5274 X(all)s 694 X 3192 Y 1054 X(future)s 1317 X(support)s 1642 X(will)s 1823 X(be)s 1942 X(through)s 2278 X(the)s 2425 X(mailing)s 2756 X(list)s 2904 X(\(see)s 3089 X(above\).)s 694 X 3360 Y 1054 X 0.0 10 10 f.B ft(wwwstat)s 1452 X 0.0 10 10 f.R ft(was)s 1634 X(originally)s 2050 X(based)s 2303 X(on)s 2429 X(a)s 2499 X(multi-server)s 3013 X(statistics)s 3384 X(program)s 3748 X(called)s 4012 X 0.0 10 10 f.B ft(fwgstat-0.035)s 4606 X 0.0 10 10 f.R ft(by)s 4732 X(Jonathan)s 5113 X(Magid)s 694 X 3480 Y 1054 X(\(jem@sunsite.unc.edu\))s 2006 X(which,)s 2303 X(in)s 2409 X(turn,)s 2623 X(was)s 2806 X(heavily)s 3128 X(based)s 3383 X(on)s 3511 X 0.0 10 10 f.B ft(xferstats)s 3904 X 0.0 10 10 f.R ft(\(packaged)s 4340 X(with)s 4545 X(the)s 4694 X(version)s 5015 X(17)s 5142 X(of)s 5252 X(the)s 694 X 3600 Y 1054 X(Wuarchive)s 1516 X(FTP)s 1714 X(daemon\))s 2088 X(by)s 2213 X(Chris)s 2455 X(Myers)s 2735 X(\(chris@wugate.wustl.edu\).)s 694 X 3768 Y 1054 X(This)s 1271 X(work)s 1515 X(has)s 1687 X(been)s 1914 X(sponsored)s 2358 X(in)s 2474 X(part)s 2667 X(by)s 2805 X(the)s 2965 X(Defense)s 3329 X(Advanced)s 3771 X(Research)s 4174 X(Projects)s 4534 X(Agency)s 4882 X(under)s 5147 X(Grant)s 694 X 3888 Y 1054 X(Numbers)s 1473 X(MDA972-91-J-1010)s 2346 X(and)s 2542 X(F30602-94-C-0218.)s 3416 X(This)s 3646 X(software)s 4041 X(does)s 4276 X(not)s 4456 X(necessarily)s 4951 X(re\257ect)s 5252 X(the)s 694 X 4008 Y 1054 X(position)s 1402 X(or)s 1510 X(policy)s 1785 X(of)s 1893 X(the)s 2040 X(U.S.)s 2243 X(Government)s 2767 X(and)s 2936 X(no)s 3061 X(o)s Cff(icial)s 3369 X(endorsement)s 3904 X(should)s 4196 X(be)s 4315 X(inferred.)s 694 X 7680 Y(Sun Release 4.1)s 2382 X(Last change: 03 November 1996)s 5324 X(9)s 7920 Y page 0.0 10 10 f.R ft %%Trailer %%DocumentFonts: count { pop } repeat % a little cleanup is necessary vmstat restore X(the)s 1442 X(exception)s 1863 X(of)s 1979 X(the)s 2133 X(ident)s 2365 X(section,)s 2705 X 0.0 10 10 f.B ft(wwwstat)s 3108 X 0.0 10 10 fwwwstat-2.0/wwwstat.rc010064400060720000146000000246470623104234400157570ustar00fieldinggrad00002420013033# ========================================================================== # This is a configuration file for wwwstat. # # # # Please note that this is a perl include file, and thus may contain # anything that might be found in a perl script. However, it SHOULD ONLY # contain variable assignments which override the default values in wwwstat's # &init_defaults procedure (all global variables). Most options can also # be overridden on the command-line. # # wwwstat allows for two optional config files: # wwwstat.rc (normally where wwwstat is installed) # .wwwstatrc (normally in the user's home directory) # which are read in that order. The file pathnames can be changed using the # -F and -f options, respectively. If no path is supplied, then both files # are looked for on the include path, which is # # .:$ENV{'HOME'}:$ENV{'PERLLIB'}: # # All wwwstat defaults are listed below, but commented-out. You can change # the associated value by removing the ## comment and changing the assignment. # Use the command "perl -wc wwwstat.rc" to test the syntax (ignore typos). # # ========================================================================== # Mapping of Request URI to Archive Entry [default is none] # # ArchiveMap is an ordered list of string match and replacement patterns # in the form of an Nx3 array. Matches against the request-URI are # attempted in the listed order and the first match wins, with the result # being that the archive pathkey is changed to the replacement string. # If no patterns match, the request-URI remains the pathkey. # The first value is 'i' (case-insensitive) or 's' (case-sensitive). # The second value is the regexp to match against the request-URI # The third value is the replacement string if the pattern matches. # If the replacement is '' or undef, then the request entry is excluded # from all summary counts (this loses information). # No replacements are made if the -n, -c, or -C, options are in use. # # The array value can be set en masse # ## @ArchiveMap = ( ## 's', '^/Icons/\w', 'All Icons (site)', ## 's', '^/icons/\w', 'All Icons (server)', ## 'i', '/hidden/', 'All Hidden', ## ); # # or to append, use: push(@ArchiveMap,'i','pattern','replacement'); e.g., # ## push(@ArchiveMap,'i','\.gif$','All GIFs'); # # To insert, use: unshift(@ArchiveMap,'i','pattern','replacement'); # Other array modifiers (see perl manual): splice, pop, shift. # # ========================================================================== # Mapping of Internet Domain to Country/Organization Name # # The file domains.pl initializes the domain --> Country/Org mapping as # an associative array. wwwstat matches domains to names using a # suffix match of domain components, with the first (longest) match being # the categorization for the stats-by-domain listing. These values can be # added to or overridden here, e.g. # ## $DomainMap{'uci.edu'} = 'University of California, Irvine'; ## $DomainMap{'ics.uci.edu'} = 'UCI Information and Computer Science'; ## $DomainMap{'co.uk'} = 'UK Commercial'; # # NOTE: The key must be in lowercase. # # ========================================================================== # Output Options [defaults are what is listed in assignment] # # Specify the URL of the previous summary period (for use only as a # hypertext link). Set it = "" if link is unwanted. # The three-letter abbrev for last month is substituted at any "%M". # The four-number year of last month is substituted at any "%Y". # Note that this is the month prior to the earliest one in this summary. # ## $LastSummary = "stats-%Y/%M.wwwstats.html.gz"; # # Specify the perl regex pattern for directory index files. This will be # dependent on the server's DirectoryIndex config (usually in srm.conf). # 'index.html?' # matches "index.html" and "index.htm" # 'index(.(html?|cgi))?' # matches "index", "index.html", "index.htm", and "index.cgi" # '(([Oo]verview)|(index)).html?' # matches "Overview.html", "Overview.htm", "index.html", "index.htm", # "overview.html", and "overview.htm" # ## $DirectoryIndex = 'index(.(html?|cgi))?'; # # Specify the default location of your access log # ## $DefaultLog = '/usr/local/etc/httpd/logs/access_log'; # # Specify the command for displaying compressed files to STDOUT # ## $Zcat = 'gunzip -c'; # specify as null string if none are available ## $Zhandle = '(gz|Z|z)'; # list file extensions that indicate compressed # # If address in log entry is one word (a local host), append what? # Specify an appropriate '.sub.dom.ain' # ## $AppendToLocalhost = '.nowhere.com'; # # Specify whether (1) or not (0) you want to display the IP address # on reversed subdomain listings as follows: # ## $LocalFullAddress = 0; # Show full address for local hosts? ## $OthersFullAddress = 0; # Show full address for non-local hosts? ## $ShowUnresolved = 0; # Show all unresolved addresses? # # Specify whether (1) or not (0) you want to insert a hypertext # anchor for each URL in the archive section (-link option). # ## $InsertLink = 0; # # Specify whether (1) or not (0) you want to add CGI output headers # before the HTML summary. # ## $Do_CGI = 0; # # Specify whether (1) or not (0) you want the Archive URL to be # truncated (this saves output space and runtime memory, but loses info). # ## $TruncateLevel = 0; # Truncate after Nth hierarchy level? ## $TruncateFile = 0; # Truncate any trailing filename? # # Specify whether (1) or not (0) you want to lookup unresolved # IP addresses via DNS. Note that this could be *very* slow, particularly # for those machines that do not have DNS names (e.g., SLIP/PPP clients). # ## $LookupDNS = 0; ## $DNScachefile = 'dnscache'; # DBM file for persistent caching ## $DNSexpires = 5356800; # Cache for two months (in seconds) # # The following lines define the visible header fields for HTML output. # They may be changed/nationalized, but changing some may affect the # parsing algorithm for reading old summary files. Test all changes! # ## $OutputTitle = 'World Wide Web Access Statistics for www' . ## $AppendToLocalhost; # ## $UpdateHeader = 'Last updated: '; ## $LastSumHeader = 'Previous Full Summary Period'; ## $TotalsHeader = 'Totals for Summary Period: '; ## $ReqRcvHeader = 'Requests Received During Summary Period '; ## $BtransHeader = 'Bytes Transmitted During Summary Period '; ## $AvgReqHeader = 'Average Requests Received Daily '; ## $AvgByteHeader = 'Average Bytes Transmitted Daily '; # ## $TotalsFormat = "%s %14.0f\n"; # ## $StatsHeader = '%Reqs %Byte Bytes Sent Requests '; ## $StatsRule = '----- ----- ------------ -------- |'; ## $StatsFormat = '%s %s %12.0f %8d |'; # ## $PrefixTop = 'Top'; ## $PrefixTotal = 'Total'; # ## $DailyHeader = 'Transfers by Request Date'; ## $HourlyHeader = 'Transfers by Request Hour'; ## $DomainHeader = 'Transfers by Client Domain'; ## $SubdomainHeader = 'Transfers by Reversed Subdomain'; ## $ArchiveHeader = 'Transfers by URL/Archive Section'; ## $IdentHeader = 'Transfers by Remote Identity'; # # These Old headers are for reading old summary files # ## $OldDailyHeader = 'Daily Transmission Statistics'; ## $OldHourlyHeader = 'Hourly Transmission Statistics'; ## $OldDomainHeader = 'Total Transfers by Client Domain'; ## $OldSubdomainHeader = 'Total Transfers by Reversed Subdomain'; ## $OldArchiveHeader = 'Total Transfers from each Archive Section'; ## $OldIdentHeader = 'Total Transfers to each Remote Identifier'; # # The following sets the default ordering for the daily stats. # Change this to 1 if you always want gwstat-style output. # ## $ReverseDateSort = 0; # Display daily stats in reverse order. # # The following sets the default sort key for each section, # where 0 means sort by the primary key value (day, hour, domain, ...) # 1 means sort by the number of requests # 2 means sort by the number of bytes transferred # ## $SortDaily = 0; ## $SortHourly = 0; ## $SortDomain = 0; ## $SortSubdomain = 0; ## $SortArchive = 0; ## $SortIdent = 0; # # If the output of a section is sorted, you may also want to restrict # the output to only the N best in that section. # ## $TopDaily = 0; ## $TopHourly = 0; ## $TopDomain = 0; ## $TopSubdomain = 0; ## $TopArchive = 0; ## $TopIdent = 0; # # On the other hand, you may want to exclude (0) an entire section. # If set = 2, the top N is done first and then followed by normal section. # ## $Do_Daily = 1; # Display the Daily Statistics ## $Do_Hourly = 1; # Display the Hourly Statistics ## $Do_Domain = 1; # Display the Domain (Country) Statistics ## $Do_Subdomain = 1; # Display the Subdomain Statistics ## $Do_Archive = 1; # Display the Archive Statistics ## $Do_Ident = 0; # Display the Identity Statistics (DON'T PUBLISH) # # The rest of these options are normally only changed on the command-line # ## $Verbose = 0; # Display valid log entries on STDERR? ## $PrintInvalids = 0; # Display invalid log entries on STDERR? ## $PrintNonexist = 0; # Display requests resulting in HTTP errors? # ## $SearchAddress = ''; # Pattern to look for in hostname/IP addresses. ## $SearchCode = ''; # Pattern to look for in Code. ## $SearchDate = ''; # Pattern to look for in Date. ## $SearchTime = ''; # Pattern to look for in Hour. ## $SearchArchive = ''; # Pattern to look for in Archive names. ## $SearchMethod = ''; # Pattern to look for in Method. # ## $NotAddress = ''; # Pattern to reject entry if in IP addresses. ## $NotCode = ''; # Pattern to reject entry if in Code. ## $NotDate = ''; # Pattern to reject entry if in Date. ## $NotTime = ''; # Pattern to reject entry if in Hour. ## $NotArchive = ''; # Pattern to reject entry if in Archive names. ## $NotMethod = ''; # Pattern to reject entry if in Method. # ## $EscapeSpecials = '[+.]'; # Most users forget about regexp syntax # # so we escape these in -a -A -n -N # ========================================================================== 1; # This must be the last line # Show all unresolved addresses? # # Specify whether (1) or not (0) you want to insert a