Dear,
I created my own "purgeDisk" filter to purge as soon as the disk is above the 60% usage.
This filter works when I run it manually but I want to run it in background ("Delete all match" & "run filter in background" are activated)
When looking to zmdc.log I have an error related to zmfilter every 10 min:
03/02/08 11:28:36.055548 zmdc[31570].INF ['zmfilter.pl' starting at 08/03/02 11:28:36, pid = 26864]
03/02/08 11:28:41.667947 zmdc[31570].ERR ['zmfilter.pl ' exited abnormally, exit status 9]
03/02/08 11:38:41.029324 zmdc[31570].INF [Starting pending process, zmfilter.pl]
03/02/08 11:38:41.076276 zmdc[31570].INF ['zmfilter.pl' starting at 08/03/02 11:38:41, pid = 27904]
When running zmfilter.pl manually I get :
Can't use an undefined value as an ARRAY reference at /usr/local/bin/zmfilter.pl line 272
The line 272 contains : if ( @{$filter_expr->{terms}} )
and belongs to the function : sub getFilters {
Any idea of where I should investigate?
I have this problem with the version 1.23.2 (and also with the 1.23.1)
I use Mandriva 2008.
Thanks in advance for the help
Marc
Background filter : error with zmfilter.pl ???
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I made another interresting test :
I deactivated the "Run filter in background" of the "PurgeWhenFull" and then run the zmfilter.pl which don't "crash" anymore (see the error message in the previous post).
The zmfilter.log shows the following (with DBG_LEVEL=1):
03/04/08 21:50:41.841187 zmfilter[29941].DBG [Reloading filters]
03/04/08 21:50:41.843225 zmfilter[29941].DBG [Found filter 'myPurgeDisk']
03/04/08 21:50:41.845620 zmfilter[29941].DBG [SQL:select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId where not isnull(E.EndTime) and ( M.Id = '60' ) order by E.StartTime asc limit 0,2000]
03/04/08 21:50:41.845987 zmfilter[29941].DBG [Checking filter 'myPurgeDisk', delete]
03/04/08 21:50:41.853842 zmfilter[29941].DBG [Sleeping for 60 seconds]
04/03/08 21:50:52.514963 zmfilter[29810].DBG [Checking filter 'myPurgeDisk', delete]
04/03/08 21:50:52.519461 zmfilter[29810].DBG [Sleeping for 60 seconds]
It seems the "PurgeWhenFull" creates a problem but I still don't understand why "myPurgeWhenFull" don't do anything while it work manually and seems to be run by zmfilter every 60 sec.
Any idea?
I deactivated the "Run filter in background" of the "PurgeWhenFull" and then run the zmfilter.pl which don't "crash" anymore (see the error message in the previous post).
The zmfilter.log shows the following (with DBG_LEVEL=1):
03/04/08 21:50:41.841187 zmfilter[29941].DBG [Reloading filters]
03/04/08 21:50:41.843225 zmfilter[29941].DBG [Found filter 'myPurgeDisk']
03/04/08 21:50:41.845620 zmfilter[29941].DBG [SQL:select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId where not isnull(E.EndTime) and ( M.Id = '60' ) order by E.StartTime asc limit 0,2000]
03/04/08 21:50:41.845987 zmfilter[29941].DBG [Checking filter 'myPurgeDisk', delete]
03/04/08 21:50:41.853842 zmfilter[29941].DBG [Sleeping for 60 seconds]
04/03/08 21:50:52.514963 zmfilter[29810].DBG [Checking filter 'myPurgeDisk', delete]
04/03/08 21:50:52.519461 zmfilter[29810].DBG [Sleeping for 60 seconds]
It seems the "PurgeWhenFull" creates a problem but I still don't understand why "myPurgeWhenFull" don't do anything while it work manually and seems to be run by zmfilter every 60 sec.
Any idea?
Ooops...
My own query "myPurgeDisk" didn't work because the query was totally wrong... I don't know what happened but the "disk percent" has been replaced by the screen id.
Conclusion (at least mine...)
The "PurgeWhenFull" creates troubles...
The workaround is to delete it and create your own if needed
My own query "myPurgeDisk" didn't work because the query was totally wrong... I don't know what happened but the "disk percent" has been replaced by the screen id.
Conclusion (at least mine...)
The "PurgeWhenFull" creates troubles...
The workaround is to delete it and create your own if needed
I installed a few days ago zoneminder 1.24.1 on pclos 2010 installed from pclos rpm and has the same problem you described.
When running zmfilter.pl manually from a console i get :
Can't use an undefined value as an ARRAY reference at /usr/local/bin/zmfilter.pl line 272
I also deactivated the "Run filter in background" of the "PurgeWhenFull" and then run the zmfilter.pl from a console and has the same error about line 272.
The problem is that the disk gets full because purgewhenfull does not delete anything automatically. Run on the background is marked.
If i call the purgewhenful filter on the graphical display and execute it, then it display the events to be deleted, i mark them and press delete and everything is done correct.
So what should i do to make purgewhenfull filter run automatically on the background.
On /var/log/zm/zmfilter.log i only see lines that say the same [Scanning for events] but nothing about deleted events unless i run the filter manually choosing "filters" on the main zm graphical screen. and the callying purgewhenfull and execute it.
When running zmfilter.pl manually from a console i get :
Can't use an undefined value as an ARRAY reference at /usr/local/bin/zmfilter.pl line 272
I also deactivated the "Run filter in background" of the "PurgeWhenFull" and then run the zmfilter.pl from a console and has the same error about line 272.
The problem is that the disk gets full because purgewhenfull does not delete anything automatically. Run on the background is marked.
If i call the purgewhenful filter on the graphical display and execute it, then it display the events to be deleted, i mark them and press delete and everything is done correct.
So what should i do to make purgewhenfull filter run automatically on the background.
On /var/log/zm/zmfilter.log i only see lines that say the same [Scanning for events] but nothing about deleted events unless i run the filter manually choosing "filters" on the main zm graphical screen. and the callying purgewhenfull and execute it.