• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

AWstats and restored access_log.processed

B

blank

Guest
How to get /usr/local/psa/admin/sbin/statistics to process a restored access_log.processed file?
After restoring web statistics and concatenating all into one large access_log.processed file, now I get error:

statistics: cannot seek /var/www/vhosts/[xxx].com/statistics/logs/access_log.processed at required position: Invalid argument

Already tried deleting the webstat directory, to no avail.. BTW the file is over 3.3 GB.

Any ideas?
 
OK after fiddling around, I found a workaround.. I think there's a slight possibility to lose some statistics but this is basically what it takes to get it working:
- from the Plesk backups gunzip+untar the logs
- concatenate all the logs together
- copy to statistics/logs/access_log.processed-all
- cat access_log>>access_log.processed-all && mv -f access_log.processed-all access_log && /sbin/service httpd graceful

It seems the Plesk statistics only looks at the access_log file and not the processed file. And oh, it runs log rotation on all domains even if you specify --calculate-one.

I need to do this for dozens of domains so obviously this needs to be completely scripted, I may post the script later..

Edit: but only static statistics pages for 2010 are generated, not for 2009.. Sounds like tedious to do manually even with scripting, is there any other solution?!
 
Last edited by a moderator:
Back
Top