I ran zmaudit.pl and space still consumed...

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
SpikeyGG
Posts: 38
Joined: Mon Oct 15, 2012 12:02 am

I ran zmaudit.pl and space still consumed...

Post by SpikeyGG » Wed Jan 17, 2018 2:40 pm

So this morning it was really foggy... I checked my phone and I had a plethora of captures emailed to me from ZM. Enough so that my gmail account was temporarily blocked. I immediately noticed that within the zoneminder web interface there was only one capture on the camera, even though it had clearly emailed me TONs of videos of the events. I checked the disk and it was 81% full.

I looked in the database, it only listed one capture in Events and Frames. I looked in the file system and there were tons of images and directories for last night and this morning to the tune of 25GB. I ran zmaudit.pl and it claimed to be cleaning up the directory structure (lots of orphaned files) but when I ran "du -sh" on the event capture directory, it still says 24GB consumed. Seems like nearly all the files are still there.

Should zmaudit.pl actually be removing the files from the disk? If so, why didn't it. If not, how to I get ZM to properly clean up after itself?

Also, any idea why/how ZM would have emailed me all these events without recording them properly in the database and (therefore) on the web interface?

Thanks,
-Greg

bbunge
Posts: 1991
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: I ran zmaudit.pl and space still consumed...

Post by bbunge » Wed Jan 17, 2018 4:24 pm

May take a while for ZM to clean out images after the records are deleted from the database.

OPT_FAST_DELETE checked will delete images at the same time the records are deleted.

Default setting for purge when full is 95% On a system that has a lot of recording you may be better to set it to 85% as to not over fill the drive.

SpikeyGG
Posts: 38
Joined: Mon Oct 15, 2012 12:02 am

Re: I ran zmaudit.pl and space still consumed...

Post by SpikeyGG » Wed Jun 13, 2018 1:16 pm

I'm still having problems with events not getting deleted. My disk space gets consumed by events that never get deleted. I've found lots of threads that show you never want to enable OPT_FAST_DELETE, such as this one: https://github.com/ZoneMinder/ZoneMinder/issues/1597 -- so I have turned that option off.

This is what my ZM web interface looked like before (AND AFTER) running the commands below:
zm_captures.png
zm_captures.png (10.88 KiB) Viewed 39 times
I noticed that the disk showed that it was more consumed than I expected so I looked. Sure enough, there was a bunch

Code: Select all

$ cd /var/cache/zoneminder/events/3/18/06
$ du -sh *
218M    12
230M    13
$ zmaudit.pl
Found orphaned frame records for event '2355', deleting
Found orphaned frame records for event '2356', deleting
Found orphaned frame records for event '2357', deleting
Found orphaned frame records for event '2359', deleting
Found orphaned frame records for event '2360', deleting
Found orphaned statistic records for event '2355', deleting
Found orphaned statistic records for event '2356', deleting
Found orphaned statistic records for event '2357', deleting
Found orphaned statistic records for event '2359', deleting
Found orphaned statistic records for event '2360', deleting
$ du -sh *
218M    12
230M    13
$ zmaudit.pl
$
Within the '13' directory there are three recordings where only one should exist and the '12' directory should not exist at all.

If I run zmaudit.pl subsequently it appears to do nothing. I'm guessing the messages it gave me when I ran it the first time was deleting records in the DB? Which is weird since I didn't see any "extra" recordings listed from my view of the web-base ZM interface... what gives? Is ZMAUDIT.PL supposed to delete the files or is that left up to the user to do?? Is there another application that can clear out the file system for ZM? Seems like I'm missing something important here...

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests