[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cant able to check java process in monit
From: |
Alex Shagiev |
Subject: |
Re: Cant able to check java process in monit |
Date: |
Thu, 10 May 2007 08:59:59 -0400 |
Put all of the files in to a bin directory
and change settings in match_engine.env file. It works work me.
./start.bash match_engine_1.env
./startbg.bash match_engine_1.env
./stop.bash match_engine_1.env
./list.bash match_engine_1.env
Alex Shagiev
Prime Brokerage IT
Tel: + 1 (212) 250-7939
Cel: +1 (646) 644-3262
Martin Pala <address@hidden>
Sent by: address@hidden
05/10/2007 08:00 AM
Please respond to
This is the general mailing list for monit <address@hidden> |
|
To
| This is the general mailing
list for monit <address@hidden>
|
cc
|
|
Subject
| Re: Cant able to check java
process in monit |
|
Check the pid stored in the file and compare it to
the real process pid.
On May 10, 2007, at 3:35 AM, nirmala nirmala wrote:
> Hi,
> I need to process java programs
in monit. For this i
> used to check one sample program in java and i created pid for
> this java program. I used below java program as sample for monitoring.
>
> public class sample
> {
> public static void main(String args[]) throws Throwable
> {
> int i=0;
> while (i<5)
> {
> System.out.println("thread
"
> +Thread.currentThread().getName()+"
step "+i);
> Thread.sleep(5000); i++;
> }
> }
> }
> For this i created pid file using shell script as follows
> #!/bin/bash
> export JAVA_HOME=/usr/java/jdk1.5.0_06
> export DISPLAY=localhost:0.0
> CLASSPATH=/usr/java/jdk1.5.0_06/bin/
> case $1 in
> start)
> echo $$ > /var/run/sample.pid;
> exec 2>&1 /usr/java/jdk1.5.0_06/bin/java
-cp $
> {CLASSPATH} sample\
> 1>/var/run/sample.out
> ;;
> stop)
> kill `cat /var/run/sample.pid`
;;
> *)
> echo "usage: sample
{start|stop}" ;;
> esac
> Now my problem is when i start monit, its running. But whenever i
> check monit status for this java process, its coming as ".does
not
> exist" . That s below.
>
> Process 'sample'
> status
Does not exist
> monitoring status
monitored
> data collected
Thu May 10 12:35:16 2007
> and my control file for this java process is below
>
> check process sample with pidfile /var/run/sample.pid
> start = "/usr/java/jdk1.5.0_06/bin/sample.class
start"
> stop = "/usr/java/jdk1.5.0_06/bin/sample.class
stop"
> So pls let me know what step i have to do for this.
>
> Thanks,
> Nirmala
>
> Here’s a new way to find what you're looking for - Yahoo! Answers
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
---
This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
set.env
Description: Binary data
start.bash
Description: Binary data
match_engine_1.env
Description: Binary data
startbg.bash
Description: Binary data
list.bash
Description: Binary data
stop.bash
Description: Binary data