Updating usage stats from a lot of old logs

Hello All,

Today one of the admins of my OJS (3.3.0-14) contacted me and asked why usage stats are not updated since august 2023.

Checking the configuration, our config.inc.php has scheduled_tasks = Off, that somehow nobody noticed for the last two years.

Luckily we stil have all the unprocessed log files in files_dir/usageStats/usageEventLogs, and all the previous ones since 2015 in files_dir/usageStats/archive.

My question here is: what is the best way to correct this problem? Should I simply set scheduled_tasks = On, set an specific time for runScheduledTasks.php to run (normally it runs once ever hour via cron) and wait for it to process the logs?

Looking here:

https://docs.pkp.sfu.ca/admin-guide/en/statistics

There is something about a tool called reprocessUsageStatsMonth.php, but this script doesn’t exist in my OJS… May I download and run it to rebuild the statistics?

Any help would be greatly appreciated.

Regards,

Oberdan

Took me some time to check how this statistics are created. It turns out the problem was far more simple. The permissions in my usageStats folder were messed up, and the ojs user was not able to move the files to stage and then proccess them. Now all is working fine again.

This topic was automatically closed after 7 days. New replies are no longer allowed.