[FFmpeg-user] issue with monitoring script
Pedro Daniel Costa
portalnet2 at outlook.com.br
Sat Jul 21 02:37:49 EEST 2018
I need some guidance
I have setup a crontab
To check every minute if a live transcoding channel has stopped.
The script gets pulled via crontab and I can see the instance starting up, but then after couple of seconds it gets shutdown,
If I run the script manually it starts both ffserver and ffmpeg input couple of seconds later and it run for hours/days with no problem..
If I close the terminal where I have executed the script and let the crontab execute it, it start and shutdown couple of seconds after
I have correct permissions on the script files and config files..
Here is the ouput of the script
Can someone help me on this as I want to make a monitoring script to check all the live transmission transcodings being used
And if it crashes or stops I want the crontab to init ffserver and ffmpeg shortly after again
Here is the output of the script, can someone please tell me what I am doing wrong? I use the same similar script to my middlware application to check the live multicast transmission and tunners setup from the PCI devices..
# check channel transcoding
# ffserver channel1.sh
if ps x |grep -v grep | grep channel1.cfg ;
echo "FFserver runing "
echo "FFserver down"
ffserver -d -f channel1.cfg
if ps x |grep -v grep | grep channel1.ffm ;
echo "Transcoder running "
echo "transcoder down"
ffmpeg -i udp://@18.104.22.168:4002 http://22.214.171.124:8890/channel1.ffm
Any hints or tips on how to setup a correct check status script will be appreciated.
More information about the ffmpeg-user