monit-general
[Top][All Lists]
Advanced

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

Fwd: Re: Cant able to check java process in monit


From: nirmala nirmala
Subject: Fwd: Re: Cant able to check java process in monit
Date: Fri, 11 May 2007 16:06:50 +0100 (BST)

Hi,
        Yesterday i received reply for my query. As per ur suggestion, i put all the script files in bin directory and changed settings in match_engine_1.env file. After that when i run tat scripts, match_engine_1.env file s running - no o/p, no error.
          when i run ./start match_engine_1.env  , error is
 
./start.bash: line 57: /usr/java/jdk1.5.0_06/log/match_engine_1.env.log: No such file or directory
Launch started on Fri May 11 08:55:37 UTC 2007
Runtime CLASSPATH
/usr/java/jdk1.5.0_06/bin
/usr/java/jdk1.5.0_06/lib
/usr/java/jdk1.5.0_06/etc
 
Runtime LD_LIBRARY_PATH
/usr/java/jdk1.5.0_06/bin/lib
/usr/java/jdk1.5.0_06/lib
 
Starting /usr/java/jdk1.5.0_06/utl/java/bin/java -Dlog4j.configuration=match_engine_1.env-log4j.properties -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Xms128m -Xmx256m -DDBPROVIDER=NO -DDBUS_VERSION=3 com.db.fipb.match.MatchEngineApplication
./start.bash: line 63: /usr/java/jdk1.5.0_06/log/match_engine_1.env.log: No such file or directory
 
for ./stop.bash match_engine_1.env,
 
match_engine_1.env.pid process does not exist
for ./startbg.bash match_engine_1.env
  same error as start.bash
for  ./list.bash match_engine_1.env
 top: bad pid ''

If possible, pls let me know what steps i hav to take further or what mistake i have done.
 
Regards,
Nirmala

Note: forwarded message attached.


Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? Here's a solution!
--- Begin Message --- 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.

Attachment: set.env
Description: Binary data

Attachment: start.bash
Description: Binary data

Attachment: match_engine_1.env
Description: Binary data

Attachment: startbg.bash
Description: Binary data

Attachment: list.bash
Description: Binary data

Attachment: stop.bash
Description: Binary data

--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

--- End Message ---

reply via email to

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