Next / Previous / Contents / TCC Help System / NM Tech homepage

6.2. Input file paths

These constants point to the locations of input files. ACCESS_LOGS_DIR is the absolute path name of the directory where all the access logs reside. Note that this path exists only on infohost.nmt.edu.

webstats.py
ACCESS_LOGS_DIR  =  "/var/log/httpd/"

Within that directory, there is one current access log, and zero or more older logs, whose names are the same as the current access log plus extensions “.1”, “.2”, and so on.

webstats.py
ACCESS_LOG_PATH  =  ACCESS_LOGS_DIR + "access_log"

DAYS_PER_LOG defines the number of days in each older log, currently rotated weekly.

webstats.py
DAYS_PER_LOG  =  7

N_OLDER_LOGS defines the minimum number of older logs we must read to be sure that we'll have EXPIRE_DAYS of data.

webstats.py
N_OLDER_LOGS  =  int ( math.ceil ( float ( EXPIRE_DAYS ) /
                                    DAYS_PER_LOG ) )

HITS_CUTOFF defines the minimum number of hits a page needs to appear on the hit parade report.

webstats.py
HITS_CUTOFF  =  10