AWStats logfile analyzer 6.1 Documentation

 


Other tools


This is a list of other tools provided with AWStats.
All those tools are available in tools directory of AWStats distribution.




awstats_updateall.pl


awstats_updateall launches update process for all AWStats config files (except
awstats.model.conf) found in a particular directory, so you can easily setup a
cron/scheduler job. The scanned directory is by default /etc/awstats.

Usage: awstats_updateall.pl now [options]

Where options are:
-awstatsprog=pathtoawstatspl
-configdir=confdirtoscan



awstats_buildstaticpages.pl


awstats_buildstaticpages allows you to launch AWStats with -staticlinks option
to build all possible pages allowed by AWStats -output option.

Usage:
awstats_buildstaticpages.pl (awstats_options) [awstatsbuildstaticpages_options]

where awstats_options are any option known by AWStats
-config=configvalue is value for -config parameter (REQUIRED)
-update option used to update statistics before to generate pages
-lang=LL to output a HTML report in language LL (en,de,es,fr,...)
-month=MM to output a HTML report for an old month=MM
-year=YYYY to output a HTML report for an old year=YYYY

and awstatsbuildstaticpages_options can be
-awstatsprog=pathtoawstatspl gives AWStats software (awstats.pl) path
-dir=outputdir to set output directory for generated pages
-builddate=%YY%MM%DD Used to add build date in built pages filenames
-staticlinksext=xxx For pages with .xxx extension instead of .html
-buildpdf[=pathtohtmldoc] Build a PDF file after building HTML pages.
Output directory must contains icon directory
when this option is used (need 'htmldoc').

New versions and FAQ at http://awstats.sourceforge.net



urlaliasbuilder.pl


Urlaliasbuilder generates an 'urlalias' file from an input file.
The input file must contain a list of URLs (It can be an AWStats history file).
For each of thoose URLs, the script get the corresponding HTML page and catch the
header information (title), then it writes an output file that contains one line
for each URLs and several fields:
- The first field is the URL,
- The second is title caught from web page.
This resulting file can be used by AWStats urlalias plugin.

Usage: urlaliasbuilder.pl -site=www.myserver.com [options]

The site parameter contains the web server to get the page from.
Where options are:
-urllistfile=Input urllist file
If this file is an AWStats history file then urlaliasbuilder will use the
SIDER section of this file as its input URL's list.
-urlaliasfile=Output urlalias file to build
-overwrite Overwrite output file if exists
-secure Use https protocol

Example: urlaliasbuilder.pl -site=www.someotherhost.com

New versions and FAQ at http://awstats.sourceforge.net

This script was written from Simon Waight original works title-grabber.pl.


logresolvemerge.pl


logresolvemerge allows you to merge several log files into one output,
sorted on date. It also makes a fast reverse DNS lookup to replace
all IP addresses into host names in resulting log file.
logresolvemerge comes with ABSOLUTELY NO WARRANTY. It's a free software
distributed with a GNU General Public License (See COPYING.txt file).
logresolvemerge is part of AWStats but can be used alone as a log merger
or resolver before using any other log analyzer.

Usage:
logresolvemerge.pl [options] file
logresolvemerge.pl [options] file1 ... filen
logresolvemerge.pl [options] *.*
Options:
-dnslookup make a reverse DNS lookup on IP adresses
-dnscache=file make DNS lookup from cache file first before network lookup
-showsteps print on stderr benchmark information every 8192 lines
-addfilenum if used with several files, file number can be added in first
field of output file.

This runs logresolvemerge in command line to open one or several web
server log files to merge them (sorted on date) and/or to make a reverse
DNS lookup (if wanted). The result log file is sent on standard output.
Note: logresolvemerge is not a 'sort' tool to sort one file. It's a
software able to output sorted log records (with a reverse DNS lookup
included or not) even if log records are dispatched in several files.
Each of thoose files must be already independently sorted itself
(but that is the case in all web server log files). So you can use it
for load balanced log files or to process several old log files.

Don't forget that the main goal of logresolvemerge is to send log records to
a log analyzer in a sorted order without merging files on disk (NO NEED
OF DISK SPACE AT ALL) and without loading files into memory (NO NEED
OF MORE MEMORY). Choose of output records is done on the fly.

So logresolvemerge is particularly usefull when you want to output several
and/or large log files in a fast process, with no use of disk or
more memory and in a chronological order through a pipe (to be used by a log
analyzer.

Note: If input records are not 'exactly' sorted but 'nearly' sorted (this
occurs with heavy servers), this is not a problem, the output will also
be 'nearly' sorted but a few log analyzers (like AWStats) knowns how to deal
with such logs.

WARNING: If log files are old MAC text files (lines ended with CR char), you
can't run this tool on Win or Unix platforms.

WARNING: Because of important memory holes in ActiveState Perl version, use
another Perl interpreter if you need to process large lof files.

Now supports/detects:
Automatic detection of log format
Files can be .gz/.bz2 files if zcat/bzcat tools are available in PATH.
New versions and FAQ at http://awstats.sourceforge.net