Difference between revisions of "PurgeWhenFull"

From ZoneMinder Wiki
Jump to navigationJump to search
(Created page with "==About== PurgeWhenFull is a filter which deletes (default settings) 100 events when the DiskPercent is 90% full. ==Tuning== It's necessary to tune PurgeWhenFull, if you have...")
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
==About==
==About==
PurgeWhenFull is a filter which deletes (default settings) 100 events when the DiskPercent is 90% full.
PurgeWhenFull is a filter which deletes (at default settings) 100 events when the DiskPercent is 90% full.
/usr/bin/zmfilter.pl Is the perl script which calls PurgeWhenFull.


==Tuning==
==Configuration==
It's necessary to tune PurgeWhenFull, if you have a larger system, or you are creating a lot of events.
It's necessary to tune PurgeWhenFull, if you have a larger system, or you are creating a lot of events.
Essentially, if you are making more than 100 events between the PurgeWhenFill commands you will
Essentially, if you are making more than 100 events between the PurgeWhenFill commands you will
get a full HDD. Set it to 1000 and put the disk percent at 50% when starting a new system.
get a full HDD. Set it to 1000 and put the disk percent at 50% when starting a new system. Watch to make sure it
doesn't go over 50%.
 
<blockquote>
BEWARE of this limitation. You may think you don't have a problem with PurgeWhenFull, but it is easy to run into this.
For example, say you change to modect, and then you set the zone to be very sensitive.
Come night time, when the IR LEDs come on, you may have events piling up, as you are detecting events on pixels,
which may work fine during the day, but at night, the noise from low light causes false alarms, and quickly fills up your
HDD with short events. With large amounts of short events, the 100 events from PurgeWhenFull will not be able to keep up.
</blockquote>


==Cleaning up a 100% Full HDD==
==Cleaning up a 100% Full HDD==
If you have gotten the disk space full, you will notice that all new events being created are given a time of
If you have gotten the disk space full, you will notice that all new events being created are given a time of
00:00. To clean this up:
00:00. And no new events can be created. To clean this up:


* Run a filter manually, to delete 1000 events with less than 1 time. You can usually click the delete, then click the delete
* Run a filter manually
to delete 1000 events with less than 1 time. You can click the delete, then click the delete
again. It will not require you to go back to the filter screen each time.
again. It will not require you to go back to the filter screen each time.


then
 
* /usr/bin/zmaudit.pl
* /usr/bin/zmaudit.pl
and clean up the items in the HDD that do not have corresponding events in the DB. If you've already filled the DB with 00:00
and clean up the items in the HDD that do not have corresponding events in the DB. If you've already filled the DB with 00:00
events.
events.


* Finally check off OPT_FAST_DELETE in the config, so that when events are deleted, it instantly deletes the images, instead
* Finally remove check off OPT_FAST_DELETE in the config, so that when events are deleted, it instantly deletes the images, instead
of waiting for zmaudit.pl to cleanup later.
of waiting for zmaudit.pl to cleanup later.
References:
[https://forums.zoneminder.com/viewtopic.php?t=25278 https://forums.zoneminder.com/viewtopic.php?t=25278]
[[Category:Dummies_Guide]]

Latest revision as of 12:36, 24 October 2020

About

PurgeWhenFull is a filter which deletes (at default settings) 100 events when the DiskPercent is 90% full. /usr/bin/zmfilter.pl Is the perl script which calls PurgeWhenFull.

Configuration

It's necessary to tune PurgeWhenFull, if you have a larger system, or you are creating a lot of events. Essentially, if you are making more than 100 events between the PurgeWhenFill commands you will get a full HDD. Set it to 1000 and put the disk percent at 50% when starting a new system. Watch to make sure it doesn't go over 50%.

BEWARE of this limitation. You may think you don't have a problem with PurgeWhenFull, but it is easy to run into this. For example, say you change to modect, and then you set the zone to be very sensitive. Come night time, when the IR LEDs come on, you may have events piling up, as you are detecting events on pixels, which may work fine during the day, but at night, the noise from low light causes false alarms, and quickly fills up your HDD with short events. With large amounts of short events, the 100 events from PurgeWhenFull will not be able to keep up.

Cleaning up a 100% Full HDD

If you have gotten the disk space full, you will notice that all new events being created are given a time of 00:00. And no new events can be created. To clean this up:

  • Run a filter manually

to delete 1000 events with less than 1 time. You can click the delete, then click the delete again. It will not require you to go back to the filter screen each time.


  • /usr/bin/zmaudit.pl

and clean up the items in the HDD that do not have corresponding events in the DB. If you've already filled the DB with 00:00 events.

  • Finally remove check off OPT_FAST_DELETE in the config, so that when events are deleted, it instantly deletes the images, instead

of waiting for zmaudit.pl to cleanup later.


References: https://forums.zoneminder.com/viewtopic.php?t=25278