Lost events

Support and queries relating to all previous versions of ZoneMinder
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Lost events

Post by philipt »

I seem to be losing events - the scenario is :

The system log shows the event starting; it shows alarms occurring; but there is no INF message showing the event ending. I use the default 10 minute duration for events, so my database has 10 minutes missing when I go back to view past events.

If I go to the zmaudit log, I can see the event in question has been deleted with the following messages :

Filesystem event '1/33764' does not exist in database, deleting'
Found orphaned frame records for event 33764, deleting

So I know where the events are going - zmaudit is deleting them! I just don't know why! :(

It's possible this occurs because the system can't cope when 3 cameras alarm at the same time - is this likely? Any help appreciated!

My system is an Athlon 2000 with 512MB memory and a 4 port Grandtec Multi Capture Card running SuSE Linux 9.2 Pro, with 4 b/w cameras

The system has currently been up for 45 days and doesn't degrade with time so I don't think it's a memory leak.

I think zoneminder is great - so far I've captured the paperboy making escapes over my fences (sacked after warnings for serial offending!) and a deer nibbling at my garden, which amazed us as we live in town! When I've sorted this final problem, and found a good way to automatically keep the disk space in control, I'll be well pleased and making a donation.
Philip
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Rick Hewett
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

I removed zmaudit.pl call from original script.
And I only run it at night when I have no events from autodelete script from user contributions section.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Ill post this one here. i have 3 test boxes running at the moment. I have problems on 2 of the boxes (the ones with cameras on so the third may have this problem too). Problem is im dropping events. 1 machine has a hard disk which runs at about 93-95% Purge when full is set at 95%, and the other hasnt filled up yet. I have both machines set to 'mocord' and the section time to 600. I am losing a few 10 minute sections each day, usually at 10 to the hour. I am running live cd (1 box has 1.21.0 the other 1.21.2)

1.21.0 spec 2800+ athlon 512Mb 30Gb (only spare HD i had lying around)
1.21.2 spec 2200 celeron 512Mb 160Gb

What log info would help??
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Post by philipt »

It sounds just the same as the problem I reported. If you check in zmaudit.log you will see the event numbers that are being deleted, and from the sequencing you can check if they are the missing events.

Since my original post I have rebuilt the system from scratch, installed the latest version of ZM and reallocated my cameras across 3 separate cards - with the split arranged so that an event shouldn't cause alarms on the same input card. All to no avail, I still get missing events - though probably not as many.

My disk is only 5% full (now) and the CPU load is very low, so I can't see it being lack of resources. I don't know what other logs might help!
Philip
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Hmm, I had thought that this problem had gone away in 1.21.2. Obvously I got the wrong end of the stick!

Can anyone who has this problem edit the zmaudit.pl script and change DBG_LEVEL to 1 and then restart ZM. Hopefully it will put enough information in zmaudit.log to help crack this once and for all.

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

phil, i have updated everything apart from ffmpeg to see if that helps. I am runing 4 inputs at 20fps to nail it and see how many it drops, once i know how often it is i will do as you say and post results
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

scrap that updated everything then my box kept locking up, tried slowing everything down, reseated etc no avail would last about 5 mins then lock up solid.
Reformated and reinstalled so im back in the game now and wont update again.
Will let you know how i get on my input card doesnt want to play so i have ordered another.
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Post by philipt »

Phil, thanks for agreeing to look at this.

I hope I have the right debug setting - my zmaudit.pl says :

use constant DBG_LEVEL => 1; # 0 is errors, warnings and info only, > 0 for debug

(please excuse my lack of knowledge! This was the default setting.)

Here is a clip from my zmaudit.log file :

