statistics no longer working

statistics no longer working

by Nadav Kavalerchik -
Number of replies: 3
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators
i noticed that for a few days now their is no statistics generated in the system
i run cron daily the system logs user properly (i guess) but the statistics graph is zero sad

any ideas how i can check if some thing is wrong inside the DB ?
the tables are there and they are filled with data.
i have 100MB free space on the disk (not allot, i know...but space is space)

i tried to stop statistics and start it again and it did not help.

can i force it ?
Average of ratings: -
In reply to Nadav Kavalerchik

Re: statistics no longer working

by Nadav Kavalerchik -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators
when i try to see the statistics from the course's report menu i get:
"There is no available data for that combination of course and time period."
In reply to Nadav Kavalerchik

Re: statistics no longer working

by Nadav Kavalerchik -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators
issue solved smile

i turned statistics on/off/on/off... run the cron job manually a few times
did a DB test for the statistic tables:
CHECK TABLE `mdl_stats_daily` , `mdl_stats_monthly` , `mdl_stats_user_daily` , `mdl_stats_user_monthly` , `mdl_stats_user_weekly` , `mdl_stats_weekly` , `mdl_log`

tikshuv_moodle.mdl_stats_daily check status OK
tikshuv_moodle.mdl_stats_monthly check status OK
tikshuv_moodle.mdl_stats_user_daily check status OK
tikshuv_moodle.mdl_stats_user_monthly check status OK
tikshuv_moodle.mdl_stats_user_weekly check status OK
tikshuv_moodle.mdl_stats_weekly check status OK
tikshuv_moodle.mdl_log check status OK

and finally it worked smile

Running daily statistics gathering, starting at 1213045200:
................ finished until 1213131600: 10/06/2008, 23:00 (in 4 s)
................ finished until 1213218000: 11/06/2008, 23:00 (in 8 s)
................ finished until 1213304400: 12/06/2008, 23:00 (in 7 s)
................ finished until 1213390800: 13/06/2008, 23:00 (in 4 s)
................ finished until 1213477200: 14/06/2008, 23:00 (in 5 s)
................ finished until 1213563600: 15/06/2008, 23:00 (in 16 s)
................ finished until 1213650000: 16/06/2008, 23:00 (in 13 s)
................ finished until 1213736400: 17/06/2008, 23:00 (in 10 s)
................ finished until 1213822800: 18/06/2008, 23:00 (in 6 s)
................ finished until 1213909200: 19/06/2008, 23:00 (in 9 s)
................ finished until 1213995600: 20/06/2008, 23:00 (in 5 s)
................ finished until 1214082000: 21/06/2008, 23:00 (in 5 s)
................ finished until 1214168400: 22/06/2008, 23:00 (in 7 s)
................ finished until 1214254800: 23/06/2008, 23:00 (in 5 s)
...completed 14 days of statistics.
Running weekly statistics gathering, starting at 1212267600:
 finished until 1212872400: 7/06/2008, 23:00
 finished until 1213477200: 14/06/2008, 23:00
 finished until 1214082000: 21/06/2008, 23:00
...completed 3 weeks of statistics.
Running stats cleanup tasks...
...stats cleanup finished
Cron script completed correctly

Execution took 140.437593 seconds


In reply to Nadav Kavalerchik

Re: statistics no longer working

by Benjamin Wright -

I found this thread via search engine multiple times while trying to resolve my organization's problem with cron/stats. Because this seems to be a hot thread for Google and Yahoo to recommend, I would also like to add to this posting that the cron.php statistics processing script has some additional rules. Cron.php will throw an error at the end of the cronjob if there is a problem, but knowing these rules before hand can may some frustration:

  1. Stats will not be run by cron.php if stats were run within the last 20 hours.
  2. Stats will only be run if you run cron.php within 4 hrs following the scheduled statistics run time.

I am not sure if either of these was the cause of Nadav Kavalerchik's issue, but these restrictions have been causing frustration for me and my associates (we're just now learning to use cron and stats after having our site up for nearly a year, and there are a lot of backlogs to process).