monit-general
[Top][All Lists]
Advanced

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

Queris regarding monit processes


From: nirmala nirmala
Subject: Queris regarding monit processes
Date: Thu, 24 May 2007 15:44:24 +0100 (BST)

Hi,
                In my monit control file (monitrc), i'm doing jboss ,sybase and java process. In my control file, i could be able to start and stop java process but not for jboss and sybase process.
               For these two processes, i put its start, stop and restart cmd in shell script and used to start and stop tat script only from monit. Tat script also containing creation of PID file. But dont know why i cant be able to execute these actions from monit. I herewith given my shell script for jboss process. If possible, pls let me know where i have to make changes for it.
 
   
case $1 in
start)
       a="`ps ux | grep jboss | awk '{print $2}'`"
       echo $a > /tmp/jboss.pid
       echo "starting jboss.."
       /root/jboss-4.0.0/bin/run.sh &
        ;;
stop)
       # kill `cat /tmp/jboss.pid`
        echo "stopping jboss.."
        /root/jboss-4.0.0/bin/shutdown.sh -S
        ;;
restart)
        stop
        sleep 35
        pkill java
        start
        ;;
*)
echo "Usage: $0 { start | stop | restart }"
       exit 1
        ;;
esac
  
Regards,
Nirmala


Download prohibited? No problem! CHAT from any browser, without download.
reply via email to

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