Notice! This document is currently in
Archived
status.
The content of this document may be incorrect or outdated.
The content of this document may be incorrect or outdated.
Print this article Edit this article
Using Getstats
Purdue Engineering Computer Network
Getstats is a versatile Web server log analyzer. It takes the log files from your CERN, NCSA, Plexus, GN, MacHTTP, or UNIX Gopher server and spits back all sorts of statistics. Analog is the recommended log analyzer for Apache, which is the web server used on most ECN machines.
Getstats is a versatile Web server log analyzer. It takes the log files from your CERN, NCSA, Plexus, GN, MacHTTP, or UNIX Gopher server and spits back all sorts of statistics. Analog is the recommended log analyzer for Apache, which is the web server used on most ECN machines.
How to Access Getstats
The program getstats is located in /usr/local/etc/httpd/bin/getstats on all Solaris hosts running WWW. It is suggested that you create an alias for /usr/local/etc/httpd/bin/getstats since you most likely do not have /usr/local/etc/httpd/bin/ in your path, and ECN does not recommend you add it.Example 1. To alias /usr/local/etc/httpd/bin/getstats, the following syntax is recommended:
C Shell (.cshrc or .login):To get a usage message and list of options, type:
alias getstats "/usr/local/etc/httpd/bin/getstats"
Korn shell (.profile)
alias getstats='/usr/local/etc/httpd/bin/getstats'
getstats -z
Using Getstats
The log files are stored in /var/www/logs on the server host. To look at "today's" data (from 0430 to now), just run getstats with whatever report options you want.Today's log file is "access". Yesterday's is "access.<date in yyyymmdd format>.gz" (compressed).
For example, to look at today's accesses, for a full report, type:
/usr/local/etc/httpd/bin/getstats -r -l /var/www/logsOr for easier reading, type:
/usr/local/etc/httpd/bin/getstats -r -l /var/www/logs | more
To look at yesterday's:
gzip -dc /var/www/logs/httpd/access.<date in yyyymmdd format>.gz | getstats -i (other options)The
gzip -dc /var/www/logs/httpd/access.19990920.gz | getstats -i
-d
option will restore file to original form. The -c
option tells it to write to standard output.
To combine logs together:
cat /var/www/logs/access_log > filenameMake sure you have write permission where you want to write the file. For example, to write it to your home directory:
gzip -dc /var/www/logs/access.19990920.gz >> filename
gzip -dc /var/www/logs/access.19990919.gz >> filename
gzip -dc /var/www/logs/access.19990918.gz >> filename
gzip -dc /var/www/logs/access.19990920.gz > /home/harbor/b/debweb/yesterday_logfileand then
getstats -l filename [other options]
Last Modified:
Dec 19, 2016 11:12 am US/Eastern
Created:
Mar 21, 2007 12:11 pm GMT-4
by
admin
JumpURL: https://eng.purdue.edu/jump/87236