Problem with usage statistics

  • Application Version - e.g., OJS 3.1.2-1

We have problems with usage statistics, generally it is empty.
Like this:
obraz

I have looked into forum, without solution, running tools/runScheduledTasks.php changes nothing but not evoke any errors. In our files directory there is usageStats dir with only one subdir: usageEventLogs. There is log for every day. And that is it. What have I noticed is a fact that schema.xml have different fields than ones in my existing database table usage_stats_temporary_records.

Have anyone stumbled over such problem?

Pawel Pomorski

Hi @TruePepe, are you using the Acron plugin or are you running cron jobs to process your daily metrics?

If you have cron jobs setup, you might need to update them since the file location for scheduledTasksAutoStage.xml was changed in a recent OJS release. Here’s an example of the command to process metrics now if you use a cron task, which you should modify for your OJS location:

php /var/www/html/ojs/tools/runScheduledTasks.php /var/www/html/ojs/plugins/generic/usageStats/scheduledTasksAutoStage.xml > /dev/null 2>&1

I’m having the same problem as OP with stats in a journal i’m helping manage. I have stats enabled, but it shows as empty in the metrics count. My metrics table in the DB is empty.
Could you please explain the last part of that command? The /dev/null 2>&1? I have found the location of my scheduledTasksAutoStage.xml (/lib/pkp/plugins/generic/usageStats), but i dont quite get that last part. Is it platform dependant?

Edit: I get now the /dev/null part. To disable mailing. Though I’m still not getting any registers in the metrics table after running that. Also, by disabling acron, i guess i must create a scheduled task for other things, like Crossref registering, right?

Hi Kaitlin,
Well, I have tried running runScheduledTasks.php, it takes some time and does nothing. I have also done simple experiment: configured local server on xampp and made copy of the OJS on it (to try debug anything) and then… everything was OK, statistics is working! So i guess the problem is my hosting, not the system. Have any guess what may be the problem?

Hi kaitlin,
My Happiness was premature, everything works perfectly, but only from the date of update from version 3.1.2.0 to 3.1.2.1. Earlier log files are processed (moved from stage to archive dir), but do not generate any lines in metrics table.

If I can comment - it’s very important that the base_url parameter in your config.inc.php file exactly matches the URLs being logged in the usage stats logs files. If they differ even a little bit, including http:// or https://, the lines will not be counted. Did anything change in your journal configuration when you upgraded?

The scheduled task log will probably contain reasons why files are being skipped.

Cheers,
Jason