Restart Zoneminder Automatically
Restart Zoneminder Automatically
The issue is after about a day ZM will start losing camera connectivity on one or more of my 6 cameras. Simply restarting ZM from the console will get all the cameras working again. I was wondering if there is a way for ZM to restart it itself at a designated time automatically thru some sort of filter or option setting. Any solutions please help.
Re: Restart Zoneminder Automatically
Set up a CRON job to change the run state of ZM. Should be documented in the WIKI.
Re: Restart Zoneminder Automatically
By any chance are your cameras that are stopping running libvlc?
Re: Restart Zoneminder Automatically
Yes, all my cameras are running on libvlc.
Re: Restart Zoneminder Automatically
Switch to ffmpeg and your cameras will stay up.
Re: Restart Zoneminder Automatically
I've found something similar in wiki that has different modes for certain time of day I have saved a 12am restart in the console.
What would a cron tab look like to restart ZM? and what file would I modify to enter the new tab line?
What would a cron tab look like to restart ZM? and what file would I modify to enter the new tab line?
Re: Restart Zoneminder Automatically
Here you can generate a cron job for a command as e.g. "sudo service zoneminder restart"
generateit[dot]net [ slash ] cron-job (sorry, can't post links)
Then you need to add the line to your crontab, after you have entered your wished dates into the site it shows you what to do.
generateit[dot]net [ slash ] cron-job (sorry, can't post links)
Then you need to add the line to your crontab, after you have entered your wished dates into the site it shows you what to do.
- Mini-ITX Fractal Nas Array
- i7-3770K + 12GB DDR3
- 6x Samsung HD204UI Raid5/Raid6
- Ubuntu 14.04 Minimal Server
* Archipel Orchestrator Virtualization Host
* Xubuntu Desktop with Plank Dock
Re: Restart Zoneminder Automatically
Got figured out thanks so much for help. First time setting up cron jobs. Learned a lot.
Re: Restart Zoneminder Automatically
For some reason, my zoneminder goes into the stop state at random times.
I want to setup a cron job for checking if it's running, and if not restart it.
I know how to start it by invoking /usr/bin/zmpkg.pl xxx (where xxx=state)
but how can I check if it's running?
I want to setup a cron job for checking if it's running, and if not restart it.
I know how to start it by invoking /usr/bin/zmpkg.pl xxx (where xxx=state)
but how can I check if it's running?
Re: Restart Zoneminder Automatically
Code: Select all
root@perkin:~# zmpkg.pl status
running
Or ... just
Code: Select all
root@perkin:~# zmpkg.pl start
Of course none of this is the root cause of why your Zoneminder is stopping itself, you may wish to hunt that down. Check the zoneminder logs to see if you can see why, next time it comes up as "stopped". The last entries in the log may give a clue as to why it all stopped.
Re: Restart Zoneminder Automatically
Ok here are the last lines of the log after it has stopped (for no apparent reason..)
Code: Select all
Jul 1 16:03:15 odroid-server zmc_dvideo2[29671]: WAR [Buffer overrun at index 143, image 131643, slow down capture, speed up analysis or increase ring buffer size]
Jul 1 16:03:16 odroid-server zmc_dvideo2[29671]: WAR [Buffer overrun at index 164, image 131664, slow down capture, speed up analysis or increase ring buffer size]
Jul 1 16:03:17 odroid-server zmc_dvideo2[29671]: WAR [Buffer overrun at index 205, image 131705, slow down capture, speed up analysis or increase ring buffer size]
Jul 1 16:03:18 odroid-server zma_m3[29809]: INF [Eisodos: 125937 - Gone into alert state]
Jul 1 16:03:18 odroid-server zmc_dvideo2[29671]: WAR [Buffer overrun at index 226, image 131726, slow down capture, speed up analysis or increase ring buffer size]
Jul 1 16:03:41 odroid-server zma_m3[29809]: INF [Eisodos: 126000 - Analysing at 3.39 fps]
Jul 1 16:03:41 odroid-server rsyslogd-2007: action 'action 9' suspended, next retry is Fri Jul 1 16:05:11 2016 [v8.16.0 try http://www.rsyslog.com/e/2007 ]
Jul 1 16:03:45 odroid-server zma_m3[29809]: INF [Eisodos: 126012 - Left alarm state (952) - 171(46) images]
Jul 1 16:03:46 odroid-server zma_m3[29809]: INF [Eisodos: 126012 - Closing event 952, alarm end]
Jul 1 16:03:47 odroid-server zma_m3[29809]: INF [Eisodos: 126035 - Gone into prealarm state]
Jul 1 16:03:47 odroid-server zma_m3[29809]: INF [Eisodos: 126042 - Gone into prealarm state]
Jul 1 16:04:19 odroid-server zma_m3[29809]: INF [Eisodos: 126193 - Gone into prealarm state]
Jul 1 16:04:24 odroid-server zmc_dvideo1[29653]: INF [Saloni: 130000 - Capturing at 4.00 fps]
Jul 1 16:04:28 odroid-server zmc_dvideo2[29671]: INF [Eisodos: 132000 - Capturing at 10.31 fps]
Jul 1 16:04:32 odroid-server zma_m2[29710]: INF [Saloni: 129948 - Gone into prealarm state]
Jul 1 16:04:33 odroid-server zma_m2[29710]: INF [Saloni: 129950 - Gone into alarm state]
Jul 1 16:04:33 odroid-server zma_m2[29710]: INF [Saloni: 129950 - Opening new event 953, alarm start]
Jul 1 16:04:42 odroid-server zmc_dvideo1[29653]: WAR [Buffer overrun at index 36, image 130286, slow down capture, speed up analysis or increase ring buffer size]
Jul 1 16:04:44 odroid-server zma_m3[29809]: INF [Eisodos: 126284 - Gone into prealarm state]
Jul 1 16:04:44 odroid-server zmc_dvideo1[29653]: WAR [Buffer overrun at index 51, image 130301, slow down capture, speed up analysis or increase ring buffer size]
Jul 1 16:04:46 odroid-server zma_m2[29710]: INF [Saloni: 129954 - Gone into alert state]
Jul 1 16:05:03 odroid-server zma_m3[29809]: INF [Eisodos: 126365 - Gone into prealarm state]
Jul 1 16:05:04 odroid-server zma_m2[29710]: INF [Saloni: 130000 - Analysing at 3.66 fps]
Jul 1 16:05:14 odroid-server zma_m2[29710]: INF [Saloni: 130029 - Left alarm state (953) - 131(6) images]
Jul 1 16:05:14 odroid-server rsyslogd-2007: action 'action 9' suspended, next retry is Fri Jul 1 16:06:44 2016 [v8.16.0 try http://www.rsyslog.com/e/2007 ]
Jul 1 16:05:15 odroid-server zma_m2[29710]: INF [Saloni: 130029 - Closing event 953, alarm end]
Jul 1 16:05:30 odroid-server zma_m3[29809]: INF [Eisodos: 126474 - Gone into prealarm state]
Jul 1 16:05:51 odroid-server zma_m3[29809]: INF [Eisodos: 126555 - Gone into prealarm state]
Jul 1 16:05:57 odroid-server zma_m2[29710]: INF [Saloni: 130220 - Gone into prealarm state]
Jul 1 16:05:58 odroid-server zma_m2[29710]: INF [Saloni: 130222 - Gone into alarm state]
Jul 1 16:06:00 odroid-server zma_m2[29710]: INF [Saloni: 130222 - Opening new event 954, alarm start]
Jul 1 16:06:03 odroid-server zmwatch[29712]: INF [Analysis daemon for Saloni needs restarting, time since last analysis 6 seconds (1467378363-1467378357)]
Jul 1 16:06:05 odroid-server zmwatch[29712]: INF [Restarting analysis daemon for Saloni]
Jul 1 16:06:05 odroid-server zma_m3[29809]: INF [Eisodos: 126606 - Gone into prealarm state]
Jul 1 16:06:07 odroid-server zmc_dvideo1[29653]: WAR [Buffer overrun at index 147, image 130897, slow down capture, speed up analysis or increase ring buffer size]
Jul 1 16:06:10 odroid-server zmdc[29565]: INF ['zma -m 2' sending stop to pid 29710 at 16/07/01 16:06:10]
Jul 1 16:06:12 odroid-server zmc_dvideo1[29653]: INF [Saloni: 131000 - Capturing at 9.17 fps]
Jul 1 16:06:14 odroid-server zma_m2[29710]: INF [Got signal 15 (Terminated), exiting]
Jul 1 16:06:15 odroid-server zma_m2[29710]: INF [Saloni: 130225 - Closing event 954, shutting down]
Jul 1 16:06:16 odroid-server zma_m3[29809]: INF [Eisodos: 126657 - Gone into prealarm state]
Jul 1 16:06:17 odroid-server zmc_dvideo1[29653]: WAR [Buffer overrun at index 152, image 131152, slow down capture, speed up analysis or increase ring buffer size]
Jul 1 16:06:18 odroid-server zmdc[29565]: WAR ['zma -m 2' has not stopped at 16/07/01 16:06:18. Sending KILL to pid 29710]
Jul 1 16:06:19 odroid-server zmdc[29565]: INF ['zma -m 2' exited normally]
Jul 1 16:06:19 odroid-server systemd[1]: zoneminder.service: Main process exited, code=exited, status=4/NOPERMISSION
Jul 1 16:06:19 odroid-server zmpkg[31439]: INF [Sanity checking States table...]
Jul 1 16:06:20 odroid-server zmpkg[31439]: INF [Command: stop]
Jul 1 16:06:21 odroid-server zma_m3[29809]: INF [Eisodos: 126673 - Gone into prealarm state]
Jul 1 16:06:23 odroid-server systemd[1]: zoneminder.service: Control process exited, code=exited status=1
Jul 1 16:06:24 odroid-server zmc_dvideo1[29653]: INF [Got signal 15 (Terminated), exiting]
Jul 1 16:06:25 odroid-server zmc_dvideo2[29671]: INF [Got signal 15 (Terminated), exiting]
Jul 1 16:06:25 odroid-server zma_m3[29809]: INF [Got signal 15 (Terminated), exiting]
Jul 1 16:06:25 odroid-server systemd[1]: zoneminder.service: Unit entered failed state.
Jul 1 16:06:25 odroid-server systemd[1]: zoneminder.service: Failed with result 'exit-code'.