Zoneminder Record Mode- Section Length Not Always Considered

Forum for questions and support relating to the 1.24.x releases only.
Locked
JamesK217
Posts: 4
Joined: Mon Jan 18, 2010 3:36 pm
Location: Columbia, MD

Zoneminder Record Mode- Section Length Not Always Considered

Post by JamesK217 »

-I have ZoneMinder 1.24.2 installed via deb on Ubuntu 9.04 Server 32 bit.
-I have Zoneminder in Record Mode hoping to achieve DVR like functionality.
-I have a filter that deletes events older than 30 days.
-Section Length is 86400, or 1 day. That is not within the recommended length and could possibly be contributing to my problem but was specified to me as a requirement.

Hardware- AMD Athlon Dual Core
2 Gigs of RAM
Bluecherry Capture Card

PROBLEM- ZoneMinder usually runs without issue until about day 31 when I notice a tremendous amount of events being generated that can be as small as 3 seconds up to about half of the section length. Usually it affects one camera first and then starts to affect others.

I hope this is not strictly a system resource issue as a result of the filter finding events to delete.

My goal is to simply have 30 days of 1 day events at all times. Any help would be greatly appreciated.

Below is some output of /var/log/messages-

Jan 17 12:17:58 zoneminder zmdc[4748]: INF ['zma -m 25' exited normally]
Jan 17 12:17:58 zoneminder zmwatch[4808]: INF ['zma -m 25' stopping at 10/01/17 12:17:58]
Jan 17 12:18:03 zoneminder zmdc[4748]: INF [Starting pending process, zma -m 25]
Jan 17 12:18:03 zoneminder zmdc[4748]: INF ['zma -m 25' starting at 10/01/17 12:18:03, pid = 30966]
Jan 17 12:18:03 zoneminder zmdc[30966]: INF ['zma -m 25' started at 10/01/17 12:18:03]
Jan 17 12:18:03 zoneminder zma_m25[30966]: INF [Debug Level = 0, Debug Log = <none>]
Jan 17 12:18:03 zoneminder zma_m25[30966]: INF [In mode 4/1, warming up]
Jan 17 12:18:26 zoneminder zmwatch[4808]: INF [Restarting analysis daemon for CRC, time since last analysis 12 seconds (1263748698-1263748686)]
Jan 17 12:18:26 zoneminder zma_m25[30966]: INF [BreakRoomHallway: 026 - Opening new event 9671, section start]
Jan 17 12:18:26 zoneminder zmdc[4748]: INF ['zma -m 26' stopping at 10/01/17 12:18:26]
Jan 17 12:18:26 zoneminder zma_m26[30964]: INF [Got signal 15 (Terminated), exiting]
Jan 17 12:18:26 zoneminder zma_m26[30964]: INF [CRC: 050 - Closing event 9670, shutting down]
Jan 17 12:18:26 zoneminder zmdc[4748]: INF ['zma -m 26' exited normally]
Jan 17 12:18:26 zoneminder zmwatch[4808]: INF ['zma -m 26' stopping at 10/01/17 12:18:26]
Jan 17 12:18:26 zoneminder zmaudit[4806]: INF [Filesystem event '28/9259' does not exist in database]
Jan 17 12:18:26 zoneminder zmaudit[4806]: INF [deleting]
Jan 17 12:18:44 zoneminder zmdc[4748]: INF [Starting pending process, zma -m 26]
Jan 17 12:18:44 zoneminder zmdc[30969]: INF ['zma -m 26' started at 10/01/17 12:18:44]
Jan 17 12:18:44 zoneminder zmwatch[4808]: INF [Restarting analysis daemon for BreakRoomHallway, time since last analysis 10 seconds (1263748716-1263748706)]
Jan 17 12:18:44 zoneminder zma_m26[30969]: INF [Debug Level = 0, Debug Log = <none>]
Jan 17 12:18:44 zoneminder zma_m26[30969]: INF [In mode 4/1, warming up]
Jan 17 12:18:44 zoneminder zmdc[4748]: INF ['zma -m 26' starting at 10/01/17 12:18:44, pid = 30969]
Jan 17 12:18:44 zoneminder zmdc[4748]: INF ['zma -m 25' stopping at 10/01/17 12:18:44]
Jan 17 12:18:44 zoneminder zma_m25[30966]: INF [Got signal 15 (Terminated), exiting]
Jan 17 12:18:44 zoneminder zma_m25[30966]: INF [BreakRoomHallway: 043 - Closing event 9671, shutting down]
Jan 17 12:18:44 zoneminder zmdc[4748]: INF ['zma -m 25' exited normally]
Jan 17 12:18:44 zoneminder zmwatch[4808]: INF ['zma -m 25' stopping at 10/01/17 12:18:44]
Jan 17 12:18:54 zoneminder zmdc[4748]: INF [Starting pending process, zma -m 25]
Jan 17 12:18:54 zoneminder zmdc[30972]: INF ['zma -m 25' started at 10/01/17 12:18:54]
Jan 17 12:18:54 zoneminder zma_m25[30972]: INF [Debug Level = 0, Debug Log = <none>]
Jan 17 12:18:54 zoneminder zma_m25[30972]: INF [In mode 4/1, warming up]
Jan 17 12:18:54 zoneminder zmdc[4748]: INF ['zma -m 25' starting at 10/01/17 12:18:54, pid = 30972]
Jan 17 12:19:24 zoneminder zma_m26[30969]: INF [CRC: 026 - Opening new event 9672, section start]
Jan 17 12:19:24 zoneminder zma_m25[30972]: INF [BreakRoomHallway: 026 - Opening new event 9673, section start]
Jan 17 12:19:24 zoneminder zmwatch[4808]: INF [Restarting analysis daemon for BreakRoom, time since last analysis 10 seconds (1263748744-1263748734)]
Jan 17 12:19:24 zoneminder zmdc[4748]: INF ['zma -m 27' stopping at 10/01/17 12:19:24]
Jan 17 12:19:24 zoneminder zma_m27[18169]: INF [Got signal 15 (Terminated), exiting]
Jan 17 12:19:24 zoneminder zma_m27[18169]: INF [BreakRoom: 85156 - Closing event 9664, shutting down]
Jan 17 12:19:24 zoneminder zmdc[4748]: INF ['zma -m 27' exited normally]
Jan 17 12:19:24 zoneminder zmwatch[4808]: INF ['zma -m 27' stopping at 10/01/17 12:19:24]
Jan 17 12:19:25 zoneminder zmdc[4748]: INF [Starting pending process, zma -m 27]
Jan 17 12:19:25 zoneminder zmdc[30974]: INF ['zma -m 27' started at 10/01/17 12:19:25]
Jan 17 12:19:25 zoneminder zmdc[4748]: INF ['zma -m 27' starting at 10/01/17 12:19:25, pid = 30974]
Jan 17 12:19:25 zoneminder zma_m27[30974]: INF [Debug Level = 0, Debug Log = <none>]
Jan 17 12:19:25 zoneminder zma_m27[30974]: INF [In mode 4/1, warming up]
Jan 17 12:19:41 zoneminder zmwatch[4808]: INF [Restarting analysis daemon for BreakRoomHallway, time since last analysis 10 seconds (1263748774-1263748764)]
Jan 17 12:19:42 zoneminder zma_m27[30974]: INF [BreakRoom: 026 - Opening new event 9674, section start]
Jan 17 12:19:42 zoneminder zmdc[4748]: INF ['zma -m 25' stopping at 10/01/17 12:19:41]
Jan 17 12:19:42 zoneminder zma_m25[30972]: INF [Got signal 15 (Terminated), exiting]
Jan 17 12:19:42 zoneminder zma_m25[30972]: INF [BreakRoomHallway: 048 - Closing event 9673, shutting down]


Below is some text from my events dialog in the Zoneminder GUI that corresponds in time to the above log-

9666 Event-9666 BreakRoomHallway Continuous 01/16 19:00:00 62231.78 62218 0 0 0 0
9669 Event-9669 BreakRoomHallway Continuous 01/17 12:17:37 20.71 13 0 0 0 0
9671 Event-9671 BreakRoomHallway Continuous 01/17 12:18:20 24.07 17 0 0 0 0
9673 Event-9673 BreakRoomHallway Continuous 01/17 12:19:08 33.84 22 0 0 0 0
9675 Event-9675 BreakRoomHallway Continuous 01/17 12:20:22 41.10 27 0 0 0 0
9679 Event-9679 BreakRoomHallway Continuous 01/17 12:22:13 44.32 32 0 0 0 0
9684 Event-9684 BreakRoomHallway Continuous 01/17 12:24:32 12.13 8 0 0 0 0
9691 Event-9691 BreakRoomHallway Continuous 01/17 12:27:42 43.00 28 0 0 0 0
9697 Event-9697 BreakRoomHallway Continuous 01/17 12:34:10 23150.00 23150 0 0 0 0
9701 Event-9701 BreakRoomHallway Continuous 01/17 19:00:00 49107.32 49108 0 0 0 0

As you can see lengths of 20.71, 24.07 are unusual. The section length for each monitor is set to 86400 and they are in record mode. Here is the same information as above but from a working camera before the 30 day mark.

9355 Event-9355 Receiving Continuous 12/29 19:00:00 86400.03 86399 0 0 0 0
9363 Event-9363 Receiving Continuous 12/30 19:00:00 86400.03 86399 0 0 0 0
9372 Event-9372 Receiving Continuous 12/31 19:00:00 86400.00 86390 0 0 0 0
9381 Event-9381 Receiving Continuous 01/01 19:00:00 86400.02 86383 0 0 0 0
9389 Event-9389 Receiving Continuous 01/02 19:00:00 86400.02 86400 0 0 0 0
9397 Event-9397 Receiving Continuous 01/03 19:00:00 86400.01 86391 0 0 0 0
9405 Event-9405 Receiving Continuous 01/04 19:00:00 86399.97 86386 0 0 0 0
9414 Event-9414 Receiving Continuous 01/05 19:00:00 86400.02 86364 0 0 0 0
9425 Event-9425 Receiving Continuous 01/06 19:00:00 86401.00 86343 0 0 0 0
9446 Event-9446 Receiving Continuous 01/07 19:00:01 86399.01 86383 0 0 0 0
9449 Event-9449 Receiving Continuous 01/08 19:00:00 86400.07 86386 0 0

That is what I am looking for with all the monitors even after the 30 day mark.

Any help would be greatly appreciated.

Thank you.
mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Post by mitch »

Sorry I cannot say I know your exact issue, but have you considered restarting zoneminder every 15 days or so? It would take under a minute to probably restart and if it honestly takes atleast 30 days to present while maybe not the best solution it might do what you need.
JamesK217
Posts: 4
Joined: Mon Jan 18, 2010 3:36 pm
Location: Columbia, MD

I would like to do that

Post by JamesK217 »

however it is unfortunately not an option for this particular project. I just need to have 30 days of 1 day events.

It seems that whenever the filter runs the capture analysis daemon restarts on certain cameras with the "time since last analysis 10 seconds" message.

I have been tweaking shared memory for a long time, buffer settings, and pretty much anything else I could think of.

I appreciate your reply and would also appreciate any further input.
Paranoid
Posts: 129
Joined: Thu Feb 05, 2009 10:40 pm

Post by Paranoid »

The problem might be with your filesystem. From the look of it you will have event directories with 86,000+ files in them. When your filter is deleting files from these directories the system will be getting hammered.

You might be able to improve the performance by either tuning the file system or changing to another type.

If you are using ext2/3/4 then run tune2fs -l <device> to get your current parameters.
jfkastner
Posts: 74
Joined: Wed Jun 17, 2009 11:52 pm

Post by jfkastner »

a lot of my capture / analysis restarts went away after lowering the capture framerate

it seems ZM does NOT like late frames and the whole timing "goes crazy"

"late frames" in my case happened mostly at night when my IPcams are very slow (less than half the framerate compared to daylight)
Paranoid
Posts: 129
Joined: Thu Feb 05, 2009 10:40 pm

Post by Paranoid »

jfkastner wrote:a lot of my capture / analysis restarts went away after lowering the capture framerate

it seems ZM does NOT like late frames and the whole timing "goes crazy"

"late frames" in my case happened mostly at night when my IPcams are very slow (less than half the framerate compared to daylight)
Ah.. I see. Increase the HTTP_TIMEOUT value under options->network
JamesK217
Posts: 4
Joined: Mon Jan 18, 2010 3:36 pm
Location: Columbia, MD

Post by JamesK217 »

Thank you both very much for your replies.

I have taken the actions recommended and will be sure to follow up on here as to whether it is successful or not.

Thank you again.

-James
JamesK217
Posts: 4
Joined: Mon Jan 18, 2010 3:36 pm
Location: Columbia, MD

Thanks

Post by JamesK217 »

Things appear to be working well now, thank you very much for the assistance.

I also turned on the deep filesystem hierarchy option which appears to be helping too.

Thanks again.
Locked