Page 1 of 2

help zma has deleted all the db

Posted: Wed Jan 04, 2006 1:08 pm
by jameswilson
I have a system with purge when full set to 70%
it has deleted everything but the images are still on the drive but no db entries. I have looked through the db hoping there was a dleted flag i could just invert but it apears that they have gone completly, obviously zm is tring to remove these images from the drive si have stopped zm for the moment. Can i get the db entries back or are they gone? There has been an incident and the guy is (understandably) hoping mad at the moemnt

James

Posted: Wed Jan 04, 2006 2:22 pm
by jameswilson
it appears as thugh the filter funs faster than zm audit can remove the files and as such removes everything until zmaudit catches up or the disk % falls below the filter threshold. Can anything be done to stop this

Posted: Wed Jan 04, 2006 6:43 pm
by zoneminder
If you have FAST_DELETE set on then the database entries are the only things that are explicitly deleted. The disk images are then tidied up by zmaudit. If you have it switched off then everything gets deleted at the same time.

It sounds like you had fast deletes on but for some reason zmaudit has not cleaned up the images (though this at least might mean that you can get the images back). Is there anything zmaudit.log to suggest why?

Phil

Posted: Wed Jan 04, 2006 6:52 pm
by jameswilson
this is the system that is sersly slow. i will have a look at the log and turn fast delete of sharpish. can i turn it of now while the two things are out of step or will zmaudit still do its thing in the background.

Posted: Wed Jan 04, 2006 6:55 pm
by zoneminder
You can turn it off at any time, zmaudit will just tidy up what it find, which won't be much.

Phil

Posted: Wed Jan 04, 2006 7:01 pm
by jameswilson
there will be its about 800 gig behind now the db has gone its only got footage of this morning left on it now. Is it posible that its generating to much info for zmaudit to clear? because it seems to delete stuff very slowly. It will take 3 or 4 days to catch up now, i know this because this is how long it took last time this happened

Posted: Wed Jan 04, 2006 7:04 pm
by zoneminder
It's possible. I would advise putting slow query logging on mysql for your next try to check how long some of the DB queries are taking. 800Gb of disk files is a lot and as zmaudit has to scan them to see what there is then it might take a while. If you have fast deletes on then you shouldn't need to run zmaudit more than once or twice a day really if that.

Phil

Posted: Wed Jan 04, 2006 7:05 pm
by jameswilson
how do i control zmaudit then

Posted: Wed Jan 04, 2006 7:09 pm
by jameswilson
01/04/06 19:04:55.681602 zmaudit_d900_y[13125].INF [deleting]
01/04/06 19:05:31.124716 zmaudit_d900_y[13125].INF [Filesystem event '18/206677' does not exist in database]
01/04/06 19:05:31.124916 zmaudit_d900_y[13125].INF [deleting]
01/04/06 19:05:47.577996 zmaudit_d900_y[13125].INF [Filesystem event '18/187907' does not exist in database]
01/04/06 19:05:50.131437 zmaudit_d900_y[13125].INF [deleting]
01/04/06 19:06:32.128802 zmaudit_d900_y[13125].INF [Filesystem event '18/205923' does not exist in database]
01/04/06 19:06:32.129034 zmaudit_d900_y[13125].INF [deleting]
sample from zmaudit log and its all like that apart from entries about found monitor x and xxxx events

Posted: Wed Jan 04, 2006 7:10 pm
by zoneminder
Currently you would have to edit zmpkg.pl and change the default of 900. However I'll do a mod for 1.22.0 that makes it a config option.

Phil

Posted: Wed Jan 04, 2006 7:14 pm
by jameswilson
oh ok.

Ill do that myadmin thing and report back

cheers phil (again lol)

James

Posted: Wed Jan 04, 2006 11:10 pm
by zoneminder
jameswilson wrote:
01/04/06 19:04:55.681602 zmaudit_d900_y[13125].INF [deleting]
01/04/06 19:05:31.124716 zmaudit_d900_y[13125].INF [Filesystem event '18/206677' does not exist in database]
01/04/06 19:05:31.124916 zmaudit_d900_y[13125].INF [deleting]
01/04/06 19:05:47.577996 zmaudit_d900_y[13125].INF [Filesystem event '18/187907' does not exist in database]
01/04/06 19:05:50.131437 zmaudit_d900_y[13125].INF [deleting]
01/04/06 19:06:32.128802 zmaudit_d900_y[13125].INF [Filesystem event '18/205923' does not exist in database]
01/04/06 19:06:32.129034 zmaudit_d900_y[13125].INF [deleting]
sample from zmaudit log and its all like that apart from entries about found monitor x and xxxx events
This slightly worrying thing about this log is that it's taking up to 40 seconds to delete an event from disk. This means that either (a) the events is very big or (b) the disk is very slow, maybe due to other activity . On my box here it can get through several a second, though they may be nowhere near as long as the ones you have.

Posted: Wed Jan 04, 2006 11:16 pm
by jameswilson
well events are 15 mins with approx 700-1000 images per event. 640x480 approx 70k an image. The disk throughput using a benchmark tool someone suggested on here said the array was shifting 800 meg in about 12 seconds. But it could be. Its a software raid array with 4 250 gig drives 2 pata and 2 sata if that makes any odds

Posted: Wed Jan 04, 2006 11:33 pm
by zoneminder
Is this not the system with Modect? If so and you are still getting 15 minute events, why not just put it into Record mode instead? It will use less cpu and up to 99% less frame rows in the database?

Phil

Posted: Wed Jan 04, 2006 11:37 pm
by jameswilson
might be the same system (its the only serious problem i have ever had) and they are on mocord. I need them on mocord really as its on frameskip and id be throwing more images at the disks if i removed the skip and went to record.