home    Home || Download || Feedback || Help Access Watch . version 2
AccessWatch Command-Line Options

All options can be mixed. Command-line options override any settings in the configuration file. These options allow you to generate a powerful range of reports - if you are unfamiliar with them, start by using them one step at a time.
General options for both aw-parser and aw-report:
-vVerbose modeAccessWatch shows you what it is doing when generating the report.
-qQuiet modeAccessWatch is silent, with no output other than errors.
-cConfiguration FileAllows use of multiple or alternate configuration files.
For example...
   aw-parser.pl -c /websites/mydomain.com/accesswatch.cfg
   aw-report.pl -c /websites/mydomain.com/accesswatch.cfg
aw-parser options:
-lAccess LogSpecify path to an alternate access log
For example...
   aw-parser.pl -l /logfiles/mydomain.com/access_log
-eErase data filesWill eliminate accumulated stats and clear space.
Time period options
-sGenerate stats for current month
-d... last 24 hours
-w... last 7 days
-m... last 30 days
-y... last 365 days
aw-report options:
-oReport pathSpecify an alternative report directory
For example...
   example: aw-report -o /websites/mydomain.com/aw
-rReport RangeSpecify an range of dates to include in the report
-r takes an argument of the beginning and ending time of the report in the format YYYYMMDDHH-YYYYMMDDHH

For example...
   example: aw-report -r 1999010100-1999030113

This will generate a report on the log data for all dates between January 1, 1999 at 12 am and March 1, 1999 at 1 pm.

Time period options
-sGenerate stats for current month
-d... last 24 hours
-w... last 7 days
-m... last 30 days
-y... last 365 days
Recommended command line:
  1. Configure the accesswatch.cfg file in the accesswatch/cfg directory.
  2. Run this command daily:

    aw-parser.pl -d
    aw-report.pl -w
This will read your logfile and parse stats for the last day, then create a report of weekly stats. aw-parser will only update the stats that you haven't already parsed. This makes for a quick nightly update.
Advanced command line options:
You can combine all options to customize AccessWatch to your needs. Here are a few tips!

  1. For example, if your website document root is /websites/mydomain.com and your logfile is /logfiles/mydomain.com/access_log:

    aw-parser.pl -l /logfiles/mydomain.com/access_log
    aw-report.pl -o /websites/mydomain.com/aw
    This will read your logfile, and put the output in your web directory. You can then view the report at http://www.mydomain.com/aw/

  2. Time periods can be specified to aw-parser:

    aw-parser.pl -l /logfiles/mydomain.com/access_log -d
    aw-report.pl -o /websites/mydomain.com/aw
    ... will produce a report for the last 24 hours and place it in your web server directory.

  3. You can maintain multiple configuration files for AccessWatch, for multiple domains:

    aw-parser.pl -c /path/to/accesswatch/mydomain.com.cfg
    aw-report.pl -c /path/to/accesswatch/mydomain.com.cfg

    aw-parser.pl -c /path/to/accesswatch/yourdomain.com.cfg aw-report.pl -c /path/to/accesswatch/yourdomain.com.cfg