
               Nihuo Web Log Analyzer for Linux User Manual
---------------------------------------------------------------------------
                                                                 


Copyright
---------------------

Copyright(c) 2001-2010 Nihuo Software. This user manual and the software 
described in it are copyrighted with all rights reserved. Neither the 
manual nor the software may be copied in whole or part without the written
consent of Nihuo Software, except as described in the license agreement 
included with the software.



Trademarks
---------------------

Nihuo Web Log Analyzer is a trademark of Nihuo Software. All other brands
and products referenced herein are the service marks, trademarks or 
registered trademarks of their respective holders.



License Agreement
---------------------
The license agreement is contained within license.txt.
								


Quick Start 
---------------------
Nihuo Web Log Analyzer ships in a gzipped tar archive. Please extract it
with the following command line:

  tar xvzf nwla.[version].tar.gz
  
you can now run Nihuo Web Log Analyzer by changing to the nwla directory, 
and typing the name of the executable file "nwla" from the command line.

The Linux versions of Nihuo Web Log Analyzer require Command Line 
operation. "./nwla -h at any time will list all command line parameters.


Command line options
---------------------

Command                    Description 
---------------------------------------------------------------------------

-h, --help                 Display all available command line options
                           and exit program.


-v, --version              Print program version and exit program

-f, --logfile=FILE         Specify the log file to process.
                           * and ? can be used as wildcards to match 
                           multi log files

-f, --logfile=ftp://url    Source your logs from an ftp server
                           ftp://username:password@site/logfile
                           * and ? are accepted in file name as wildcards.

-f, --logfile=http://url   Source your logs from an ftp server
                           ftp://username:password@site/logfile
                           * and ? are accepted in file name as wildcards.

-c, --logcache=FOLDER      Specify log file download cache folder.

-d, --databasepath=PATH    Specify database folder. 

-o, --output=PATH          Specify output directory. 

-m, --logformat=\FORMAT\   Specify custom log format string. 

-k, --pagebreak=MODE       Specify page bkeak mode. 
                           0:Individual report, 
			   1:Mutli reports, 
                           2:Single page, 
			   default is 0

-t, --template=NAME        Specify template name. 
                           Available options are apple, black, green, general.

-l, --language=NAME        Specify language.

-u, --siteurl=URL          Specify the site url for the reports generated.

-a, --homepage=HOMEPAGE    Specify the site home page file name.

-x, --extension=EXT        Specify extension for generated report files.
                           Default is html

-i, --index=NAME           Specify index.html aliases for generated report

-e, --table=NUM            This option specifies the number of entries to
                           display in table

-r, --reporttitle=TITLE    Define the title of the report.

--timerange=MODE           Define the time range mode for analysis job
        
	Available time range mode option: 

        all                All dates (default).
        last15minsoflog    Last 15 minutes of log.
        lasthouroflog      Last hour of log.
        last24hoursoflog   Last 24 hours of log.
        lastdayoflog       Last day of log.
        last7daysoflog     Last 7 days of log.
        lastweekoflog      Last week of log.
        last30daysoflog    Last 30 days of log.
        lastmonthoflog     Last month of log.
        first15minsoflog   First 15 minutes of log.
        firsthouroflog     First hour of log.
        first24hoursoflog  First 24 hours of log.
        firstdayoflog      First day of log.
        first7daysoflog    First 7 days of log.
        firstweekoflog     First week of log.
        first30daysoflog   First 30 days of log.
        firstmonthoflog    First month of log.
        custom             Specify time range by
                           --startdate and --enddate option.

--startdate=YYYYMMDD       Set start date YYYYMMDD for 
                           custom time range mode.
--enddate=YYYYMMDD         Set end date YYYYMMDD for
                           custom time range mode.

--sessiontime=mins         Specify the length in minutes of non activity
                           that defines a new session, default is 30 mins

--time_adjust=hh:mm:ss     Adjust an offset to time field of log data

--hitfilter=FILE           Specify Nihuo hit filter file.
--visitfilter=FILE         Specify Nihuo visit filter file.

--trackfile<N>=FILE        Specify files to track, 1 <= N <= 100.

-g, --debug                Display additional 'debugging' information for
                           errors and warnings produced during processing.

-q, --quite                Quiet mode.  Normally, Nihuo Web Log Analyzer 
                           will produce various messages while it runs 
			   letting you know what its doing. This option
			   will suppress those messages.  It should be
			   noted that this WILL NOT suppress errors and
			   warnings, which are output to STDERR.

--dailyreport              Generate a report for each day

--weeklyreport             Generate a report for each week

--monthlyreport            Generate report for each month

--yearlyreport             Generate report for each year

--totaluv                  Enable total unique visitors statistic.

--ignore_case              Convert file name to low case

--ignore_param             Ignore parameters in the file names
                           (The text after question marks(?))

--cmdfile=FILE             if you have many parameters to use, then place
                           them into a text file. Any line starting with 
			   "#" is a comment and the value pairs use ":" 
			   as a delimiter. An option which expects a value
			   is considered as an option value pair, while 
			   options without a value are considered flags. 

--license                  Print program license agreement and exit program

--cpu=LIMIT                Upper CPU usage limit.
                           5 <= LIMIT <= 100. Default is 100%.

--trialedition=MODE        Select trial edtion. Available choices:
                           pro : Professional Edition
                           ent : Enterprise Edition
                           Default is ent (Enterprise Edition)

--reg=SERIAL               Perform registration procedure.



Below command line options are only available in Enterprise Edition. 

Command                    Description 
---------------------------------------------------------------------------
--logfile<N>=FILE          Specify log files for each server which is from  
            =ftp://url     web farm or load balancing cluster. 
            =http://url    1 <= N <= 100. 
                          

--logcache<N>=FOLDER       Specify log file download cache folder for each
                           server. 1 <= N <= 100. 

--server<N>=NAME           Specify name for each server. 1 <= N <= 100. 



Examples
---------------------

./nwla -f=/usr/local/apache/logs/access_log* -o=./report/
        -d=./db/project1 -u=http://www.mydomain.com -a=index.php

Analze web server log files which are /usr/local/apache/logs/access_log*,
save the reports in ./report/. domain is www.mydomain.com and home page 
file of the domain is index.php. Data will be stored in ./db/project1. 

*********************

./nwla -o=./report/ -d=./db/project1 -u=http://www.mydomain.com\
       --logfile1=ftp://logadmin:1234@server1.mydomain.com/logs/access_log*\
       --logcache1=./logs/server1 --server1="Web Server1"\
       --logfile2=ftp://logadmin:1234@server2.mydomain.com/logs/access_log*\
       --logcache1=./logs/server2 --server1="Web Server2"
       -a=index.php 

Download log files from server1.mydomain.com to ./logs/server1, download 
from server2.mydomain.com to ./logs/server, and generate the report 
to ./report/.



Configuration
---------------------
You can configure Nihuo Web Log Analyzer by editing the configuration 
file "nwla.ml". 

nwla.ml is a xml style text file. You can edit it with any text editor. 
With rich comment and self-describing tag, the configuration file is very
easy to be understood. 

It's not compatible with nwla.ml for Windows version. 

Browser, OS, Spider, Intranet configuration can be edited in the
configuration file directly. 

Note: Intranet configuration works only in Enterprise edition. 



Filters
---------------------
Nihuo Web Log Analyzer is integrated with a powerful filter system for
data mining. 

Sub-directory 'filter' contains a collection of predefined Nihuo Web Log 
Analyzer filters to help you include or exclude specific hits or visitors
in the web site traffic reports. 

Please check filters.txt for more detail information. 

