General options for both aw-parser and aw-report: |
-v | Verbose mode | AccessWatch shows you what it
is doing when generating the report. |
-q | Quiet mode | AccessWatch is silent, with no output other than errors. |
-c | Configuration File | Allows 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: |
-l | Access Log | Specify path to an alternate access log |
For example...
aw-parser.pl -l /logfiles/mydomain.com/access_log
|
-e | Erase data files | Will eliminate accumulated stats and
clear space. |
Time period options |
-s | Generate stats for current month |
-d | ... last 24 hours |
-w | ... last 7 days |
-m | ... last 30 days |
-y | ... last 365 days |
aw-report options: |
-o | Report path | Specify an alternative
report directory |
For example...
example: aw-report -o
/websites/mydomain.com/aw
|
-r | Report
Range | Specify 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 |
-s | Generate stats for current month |
-d | ... last 24 hours |
-w | ... last 7 days |
-m | ... last 30 days |
-y | ... last 365 days |
Recommended command line: |
- Configure the accesswatch.cfg file in the accesswatch/cfg
directory.
- 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!
- 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/
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.
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
|