1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

AWstats and restored access_log.processed

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by blank, Mar 1, 2010.

  1. blank

    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?
  2. blank

    blank Guest

    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: Mar 2, 2010