07/08/05 12:34:11.084332 zmaudit_d900_y[6447].DBG [Found database monitor '1']
07/08/05 12:34:11.119034 zmaudit_d900_y[6447].DBG [Got 725 events]
07/08/05 12:34:11.119367 zmaudit_d900_y[6447].DBG [Found database monitor '2']
07/08/05 12:34:11.153517 zmaudit_d900_y[6447].DBG [Got 722 events]
07/08/05 12:34:11.153849 zmaudit_d900_y[6447].DBG [Found database monitor '3']
07/08/05 12:34:11.191275 zmaudit_d900_y[6447].DBG [Got 724 events]
07/08/05 12:34:11.191581 zmaudit_d900_y[6447].DBG [Found database monitor '4']
07/08/05 12:34:11.230748 zmaudit_d900_y[6447].DBG [Got 724 events]
07/08/05 12:34:11.231190 zmaudit_d900_y[6447].DBG [Found database monitor '5']
07/08/05 12:34:11.235698 zmaudit_d900_y[6447].DBG [Got 75 events]
07/08/05 12:34:11.235951 zmaudit_d900_y[6447].DBG [Found database monitor '6']
07/08/05 12:34:11.251038 zmaudit_d900_y[6447].DBG [Got 78 events]
07/08/05 12:34:11.251489 zmaudit_d900_y[6447].DBG [Found filesystem monitor '1']
07/08/05 12:34:11.257440 zmaudit_d900_y[6447].DBG [Got 726 events]
07/08/05 12:34:11.257992 zmaudit_d900_y[6447].DBG [Found filesystem monitor '2']
07/08/05 12:34:11.263674 zmaudit_d900_y[6447].DBG [Got 723 events]
07/08/05 12:34:11.264220 zmaudit_d900_y[6447].DBG [Found filesystem monitor '3']
07/08/05 12:34:11.269878 zmaudit_d900_y[6447].DBG [Got 724 events]
07/08/05 12:34:11.270435 zmaudit_d900_y[6447].DBG [Found filesystem monitor '4']
07/08/05 12:34:11.276148 zmaudit_d900_y[6447].DBG [Got 724 events]
07/08/05 12:34:11.276679 zmaudit_d900_y[6447].DBG [Found filesystem monitor '5']
07/08/05 12:34:11.277656 zmaudit_d900_y[6447].DBG [Got 75 events]
07/08/05 12:34:11.277794 zmaudit_d900_y[6447].DBG [Found filesystem monitor '6']
07/08/05 12:34:11.278610 zmaudit_d900_y[6447].DBG [Got 78 events]
07/08/05 12:34:11.281555 zmaudit_d900_y[6447].INF [Filesystem event '1/3120' does not exist in database]
07/08/05 12:34:11.281771 zmaudit_d900_y[6447].INF [deleting]
07/08/05 12:34:11.296845 zmaudit_d900_y[6447].INF [Filesystem event '2/3121' does not exist in database]
07/08/05 12:34:11.297136 zmaudit_d900_y[6447].INF [deleting]
07/08/05 12:34:11.368388 zmaudit_d900_y[6447].INF [Found orphaned frame records for event '3120']
07/08/05 12:34:11.368631 zmaudit_d900_y[6447].INF [deleting]
07/08/05 12:34:11.369341 zmaudit_d900_y[6447].INF [Found orphaned frame records for event '3121']
07/08/05 12:34:11.369518 zmaudit_d900_y[6447].INF [deleting]
07/08/05 12:49:11.358584 zmaudit_d900_y[6447].DBG [Found database monitor '1']
07/08/05 12:49:11.392885 zmaudit_d900_y[6447].DBG [Got 726 events]
07/08/05 12:49:11.393212 zmaudit_d900_y[6447].DBG [Found database monitor '2']
07/08/05 12:49:11.427378 zmaudit_d900_y[6447].DBG [Got 723 events]
07/08/05 12:49:11.427719 zmaudit_d900_y[6447].DBG [Found database monitor '3']
07/08/05 12:49:11.463089 zmaudit_d900_y[6447].DBG [Got 725 events]
07/08/05 12:49:11.463430 zmaudit_d900_y[6447].DBG [Found database monitor '4']
07/08/05 12:49:11.500698 zmaudit_d900_y[6447].DBG [Got 725 events]
07/08/05 12:49:11.501014 zmaudit_d900_y[6447].DBG [Found database monitor '5']
07/08/05 12:49:11.505552 zmaudit_d900_y[6447].DBG [Got 75 events]
07/08/05 12:49:11.505807 zmaudit_d900_y[6447].DBG [Found database monitor '6']

You will see that event 3120 is deleted - and this is one of my lost events. They are less frequent on 1.21.2 than my previously installed version.

I'm also having a problem with a colour camera - but I think that's a v4l problem which I'll park for now!

Look forward to hearing from you, or receiving more (simple I hope) instructions!

Regards, Philip.
Philip
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

This is just bizarre. I suspect perhaps mysql is caching queries and perhaps has not flushed the event to the db but no events younger than a few minutes should be touched anyway.

I may have to send you an additional debugged version of the script if that's ok, or a patch file, whichever you're most comfortable with.

Phil
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Post by philipt »

I'm game to try anything to solve this - I suspect it happens when there are alarms generated but don't have specific evidence. I suspect an updated version of the script is easier for me.

Is it worth me chacking any versions or mysql settings etc? My systems is SuSE Linux Professional 9.2 and the vanilla versions of apache, php, mysql etc but kept fully up to date. I suspect this isn't the issue though.
Philip
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I think I've cracked this one now! Patch to come shortly, as usual programmer error was to blame :oops:

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

excellent, great news
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Patch is at http://www.zoneminder.com/downloads/zma ... .2-p01.txt. On my system at least it seems to have solved the issue.

You will need to apply this to your src directory, and then rerun zmconfig.pl -noi, rebuild and reinstall etc.

Phil
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Post by philipt »

Many thanks. I've just patched my zmaudit.pl.z file and set it off capturing from 9.10 pm tonight. I'll let it run for 24 hours and then check for missing events. If there are any I'll check all my work for evidence of red wine corruption, as it's a Saturday night in! I'm not sure if there was a simple way to use the patch file but as a linux ignoramus I vi'd the original file with the inserts.

I'd be interested to know the scenario from which lost events would occur - I noticed them while looking for actual alarms, I'm sure some at least were when there were actual alarms.

Thanks again, I'll let you know the outcome.

Regards, Philip.
Philip
Locked