I have been running ZM with a single camera for the better part of a week without any problems. However, when I start up a 2nd monitor/modetect monitor, it seems to spawn more and more zmc processes over time.
Somehow, it's detecting that zmc -d 1 crashed with exit status 255 and spawning a new one, but in reality, the old zmc is still running. So after some period of time, I have multiple zmc -d 1 processes running.
root@cam:/etc# ps -aef | grep zmc
apache 3834 1972 1 Dec13 ? 00:19:42 /usr/local/bin/zmc -d 0
apache 15118 1972 1 09:21 ? 00:03:02 /usr/local/bin/zmc -d 1
apache 15546 1972 1 10:23 ? 00:02:15 /usr/local/bin/zmc -d 1
apache 16678 1972 1 12:47 ? 00:00:13 /usr/local/bin/zmc -d 1
root 16810 5531 0 13:02 pts/2 00:00:00 grep zmc
root@cam:/etc#
After STOPPING the modetect, pid#16678 goes away so I'm left with pids#15118, and 15546.
====
zmdc.log
====
'zmc -d 1' starting at 04/12/14 09:21:16, pid = 15118
'zmc -d 1' started at 04/12/14 09:48:17
'zmc -d 1' starting at 04/12/14 09:48:17, pid = 15312
'zmc -d 1' stopping at 04/12/14 10:06:28
'zmc -d 1' died at 04/12/14 10:06:28
'zmc -d 1' started at 04/12/14 10:06:28
'zmc -d 1' starting at 04/12/14 10:06:28, pid = 15444
'zmc -d 1' stopping at 04/12/14 10:23:39
'zmc -d 1' died at 04/12/14 10:23:39
'zmc -d 1' starting at 04/12/14 10:23:39, pid = 15546
'zmc -d 1' started at 04/12/14 10:23:39
'zmc -d 1' started at 04/12/14 10:43:00
'zmc -d 1' starting at 04/12/14 10:43:00, pid = 15746
'zmc -d 1' stopping at 04/12/14 10:58:51
'zmc -d 1' died at 04/12/14 10:58:51
'zmc -d 1' started at 04/12/14 10:58:51
'zmc -d 1' starting at 04/12/14 10:58:51, pid = 15916
'zmc -d 1' stopping at 04/12/14 11:12:12
'zmc -d 1' died at 04/12/14 11:12:12
'zmc -d 1' started at 04/12/14 11:12:12
'zmc -d 1' starting at 04/12/14 11:12:12, pid = 16018
'zmc -d 1' stopping at 04/12/14 11:48:04
'zmc -d 1' died at 04/12/14 11:48:04
'zmc -d 1' started at 04/12/14 11:48:04
'zmc -d 1' starting at 04/12/14 11:48:04, pid = 16270
'zmc -d 1' stopping at 04/12/14 11:59:35
'zmc -d 1' died at 04/12/14 11:59:35
'zmc -d 1' started at 04/12/14 11:59:35
'zmc -d 1' starting at 04/12/14 11:59:35, pid = 16340
'zmc -d 1' stopping at 04/12/14 12:12:56
'zmc -d 1' died at 04/12/14 12:12:56
'zmc -d 1' started at 04/12/14 12:12:56
'zmc -d 1' starting at 04/12/14 12:12:56, pid = 16440
'zmc -d 1' stopping at 04/12/14 12:47:08
'zmc -d 1' died at 04/12/14 12:47:08
'zmc -d 1' started at 04/12/14 12:47:08
'zmc -d 1' starting at 04/12/14 12:47:08, pid = 16678
'zmc -d 1' stopping at 04/12/14 13:02:40
'zmc -d 1' died at 04/12/14 13:02:41
'zma -m 4' stopping at 04/12/14 13:02:41
'zma -m 4' died at 04/12/14 13:02:41
'zmc -d 1' died at 04/12/14 13:02:58, signal 8
'zmc -d 1' started at 04/12/14 13:02:58
'zmc -d 1' starting at 04/12/14 13:02:58, pid = 16835
'zmc -d 1' crashed at 04/12/14 13:02:58, exit status 255
'zmc -d 1' started at 04/12/14 13:02:58
'zmc -d 1' starting at 04/12/14 13:02:58, pid = 16837
'zmc -d 1' crashed at 04/12/14 13:02:58, exit status 255
'zmc -d 1' died at 04/12/14 13:02:58, signal 8
'zmc -d 1' starting at 04/12/14 13:02:58, pid = 16839
'zmc -d 1' started at 04/12/14 13:02:58
'zmc -d 1' crashed at 04/12/14 13:02:58, exit status 255
Starting pending process, zmc -d 1
'zmc -d 1' started at 04/12/14 13:03:08
'zmc -d 1' starting at 04/12/14 13:03:08, pid = 16843
'zmc -d 1' crashed at 04/12/14 13:03:08, exit status 255
Starting pending process, zmc -d 1
'zmc -d 1' started at 04/12/14 13:03:28
'zmc -d 1' starting at 04/12/14 13:03:28, pid = 16848
'zmc -d 1' crashed at 04/12/14 13:03:28, exit status 255
Starting pending process, zmc -d 1
'zmc -d 1' started at 04/12/14 13:04:08
'zmc -d 1' starting at 04/12/14 13:04:08, pid = 16853
'zmc -d 1' crashed at 04/12/14 13:04:08, exit status 255
Starting pending process, zmc -d 1
'zmc -d 1' started at 04/12/14 13:05:28
'zmc -d 1' starting at 04/12/14 13:05:28, pid = 16855
'zmc -d 1' crashed at 04/12/14 13:05:28, exit status 255
Starting pending process, zmc -d 1
'zmc -d 1' started at 04/12/14 13:08:08
'zmc -d 1' starting at 04/12/14 13:08:08, pid = 16908
'zmc -d 1' crashed at 04/12/14 13:08:08, exit status 255
Starting pending process, zmc -d 1
'zmc -d 1' starting at 04/12/14 13:13:28, pid = 16956
'zmc -d 1' started at 04/12/14 13:13:28
'zmc -d 1' crashed at 04/12/14 13:13:28, exit status 255
====
zmwatch.log
====
'zmc -d 1' starting at 04/12/14 09:21:16, pid = 15118
Restarting capture daemon ('/usr/local/bin/zmdc.pl restart zmc -d 1'), time since last capture 1 seconds (1103046497-1103046496)
'zmc -d 1' started at 04/12/14 09:48:17
'zmc -d 1' starting at 04/12/14 09:48:17, pid = 15312
Restarting capture daemon ('/usr/local/bin/zmdc.pl restart zmc -d 1'), time since last capture 1 seconds (1103047588-1103047587)
'zmc -d 1' started at 04/12/14 10:06:28
'zmc -d 1' starting at 04/12/14 10:06:28, pid = 15444
Restarting capture daemon ('/usr/local/bin/zmdc.pl restart zmc -d 1'), time since last capture 1 seconds (1103048619-1103048618)
'zmc -d 1' starting at 04/12/14 10:23:39, pid = 15546
'zmc -d 1' started at 04/12/14 10:23:39
Restarting capture daemon ('/usr/local/bin/zmdc.pl restart zmc -d 1'), time since last capture 1 seconds (1103049780-1103049779)
'zmc -d 1' started at 04/12/14 10:43:00
'zmc -d 1' starting at 04/12/14 10:43:00, pid = 15746
Restarting capture daemon ('/usr/local/bin/zmdc.pl restart zmc -d 1'), time since last capture 1 seconds (1103050731-1103050730)
'zmc -d 1' started at 04/12/14 10:58:51
'zmc -d 1' starting at 04/12/14 10:58:51, pid = 15916
Restarting capture daemon ('/usr/local/bin/zmdc.pl restart zmc -d 1'), time since last capture 1 seconds (1103051532-1103051531)
'zmc -d 1' started at 04/12/14 11:12:12
'zmc -d 1' starting at 04/12/14 11:12:12, pid = 16018
Restarting capture daemon ('/usr/local/bin/zmdc.pl restart zmc -d 1'), time since last capture 1 seconds (1103053684-1103053683)
'zmc -d 1' started at 04/12/14 11:48:04
'zmc -d 1' starting at 04/12/14 11:48:04, pid = 16270
Restarting capture daemon ('/usr/local/bin/zmdc.pl restart zmc -d 1'), time since last capture 1 seconds (1103054375-1103054374)
'zmc -d 1' started at 04/12/14 11:59:35
'zmc -d 1' starting at 04/12/14 11:59:35, pid = 16340
Restarting capture daemon ('/usr/local/bin/zmdc.pl restart zmc -d 1'), time since last capture 1 seconds (1103055176-1103055175)
'zmc -d 1' started at 04/12/14 12:12:56
'zmc -d 1' starting at 04/12/14 12:12:56, pid = 16440
Restarting capture daemon ('/usr/local/bin/zmdc.pl restart zmc -d 1'), time since last capture 1 seconds (1103057228-1103057227)
'zmc -d 1' started at 04/12/14 12:47:08
'zmc -d 1' starting at 04/12/14 12:47:08, pid = 16678
This seems to be completely random and I don't know why. I was originally using Redhat 9 when this occurred. After a 1 week vacation, I came back and found my system full of orphan zma processes so I created a new system using Slackware 10 in hopes that it was due to the OS installation. However, now I am mystified.
====
Sysinfo:
====
P4/1.8GHz with 512M
Linux cam 2.6.9 #13 Sat Dec 11 21:43:23 PST 2004 i686 unknown unknown GNU/Linux
Zoneminder 1.19.5
2 monitors each capturing at 10fps
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 50331648
02:0a.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 02)
02:0b.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
root@cam:~# ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 0 root 600 33554432 5 dest
0x00000000 32769 root 600 33554432 5 dest
0x00000000 65538 root 600 46084 5 dest
0x7a6d2001 98307 apache 700 46080648 2
0x7a6d2004 163844 apache 700 30720448 0
------ Semaphore Arrays --------
key semid owner perms nsems
------ Message Queues --------
key msqid owner perms used-bytes messages
Multiple redundant zmc processes.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Hi,
I suspect you have zmc process left behind as zombies because the zmdc.pl process is not able to reap them for some reason. However I think this is a secondary issue. The main issue is why zmwatch is killing your zmc processes in the first place. It looks from your zmwatch log that it is killing them when they have only gone 1 second since the last capture. Can you check what kind of capture rate you are getting ordinarily? Also what do you have ZM_WATCH_MAX_DELAY set to?
Phil,
I suspect you have zmc process left behind as zombies because the zmdc.pl process is not able to reap them for some reason. However I think this is a secondary issue. The main issue is why zmwatch is killing your zmc processes in the first place. It looks from your zmwatch log that it is killing them when they have only gone 1 second since the last capture. Can you check what kind of capture rate you are getting ordinarily? Also what do you have ZM_WATCH_MAX_DELAY set to?
Phil,
Thanks Phil.
ZM_WATCH_MAX_DELAY = 15
(I believe this is the default).
Currently, I only have them set to capture at 10fps. A sample of my log is:
Dec 14 09:21:16 cam zmc-d1[14968]: INF [Got TERM signal, exiting]
Dec 14 09:21:16 cam zmc-d1[15118]: INF [Debug Level = 0, Debug Log = ]
Dec 14 09:21:16 cam zmc-d1[15118]: INF [Starting Capture]
Dec 14 09:22:18 cam zms[15122]: INF [Debug Level = 0, Debug Log = ]
Dec 14 09:22:26 cam zma-m4[14205]: INF [Office: 89000 - Processing at 11.63 fps]
Dec 14 09:22:26 cam zms[15124]: INF [Debug Level = 0, Debug Log = ]
Dec 14 09:22:41 cam zmc-d1[15118]: INF [Office: 1000 - Capturing at 11.76 fps]
Dec 14 09:23:51 cam zma-m4[14205]: INF [Office: 90000 - Processing at 11.76 fps]
Dec 14 09:24:06 cam zmc-d1[15118]: INF [Office: 2000 - Capturing at 11.76 fps]
Dec 14 09:25:16 cam zma-m4[14205]: INF [Office: 91000 - Processing at 11.76 fps]
Dec 14 09:25:31 cam zmc-d1[15118]: INF [Office: 3000 - Capturing at 11.76 fps]
Dec 14 09:26:41 cam zma-m4[14205]: INF [Office: 92000 - Processing at 11.76 fps]
Dec 14 09:26:51 cam zmc-d0[3834]: INF [Home: 970000 - Capturing at 9.78 fps]
Dec 14 09:26:57 cam zmc-d1[15118]: INF [Office: 4000 - Capturing at 11.63 fps]
Dec 14 09:28:06 cam zma-m4[14205]: INF [Office: 93000 - Processing at 11.76 fps]
Dec 14 09:28:22 cam zmc-d1[15118]: INF [Office: 5000 - Capturing at 11.76 fps]
Dec 14 09:29:31 cam zma-m4[14205]: INF [Office: 94000 - Processing at 11.76 fps]
Dec 14 09:29:47 cam zmc-d1[15118]: INF [Office: 6000 - Capturing at 11.76 fps]
Dec 14 09:30:57 cam zma-m4[14205]: INF [Office: 95000 - Processing at 11.63 fps]
Dec 14 09:31:12 cam zmc-d1[15118]: INF [Office: 7000 - Capturing at 11.76 fps]
Dec 14 09:32:07 cam zma-m1[3842]: INF [Home: 950000 - Processing at 9.78 fps]
Dec 14 09:32:22 cam zma-m4[14205]: INF [Office: 96000 - Processing at 11.76 fps]
Dec 14 09:32:37 cam zmc-d1[15118]: INF [Office: 8000 - Capturing at 11.76 fps]
Dec 14 09:33:47 cam zma-m4[14205]: INF [Office: 97000 - Processing at 11.76 fps]
Dec 14 09:34:02 cam zmc-d1[15118]: INF [Office: 9000 - Capturing at 11.76 fps]
Dec 14 09:35:12 cam zma-m4[14205]: INF [Office: 98000 - Processing at 11.76 fps]
Dec 14 09:35:27 cam zmc-d1[15118]: INF [Office: 10000 - Capturing at 11.76 fps]
Dec 14 09:36:37 cam zma-m4[14205]: INF [Office: 99000 - Processing at 11.76 fps]
Dec 14 09:36:53 cam zmc-d1[15118]: INF [Office: 11000 - Capturing at 11.63 fps]
Dec 14 09:38:02 cam zma-m4[14205]: INF [Office: 100000 - Processing at 11.76 fps
]
Dec 14 09:38:18 cam zmc-d1[15118]: INF [Office: 12000 - Capturing at 11.76 fps]
Dec 14 09:39:28 cam zma-m4[14205]: INF [Office: 101000 - Processing at 11.63 fps
]
Dec 14 09:39:43 cam zmc-d1[15118]: INF [Office: 13000 - Capturing at 11.76 fps]
Dec 14 09:40:53 cam zma-m4[14205]: INF [Office: 102000 - Processing at 11.76 fps
]
Dec 14 09:41:08 cam zmc-d1[15118]: INF [Office: 14000 - Capturing at 11.76 fps]
Dec 14 09:42:18 cam zma-m4[14205]: INF [Office: 103000 - Processing at 11.76 fps
]
Dec 14 09:42:33 cam zmc-d1[15118]: INF [Office: 15000 - Capturing at 11.76 fps]
Dec 14 09:43:43 cam zma-m4[14205]: INF [Office: 104000 - Processing at 11.76 fps
]
Dec 14 09:43:53 cam zmc-d0[3834]: INF [Home: 980000 - Capturing at 9.78 fps]
It would seem that analysis is able to keep up with capture rate throughout. I have the full log but pasting it here wouldn't make much sense. I have been able to set it to capture up to 30fps before but it didn't really make much sense to do so.
ZM_WATCH_MAX_DELAY = 15
(I believe this is the default).
Currently, I only have them set to capture at 10fps. A sample of my log is:
Dec 14 09:21:16 cam zmc-d1[14968]: INF [Got TERM signal, exiting]
Dec 14 09:21:16 cam zmc-d1[15118]: INF [Debug Level = 0, Debug Log = ]
Dec 14 09:21:16 cam zmc-d1[15118]: INF [Starting Capture]
Dec 14 09:22:18 cam zms[15122]: INF [Debug Level = 0, Debug Log = ]
Dec 14 09:22:26 cam zma-m4[14205]: INF [Office: 89000 - Processing at 11.63 fps]
Dec 14 09:22:26 cam zms[15124]: INF [Debug Level = 0, Debug Log = ]
Dec 14 09:22:41 cam zmc-d1[15118]: INF [Office: 1000 - Capturing at 11.76 fps]
Dec 14 09:23:51 cam zma-m4[14205]: INF [Office: 90000 - Processing at 11.76 fps]
Dec 14 09:24:06 cam zmc-d1[15118]: INF [Office: 2000 - Capturing at 11.76 fps]
Dec 14 09:25:16 cam zma-m4[14205]: INF [Office: 91000 - Processing at 11.76 fps]
Dec 14 09:25:31 cam zmc-d1[15118]: INF [Office: 3000 - Capturing at 11.76 fps]
Dec 14 09:26:41 cam zma-m4[14205]: INF [Office: 92000 - Processing at 11.76 fps]
Dec 14 09:26:51 cam zmc-d0[3834]: INF [Home: 970000 - Capturing at 9.78 fps]
Dec 14 09:26:57 cam zmc-d1[15118]: INF [Office: 4000 - Capturing at 11.63 fps]
Dec 14 09:28:06 cam zma-m4[14205]: INF [Office: 93000 - Processing at 11.76 fps]
Dec 14 09:28:22 cam zmc-d1[15118]: INF [Office: 5000 - Capturing at 11.76 fps]
Dec 14 09:29:31 cam zma-m4[14205]: INF [Office: 94000 - Processing at 11.76 fps]
Dec 14 09:29:47 cam zmc-d1[15118]: INF [Office: 6000 - Capturing at 11.76 fps]
Dec 14 09:30:57 cam zma-m4[14205]: INF [Office: 95000 - Processing at 11.63 fps]
Dec 14 09:31:12 cam zmc-d1[15118]: INF [Office: 7000 - Capturing at 11.76 fps]
Dec 14 09:32:07 cam zma-m1[3842]: INF [Home: 950000 - Processing at 9.78 fps]
Dec 14 09:32:22 cam zma-m4[14205]: INF [Office: 96000 - Processing at 11.76 fps]
Dec 14 09:32:37 cam zmc-d1[15118]: INF [Office: 8000 - Capturing at 11.76 fps]
Dec 14 09:33:47 cam zma-m4[14205]: INF [Office: 97000 - Processing at 11.76 fps]
Dec 14 09:34:02 cam zmc-d1[15118]: INF [Office: 9000 - Capturing at 11.76 fps]
Dec 14 09:35:12 cam zma-m4[14205]: INF [Office: 98000 - Processing at 11.76 fps]
Dec 14 09:35:27 cam zmc-d1[15118]: INF [Office: 10000 - Capturing at 11.76 fps]
Dec 14 09:36:37 cam zma-m4[14205]: INF [Office: 99000 - Processing at 11.76 fps]
Dec 14 09:36:53 cam zmc-d1[15118]: INF [Office: 11000 - Capturing at 11.63 fps]
Dec 14 09:38:02 cam zma-m4[14205]: INF [Office: 100000 - Processing at 11.76 fps
]
Dec 14 09:38:18 cam zmc-d1[15118]: INF [Office: 12000 - Capturing at 11.76 fps]
Dec 14 09:39:28 cam zma-m4[14205]: INF [Office: 101000 - Processing at 11.63 fps
]
Dec 14 09:39:43 cam zmc-d1[15118]: INF [Office: 13000 - Capturing at 11.76 fps]
Dec 14 09:40:53 cam zma-m4[14205]: INF [Office: 102000 - Processing at 11.76 fps
]
Dec 14 09:41:08 cam zmc-d1[15118]: INF [Office: 14000 - Capturing at 11.76 fps]
Dec 14 09:42:18 cam zma-m4[14205]: INF [Office: 103000 - Processing at 11.76 fps
]
Dec 14 09:42:33 cam zmc-d1[15118]: INF [Office: 15000 - Capturing at 11.76 fps]
Dec 14 09:43:43 cam zma-m4[14205]: INF [Office: 104000 - Processing at 11.76 fps
]
Dec 14 09:43:53 cam zmc-d0[3834]: INF [Home: 980000 - Capturing at 9.78 fps]
It would seem that analysis is able to keep up with capture rate throughout. I have the full log but pasting it here wouldn't make much sense. I have been able to set it to capture up to 30fps before but it didn't really make much sense to do so.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact: