I wrote a script called stream-start.sh that follows your instructions but
even though ffmpeg starts fine it does not create a pid file. I created
this:
*long-ffmpeg-command &*
*pid=$!*
*echo $pid > /var/run/stream.pid*
but this didn't work and and after trawling google and trying a few
variations the script still does not create a pid file.

in monitrc I have:
*check process stream with pidfile /var/run/stream.pid*
*       start = "/usr/bin /root/start-stream.sh"*
and monit starts without any complaints

but the monit log shows:
*error    : monit: Error reading pid from file '/var/run/stream.pid'*
*error    : 'stream' process is not running*
*error    : monit: Start or stop method not defined -- process stream*
thanks for any further advice.



On Tue, May 6, 2014 at 9:00 PM, admin-at-extremeshok-dot-com <
[email protected]> wrote:

>  you need to correctly start ffmpeg
>
> somecrapcommand &
> pid=$!
> echo $pid > /var/run/somecrapcommand.pid
>
>
>
> On 5/6/2014 9:36 PM, Anthony Griffiths wrote:
>
> I've tried but no success so far. I found this page
> http://mmonit.com/wiki/Monit/FAQ but I can't get the the wrapper script
> there adapted to my needs. (I don't know what JAVA_HOME and CLASSPATH=
> ajarfile.jar.is.) I start ffmpeg with a single (long) command in the
> console and either put a '&' on the end to background it or run it in a
> screen and then detach. This is how the process runs, it's not done by
> /etc/init.d/blah-de-blah. Can the monit wrapper script still work with this?
>
>
> On Tue, May 6, 2014 at 6:21 AM, Weedy <[email protected]> wrote:
>
>> On 05/05/14 04:59 AM, Anthony Griffiths wrote:
>> > I'm running monit-5.3.1-6 on a fedora 20 machine.
>> > I use ffmpeg to stream video and often the stream goes down. I saw in
>> > monitrc there is a section to check a process but when ffmpeg is running
>> > there is no pid file and in the ffmpeg log there is no reference to one.
>>
>>  Any reason what ever script/program you have starting ffmpeg can't make
>> a pid file?
>>
>>
>> --
>> To unsubscribe:
>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>
>
>
>
> --
> To unsubscribe:https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to