monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit] Need help restarting an app.


From: SPAZ
Subject: Re: [monit] Need help restarting an app.
Date: Thu, 3 Jul 2008 17:14:58 -0700 (PDT)

I have tried every vareation of the kill command and cannot come up with a
working one.

check process Phantom_World with pidfile /mangos1/bin/mangos.pid
   stop program = "killall -TERM mangos-world"
   if cpu is greater than 60% for 2 cycles then alert
   if cpu > 80% for 5 cycles then restart
   if totalmem > 500 MB for 5 cycles then restart
   if loadavg(5min) greater than 10 for 8 cycles then stop

it monotors the resources fine bit when i issue a monit reload command to
reloan the monitrc file it says killall (or what ever i put there command
doesn't exist.) but when i run killall -s kill mangos-world from ssh shell
the app shuts down with no issue.


Martin Pala wrote:
> 
> you can send signal to process using for example kill/pkill/killall,  
> for example:
> 
> killall -TERM app
> 
> 
> 
> 
> On Jul 4, 2008, at 12:33 AM, SPAZ wrote:
> 
>>
>> I'm not really sure what your talking about. when i attach the  
>> screen the
>> only option i have is to CTRL+C. even if i delete the .pid file the  
>> app
>> stays running as the .pid is an option i have enabled in the .conf  
>> files of
>> the app.
>>
>>
>> Martin Pala wrote:
>>>
>>> Most applications handle signals like TERM gracefully ... try to  
>>> check
>>> whether the app can be terminated for example using some signal
>>>
>>> Martin
>>>
>>>
>>> On Jul 4, 2008, at 12:02 AM, SPAZ wrote:
>>>
>>>>
>>>> I currently am starting this app in screen with
>>>>
>>>> ---> ./appname -c /location/of/app.conf
>>>>
>>>> To end the app i have to attach the screen and issue a CTRL+C to
>>>> terminate.
>>>>
>>>> I have been able to have monit monitor all the resources that this
>>>> app is
>>>> using by monitoring the .pid file the app makes.
>>>>
>>>> Is there any way i can have monit restart this app when the memory/ 
>>>> cpu
>>>> resources reach a certain level or if monit senses that the app has
>>>> frozen?
>>>>
>>>> Thanks
>>>> SPAZ
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/Need-help-restarting-an-app.-tp18266291p18266291.html
>>>> Sent from the monit-general mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>>> --
>>>> To unsubscribe:
>>>> http://lists.nongnu.org/mailman/listinfo/monit-general
>>>
>>>
>>>
>>> --
>>> To unsubscribe:
>>> http://lists.nongnu.org/mailman/listinfo/monit-general
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Need-help-restarting-an-app.-tp18266291p18269489.html
>> Sent from the monit-general mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> To unsubscribe:
>> http://lists.nongnu.org/mailman/listinfo/monit-general
> 
> 
> 
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Need-help-restarting-an-app.-tp18266291p18270474.html
Sent from the monit-general mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]