PurgeWhenFull Not Working After Update

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
ere109
Posts: 9
Joined: Fri Dec 11, 2020 5:06 pm

PurgeWhenFull Not Working After Update

Post by ere109 »

I'm running Zoneminder as a jail in a FreeNAS 11.3 install.
I originally installed and configured using 1.34.9 - have been happy for six months. Last week I did an update through the FN GUI.
After update, I was instructed to run zmupdate.pl, which I did, and I've restarted the server. However, my hard drive maxed out to 100%, in the coming days, completely ignoring the 80% set in my PurgeWhenFull filter.
At the same time, my events started registering 0b files. I have to suspect the two are related. I managed to "clear" the 0b records by clicking an event in each camera - like it hadn't updated some database file and wasn't registering changes.
Events are still being recorded, and I can play them back, so I know ZM has read/write access to the drive. I can also manually delete them to free space.
Last night, I manually deleted down to 20% storage, and set PurgeWhenFull to maintain 20%. This morning it was at 78%.
Something's going on in the background - load is showing 6.9. I'm recording about 500 events a day, between three cameras (definitely have to check my numbers again - wonder if zones got changes from pixel to percent...).
I'll continue playing and report back. If anyone has the solution, please share.
ere109
Posts: 9
Joined: Fri Dec 11, 2020 5:06 pm

Re: PurgeWhenFull Not Working After Update

Post by ere109 »

Progress. I just checked my log for errors, and there are dozens of the following:

Code: Select all

2020-12-11 14:45:03	zmdc		94795	ERR	'zmfilter.pl --filter_id=3 --daemon' exited abnormally, exit status 2	zmdc.pl	
There's a thread discussing a bad perl script (libnumber-bytes-human-perl) here:
viewtopic.php?f=40&t=29277&p=119053#p119053

I've got to investigate whether this can/should be updated from my FreeNAS CLI.
slowbart
Posts: 1
Joined: Sat Dec 12, 2020 9:21 am

Re: PurgeWhenFull Not Working After Update

Post by slowbart »

ZM newbie here...

I was having the opposite issue where zmfilter was purging everything even though my partition was only 5% used. I was also using a fresh install so no update issues

According to the logs it was saying disk space was 95% used. Turned out it was measuring my root partition space but I had my events in a separate partition. Weird... Finally realised that even though I had created a new storage, zmfilter was using the ZM_DIR_EVENTS config variable (I think) to test the disk space.

So my question is, why have the config variable if you can then go and create different storage areas?

I created a link from where the config variable was pointing (/var/cache/zoneminder/events) to where my events storage was mounted in a separate partition. A bit clunky but it works for now :-)
ere109
Posts: 9
Joined: Fri Dec 11, 2020 5:06 pm

Re: PurgeWhenFull Not Working After Update

Post by ere109 »

I found directions on running zmfilter from CLI, and after much bad syntax, got this output:

Code: Select all

sudo zmfilter.pl [-f PurgeWhenFull]
Can't locate MIME/Entity.pm in @INC (you may need to install the MIME::Entity module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.32 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.32/mach /usr/local/lib/perl5/5.32) at /usr/local/bin/zmfilter.pl line 143.
This definitely points to another PERL issue. Still investigating.
User avatar
burger
Posts: 417
Joined: Mon May 11, 2020 4:32 pm

Re: PurgeWhenFull Not Working After Update

Post by burger »

slowbart wrote: Sat Dec 12, 2020 9:32 am According to the logs it was saying disk space was 95% used. Turned out it was measuring my root partition space but I had my events in a separate partition. Weird... Finally realised that even though I had created a new storage, zmfilter was using the ZM_DIR_EVENTS config variable (I think) to test the disk space.
Need to specify storage area in PurgeWhenFull when using secondary storage areas, not ZM_DIR_EVENTS.
https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ere109
Posts: 9
Joined: Fri Dec 11, 2020 5:06 pm

Re: PurgeWhenFull Not Working After Update

Post by ere109 »

SOLVED!!!
I searched the error I was receiving on CLI, and it directed me to another forum post explaining how to install the missing perl package:

log into perl shell

Code: Select all

perl -MCPAN -eshell
install missing package

Code: Select all

install MIME::Entity
After update, I manually ran the filter, and it worked!

Code: Select all

zmfilter.pl --filter={PurgeWhenFull}
The helpful post viewtopic.php?t=3503, for reference.
Post Reply