awstats


linux statistics hugo

Awstats

  1. Download logs from questions.ebharat.online

     rsync -av "-e ssh -p 1891" --progress --inplace root@questions.ebharat.online:/var/log/httpd/access_log* /home/lxc_containers/Slackware64-14.2/rootfs/home/wrodrigues/httpd_log/.
     old: rsync -av --progress --inplace --rsh="ssh -i /home/wrodrigues/wce/amazon/MyFirstInstance.pem" testquestions.online:/tmp/access_log* ~/code/phpdev/data/
    
  2. Run the command from /var/www/htdocs/awstats :

    perl awstats_configure.pl

Configure awstats

  1. View and edit: /etc/awstats/awstats.questions.ebharat.online.conf LogType LogFile DirData LogFormat

  2. Update the stats:

    /var/www/htdocs/awstats/wwwroot/cgi-bin/awstats.pl -update -config=churches.ebharat.online -LogFile="/var/www/htdocs/awstats/logresolvemerge.pl /home/wrodrigues/httpd_log/access_log |";/var/www/htdocs/awstats/wwwroot/cgi-bin/awstats.pl -update -config=questions.ebharat.online -LogFile="/var/www/htdocs/awstats/logresolvemerge.pl /home/wrodrigues/httpd_log/access_log |" ;/var/www/htdocs/awstats/wwwroot/cgi-bin/awstats.pl -update -config=elections.ebharat.online -LogFile="/var/www/htdocs/awstats/logresolvemerge.pl /home/wrodrigues/httpd_log/access_log |"
  1. View in browser: http://10.0.3.42/awstats/awstats.pl?config=questions.ebharat.online
  2. View in browser: http://10.0.3.42/awstats/awstats.pl?config=churches.ebharat.online
  3. View in browser: http://10.0.3.42/awstats/awstats.pl?config=elections.ebharat.online

Running old logs

  1. rename the month wise file eg.
    mv /var/lib/awstats/awstats092018.questions.ebharat.online.txt /var/lib/awstats/awstats092018.questions.ebharat.online.txt.old
  1. run the old files in sequence eg.
    /var/www/htdocs/awstats/wwwroot/cgi-bin/awstats.pl -update -config=questions.ebharat.online -LogFile="/var/www/htdocs/awstats/logresolvemerge.pl /home/vagrant/data/access_log-20180909 |"
   /var/www/htdocs/awstats/wwwroot/cgi-bin/awstats.pl -update -config=questions.ebharat.online -LogFile="/var/www/htdocs/awstats/logresolvemerge.pl /home/vagrant/data/access_log-20180916 |"
   /var/www/htdocs/awstats/wwwroot/cgi-bin/awstats.pl -update -config=questions.ebharat.online -LogFile="/var/www/htdocs/awstats/logresolvemerge.pl /home/vagrant/data/access_log-20180923 |"