Feature Request: Watchdog which restarts a dead camera thread
Description
See my answer on
SupportQuestion2005x01x03x114817
See also discussion topic
MotionWatchdog.
--
KennethLavrsen - 31 Mar 2005
Follow up
Surprise. I accept my own proposal. Feel free to discuss anyway.
--
KennethLavrsen - 31 Mar 2005
Some mechanism to restart a dead thread is a GOOD IDEA and should be implemented IMMEDIATELY, because I frequently have camera hangs and messages like this in my log repeating forever every three seconds:
Jan 4 05:57:53 bach motion: [6] connect returned error
Jan 4 05:57:53 bach motion: [6] re-opening camera (non-streaming)
--
GregSwift - 04 Jan 2006
Watchdog feature is not for network cameras but v4l/2 devices , because netcam has its own recovery method.
--
AngelCarpintero - 05 Jan 2006
Part of a shell script I use, called every 5 minutes via cron to keep motion going if it crashes. I run a new motion for each camera and have had good luck for many years this way.
ps aux | grep "motionf3/motion"
if [ $? -ne 0 ]
then
echo "Motion3 not running, starting it"
/root/motionf3/restart-motion
fi
ps aux | grep "motionf4/motion"
if [ $? -ne 0 ]
then
echo "Motion4 not running, starting it"
/root/motionf4/restart-motion
fi
--
TWikiGuest - 03 Apr 2006
The watchdog should be included for netcams also because in my specific setup my threads die on netcams (they last less than 24 hours), and although the netcams are working properly (I can visit them directly via HTTP) nothing is recorded. The motion progam never dies, so the cron job method will not work. Instead the program just outputs "video signal lost" and the threads never recover.
--
MichaelHarris - 05 Apr 2006