Using Wwwstat
Summary
This article introduces how to use wwwstat. Instructions are provided to help you analyze your current access_log data, and examples are included to help you customize the output of wwwstat. This article assumes a familiarity with the Personal Log File Service.
Included on this page:
Introduction
The Personal Log File Service delivers raw log file data to your personal access_log file. The wwwstat program can help you summarize this data into several categories:
- Number of requests per day
- Number of requests per hour
- Number of requests from specific computers
- Number of requests to each file
Example wwwstat output is available on the wwwstat home page.
Note: before you can use wwwstat you need access_log data. See information on the Personal Log File Service to learn how to turn on your access_log file and start accruing data.
Step-by-Step Instructions
The following instructions show you how to process the data in your current access_log file and deposit the results in your Web directory where they can be viewed with a Web browser.
Although the Personal Log File service delivers new data every night, you have to run the wwwstat command each time you want to generate a new summary. You might run the wwwstat command once a week or perhaps only on the first day of each month.
-
Log in to your Homer or Dante account.
-
Press the O key for Other, then press the W key to drop into the Web development environment.
-
At the prompt, enter the following command to change directories to your Web directory:
cd public_html
Your personal access_log is in this directory.
-
At the prompt, enter the following command to process your access_log file:
wwwstat -C 206 access_log > stats.html
This command deposits its results in a file called stats.html. The -C flag tells wwwstat not to count requests with HTTP status code 206, which was added in HTTP 1.1.
-
Since this file is in your Web directory, you view it in a Web browser with the URL http://servername.washington.edu/youruwnetid/stats.html. Substitute servername and youruwnetid appropriately.
Customizing Your Summaries
The wwwstat command supports several ways to create customized summaries:
-
Summarize requests during April
wwwstat -d 'Apr' access_log > stats.html
-
Summarize requests made to your home page (replace user)
wwwstat -n '^/user/$' access_log > stats.html
-
Summarize requests made to a subdirectory (replace user)
wwwstat -n '^/user/private/' access_log > stats.html
-
Exclude requests made to a subdirectory
wwwstat -N '/graphics/' access_log > stats.html
-
Exclude requests made to .gif files
wwwstat -N '.gif$' access_log > stats.html
-
Exclude requests made from a specific address (e.g. aol.com)
wwwstat -A '^aol.com$' access_log > stats.html
-
Summarize requests made to your home page during April, excluding requests made to .gif files and from a specific address
wwwstat -n '^/user/$' -d 'Apr' -N '.gif$' -A '^aol.com$' access_log > stats.html
To learn more about wwwstat, enter wwwstat -h at the prompt or refer to the wwwstat home page.
