Page 1 of 1
Hour events column at 0
Posted: Mon Nov 03, 2008 8:45 am
by bjoyce
Hi,
Everything is working,
The only problem is the hour events column is allways zero.
All these events are in the last 3 hours. If I wait a few days the days column resets but not the hours.
nothing obvious to me in the logs. Here is a screenshot
Any ideas what could cause this?
Posted: Mon Nov 03, 2008 9:34 am
by cordel
Most likely the database has gotten corrupted and needs to be repaired.
Check the FAQ in the wiki on how to determine this and repair it if necessary.
Posted: Mon Nov 03, 2008 10:12 pm
by bjoyce
cordel wrote:Most likely the database has gotten corrupted and needs to be repaired.
Check the FAQ in the wiki on how to determine this and repair it if necessary.
Thanks for the reply,
OK, I did the following command for checking the database but all seems OK on that front, anything else I can check?
How do I repair the MySQL Database?
There is two ways to go about this. In most cases you can run from the command prompt ->
* mysqlcheck --all-databases --auto-repair -pyour_database_password -u your_databse_user
and got the following results
---
mysql.columns_priv OK
mysql.db OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.proc OK
mysql.procs_priv OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
zm.Config OK
zm.ControlPresets OK
zm.Controls OK
zm.Devices OK
zm.Events OK
zm.Filters OK
zm.Frames OK
zm.Groups OK
zm.MonitorPresets OK
zm.Monitors OK
zm.States OK
zm.Stats OK
zm.TriggersX10 OK
zm.Users OK
zm.ZonePresets OK
zm.Zones OK
Posted: Wed Nov 05, 2008 10:37 pm
by Eklectick
Hi
This creeped me out too a few days ago... my problem was with the daylight time change.
If you log into your box via prompt and give it a date command, is the time via prompt the same time reflected on the console?
Regards!
Posted: Thu Nov 06, 2008 1:27 pm
by bjoyce
Bingo
the time did not match between system clock and zoneminder console. When i set the system clock to the proper time (it was runnung 56minutes fast) all was fixed.
Thanks
one question thou, how come the time in the console was correct and system time different?
Answer to this was "refresh your console dummy, time is updated then"
Posted: Thu Nov 06, 2008 5:01 pm
by Eklectick
It is good you could fix it just by changing de time... to me that didnt do the trick, although the time via prompt was changed and issueing a date command did report the correct time on prompt, the console was still a full hour ahead.
A friend of mine who had seen something similar and after seeing the console, told me that php was the culprit. We edited /etc/php.ini this way:
On the line:
[Date]
; Defines the default timezone used by the date functions
; date.timezone = <---- OLD
Changed to:
; Defines the default timezone used by the date functions
date.timezone = "US/Central" <---- NEW
Save php.ini and via prompt issue:
service httpd restart
After this, refresh console and time and hour appeard correct.
Regards!
Posted: Thu Nov 06, 2008 8:27 pm
by bjoyce
Sorry, i must have been mistaken, when i checked zm just now my time was wrong again and an hour out.
I followed your instrutions and time is normal again.
dont know what is happening. Suspect it is my time zone
[Australia/Brisbane]
As it does not have daylight saving.
Posted: Thu Nov 06, 2008 8:38 pm
by cordel