Getstats 3.0 Scripts

Here are some sample scripts to be used with Getstats. The dayrot, orbit, and copy-weblogs.pl scripts must run on the web server hosts, but the others can run on any host that has access to the shared filesystem. More information about these scripts can be found in the installation instructions.

dayrot
Runs daily on the web server host. It calls orbit to create a new log file and rename the old log file. Then it sends a HUP to the server, and uses gzip to compress the previous day's log file.
orbit
Runs daily to create a new web server log file, and rename the old log file.
daily-logres.pl
Runs logres to resolve IP addresses into host names, and to clean up the log records. All seven daily log files must be processed before running weekly-reports.pl to concatentate them.
copy-weblogs.pl
Runs daily on the web server host, after the logs have been rotated. It copies the daily httpd logs to the shared filesystem, into the directory for the current week.
copy-seclogs.pl
Runs daily on the secure web server host, after the logs have been rotated. It copies the daily httpsd logs to the shared filesystem, into the directory for the current week.
weekly-set-date.pl
Runs weekly to update the current weekfile and to create a new subdirectory for the daily logfiles. Each subdirectory contains seven daily logfiles.
weekly-reports.pl
Runs weekly to concatenate the daily files into weekly files (using zcat), for each of the web servers: regular, secure, and development servers. Executes run-gs-std.pl to create reports for the regular server. Executes run-gs-sec.pl to create reports for the secure server. No reports are created for the development servers. Executes insert-date.pl to update weeklist.sel, which is included in the showstats web form using Server-Side Includes (SSI). Executes bad-links.pl to send error reports to individual users via email.
run-gs-std.pl
Runs getstats to read the weekly log files and create a full set of reports for the regular server. Also creates extract files, and the error list which is used by bad-links.pl.
run-gs-sec.pl
Runs getstats to read the weekly log files and create a full set of reports for the secure server.
bad-links.pl
Reads the error list and creates the error reports. The error reports will be mailed to individual users if the -s option is specified.
client-info.pl
Reads the log file (or extract file) and prints a client report: browser type, platform, operating system.
insert-date.pl
Runs after the reports have been successfully created, to update weeklist.sel. This updates the list of report dates available to the user on the showstats web form. Every six months or so, old reports can be removed from the system by the system administrator. At the same time, the weeklist.sel file should be trimmed accordingly, using a file editor.
showstats
CGI script that will display a complete report, or a report segment. User can select a report type, reporting date, directory name, levels or detail, etc. A sample web form is here.

* Academic Information Systems 212 854.1919 consultant@columbia.edu *
Research and Development Group
last modified on Sunday, 10-May-1998 19:42:34 EDT