Statistics do not work OJS

There was a problem with the metrics table. There are no new entries in the metrics table. In connection with these, I can not expose the statistics. What could have happened? And what can I do about it?

Hi @dmitriev

Could you explain a little bit more what is happening?
What OJS version are you using?
Are you usage statistics log files processed correctly? If not what is in the appropriate scheduled task log files – is there any error/warning there?
Are you using Acron plugin or a Cron job for running the scheduled task?


Hello, Božana
I recently started using OJS
I’m using the old version Yes Acron plugin is included and the files “usasEventLogs”
are present in the system, and in the “metrics” table such records began to appear.

Hi @dmitriev

From your screenshot I see that there are only old OJS view counts in the database table metrics (metric_type = ojs:: legacyDefault). They are the numbers OJS collected in the earlier versions. Since 2.4.3 (I believe) there is a new plugin that should provide the statistics – the Usage Statistics plugin. Apparently it is enabled for you and the log files are there, but they seem not to be processed.
S. this document:

Could you tell me what is in your database table scheduled_tasks i.e. if there is an entry with plugins.generic.usageStats.UsageStatsLoader? And do you have any scheduled task log with the name starting with “Usagestatisticsfileloadertask-” in your files_dir folder scheduledTaskLogs/?
Also, do you have any entry in your DB table metrics where metric_type = ojs::counter?
Do you have anything in your usageStats/archive/ or reject/ folder?


Hello, Božana
Yes in my database there is a table “scheduled_tasks” and yes there is a record “plugins.generic.usageStats.UsageStatsLoader” with the date 2017-10-03 10:53:08.
And also in the “metrics” table there is an entry where “metric_type = ojs :: counter”
And in the “usageStats / archive /” folder there are files, but in the folder reject / there are no files. But unfortunately, I could not find the folder “scheduledTaskLogs /” in my “files_dir” folder.

What is the last date or load_id in your DB table metrics with the metric_type = ojs::counter?
How many log files do you have in the folder usasEventLogs/?

Hmm… apparently there were no log files for scheduled task in OJS 2.4.5, but the e-mails would be sent to the admin, I think. Does your admin get any e-mails about that scheduled task?

Hello, Božana

The latest date is 20170319, and the “load_id” usage_events_20170319.log. Yes in the folder “usasEventLogs” at the moment there is one file usage_events_20171003.log. Really the mail came.
If I correctly understand that files from the log are processed and go through all the processing stages, but for some reason there are no records in the database.

Hi @dmitriev

Hmmm… Strange… :slight_smile:
Are all the other, older log files in the folder archive/ i.e. are maybe any in the folder reject/ or process/?
If they are in the archive/ folder: would it be possible for you to send me the full DB dump of your two DB tables metrics or table usage_stats_temporary_records?

Did maybe something happen with your DB table metrics or table usage_stats_temporary_records in the meantime (e.g. any strange setting)? :slight_smile:
How does your DB table usage_stats_temporary_records look like?


hi @Bozana
hi @dmitriev

maybe they solved that problem because I have the same problem and my statistics do not work, I am using ojs and I already revice all those who commented but my statistics still do not work, some idea.
Thank you

@bozana Hello,

I am using latest ojs 3.1.2-1 and my “usage_stats_temporary_records” table is empty what does it suggest can you please share with us?

Also my table “metrics” is filled with data over 280k of number of records up to yesterday.

attached is directory listing screenshots

We are hoping very much to hear from you @bozana

Thank you!