Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Under Development

This is under development, and is subject to many changes

  • Using awstats-6.8
  • Runs on caje.
  • Current path of software is /ucd/opt/sakai/tmp
  • Changes made to awstats itself
    • Created config /ucd/opt/sakai/tmp/awstats-6.8/wwwroot/cgi-bin/awstats.ss_test_tc.conf based off of awstats.model.conf for smartsite test
      • Set SiteDomain (smartsite-test.ucdavis.edu)
      • Set HostAliases (added all appserver names)
      • Disabled DNS lookups (DNSLookup=0)
      • Set DirData to /ucd/opt/sakai/tmp/awstats-6.8/var/lib/awstats
      • Set DirIcons to http://caje.ucdavis.edu/awstats/icon/
      • Put load balancer IP in SkipHosts
    • Created config /ucd/opt/sakai/tmp/awstats-6.8/wwwroot/cgi-bin/awstats.ss_test_tc.conf based off of awstats.model.conf for smartsite test
      • Set SiteDomain (smartsite.ucdavis.edu)
      • Set HostAliases (added all appserver names)
      • Disabled DNS lookups (DNSLookup=0)
      • Set DirData to /ucd/opt/sakai/tmp/awstats-6.8/var/lib/awstats
      • Set DirIcons to http://caje.ucdavis.edu/awstats/icon/
      • Put load balancer IP in SkipHosts
  • Command Decision: Decided to not run as CGI, but generate HTML externally.
    • Set up all the sundry stuff on webserver (path /var/www/html/sakai/awstats/* came from what was in webroot in the awstats home)
  • Since awstats supports perl style inclusions and since we have many different access logs, decided to import files atomically and left them bzip'd.
  • Created import script /ucd/opt/sakai/tmp/scripts/awimport.sh
  • It works basically by using find and sort to generate a chronological list of access log files for import, and then importing them using awstats.pl
  • The following variables are set and are global across all environments(eg test,prod):
    • DATA_DIR - Path to store file lists of already imported files
    • AWSTATS_HOME - Path where to find awstats.pl
    • AWSTATS_TOOLS - Path where to find awstats helper perl scripts
    • BZCAT_CMD - Full path to program to cat bzip2 files.
  • The following variables are specific to each environment:
    • AW_CONFIG - base file name of the awstats.pl config file. Since its unique to an environment its uses as a key for tons of things
    • AFS_LOGDIR - Path to find all the access log files. If used in conjunction with log_accum.pl it should be the path where the month directories live.
    • HTML_DIR - Path to place html result files
  • If a access log file name exists in the file $DATA_DIR/$AW_CONFIG.dat, it is skipped. While awstats does have this capability, it is also wordy about it, and this is more efficient.
  • Once all imports are complete, it generates the reports. It does this:
    • First create a save point for the HTML files. If this directory exists, clean it.
    • Save the HTML files by moving the current HTML_DIR to the save directory.
    • Create the HTML_DIR
    • cd into it and run awstats_buildstaticpages.pl to build the HTML files.
  • No labels