Error statistics OJS 2.4.8.1

Good morning

I have a problem with the statistics of OJS this not shown the statistics current year and other years, somebody could tell me why? or what can i do thank for the help.

Hi @christian_criollo,

Is the base_url in your config.inc.php accurate?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi asmecher

yes is in the config:inc.php and is correct

;;;;;;;;;;;;;;;;;;;;
; General Settings ;
;;;;;;;;;;;;;;;;;;;;

[general]

; Set this to On once the system has been installed
; (This is generally done automatically by the installer)
installed = On

; The canonical URL to the OJS installation (excluding the trailing slash)
base_url = “http://www.icesi.edu.co/revistas

Hi @christian_criollo,

Could you explain a little bit more, where is the problem, e.g. what statistics exactly do you mean, where exactly in the system, what exactly is not happening…?

Thanks!
Bozana

Hi Bozana
the statistics are use, the problem iis that in the table metrics not exist use statistics previous years for example it show statisitics year 2015, 2016 but not years 2014, 2013, 2012 and 2017 (actual year)

Hi @christian_criollo

Hmmm… How did you make the first screenshot – I do not know where to find that and what that is…

In the second screenshot I only see the old statistics (metric_type = ojs::legacyDefault) from the older OJS versions < 2.4.3. In the OJS version 2.4.3 a new statistics plugin “UsageStatistics” (metric_type = ojs::counter) was introduced and it should be used in order to have statistics. All the other older plugins i.e. statistics counting is not used any more – it is just kept/archived in the DB, so that user still have the numbers. See also this documentation: https://pkp.sfu.ca/wiki/index.php?title=PKP_Statistics_Framework

Have you been using the UsageStatistics plugin since the OJS version 2.4.3?

Best,
Bozana

Hi bozana

thanks for the answer I confuse and the question is How can I recover the statistics previous years? and respect to your question I check the plugins and this is enabled

Hi @christian_criollo

Do you have any files (with the name starting with usage_events_…) in any of the folders in your files_dir/usageStats/ ?

Do you have any entries in your DB table metrics with metric_type = ojs::counter ?

Best,
Bozana

Hi Bozana

yes, I have files witn name usage_events in the directory files and in the table metrics ojs::counter

Hi @christian_criollo

From the screenshot I can see that there were entries at 18. November 2016 and then 10. May 2017. Thus there are apparently some entries for 2017 there. Are there any entries in the table metrics from those years that are missing (2014, 2013, 2012)? Are there any files from those years? Are all existing files names also in the column load_id in the table metrics? In which folder are those files (archive, processing, reject, stage, usageEventLogs)?

Best,
Bozana

Hi Bozana

I check the aplication and I find next

  1. there are not entries from those years ( 2014,2013, 2012) in the table metrics
  2. there are not files from those years
  3. yes all existing files names in the column laod_id and are in the directory archive, stage and usageEventsLogs

Hi @christian_criollo

Hmmm… For some reason those years 2014, 2013 and 2012 seem to be missing :frowning: I do not know why, maybe the UsageStatisticsPlugin was accidentally disabled?
If there are no log files from these years, there is no possibility to calculate the statistics. I.e. there would be a possibility if you would have apache access log files from those years – one could also use those external files to calculate the statistics. In that case the UsageStatisticsPlugin settings would have to be adapted for that calculation.
But you should have the statistics from 2015, 2016 and 2017. If you as journal manager go to the Journal Management > Stats & Reports > OJS usage statistics report: do you see those years there? You could also use the Timed Views Report: do not select the checkbox, and chose Start date Jan 1st 2017, and End date = today, for example. Do you see the statistics there?

What are the files in the folders stage and usageEventsLogs? – Just the recent ones?

Best,
Bozana

Hi bozana

I follow your instructions about Timed Views Report and select the range of date jan 1st 2017 - july 25 2017 and the report is generated with the information, but before years like 2014, 2013 not shown information

thanks for the help

Hi @christian_criollo

Yes, for some reason these old years seem to be missing in your installation…

Best,
Bozana

Hi Bozana

I have a question in the OJS it must exist a cron in the server for the statistics?

thanks for the help

@christian_criollo

You can either use a cron job or the Acron plugin. One of those is needed, to trigger the scheduled task execution, that processes the usage statistics log files, calculates and saves the statistics.

Best,
Bozana

Hi Bozana

Thanks for your answer, the cron it was created but I checking the directory stage is not filled with the logs of the current day to be processed and stored in the database, I must filled manually the directory stage what is the error? thanks for the help.

@christian_criollo

How exactly is your cron job defined?
You should use/execute this command: php tools/runScheduledTasks.php lib/pkp/plugins/generic/usageStats/scheduledTasksAutoStage.xml

Best,
Bozana

Hi Bozana

it defined like this php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasks.xml

Yes, cold you then change it to scheduledTasksAutoStage.xml?