[Top][All Lists]

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

Re: Monit in java process

From: address@hidden
Subject: Re: Monit in java process
Date: Fri, 11 May 2007 08:25:20 -0700
User-agent: Thunderbird (Macintosh/20070326)

Check the Resin Java server site. For the 3.0.X series product, they use a perl process to launch the java server and create a pid file AFAIK. My monit (many different versions) are always able to detect and report changes to the Resin Java processes. And with java processes, it is important to monitor the CPU usage, memory and system load to detect run away threads that start spinning the CPU and/or hogging all the memory and require a restart of the Java process :)

  check process resin with pidfile /usr/local/resin30/
    start program = "/usr/local/resin30/conf/startresin"
    stop program  = "/usr/local/resin30/conf/stopresin"
    if failed port 80 then restart
    # 5 minute monit cycle, if shorter cycle is used Resin/Java doesn't have
    # enough time to fully start up and precompile all the jsps
    # and pre-hog all the memory and start responding to requests
    # This is the fault of the Java "environment" not the Java language
    # nor any of the innocent people associated with Java
    # nor any of the hundreds of toolkit layers, jars and XML files involved
    if 2 restarts within 3 cycles then timeout
    if cpu > 45% for 1 cycles then alert
    if totalmem > 89% for 1 cycles then alert
    if loadavg(5min) greater than 0.9 for 2 cycles then alert
    alert myemail
    alert myotheremail
    alert myphone
    alert myotherphone
    depends on rootfs
    group thismachine

nirmala nirmala wrote:
Hi jason,
Thanks a lot for ur reply . From ur reply i could be able to move on further. As per ur suggestion, i created pid file and used that java process in monit. But after that when i checked monit status it is coming execution failed for this java process. If possible, anyone pls let me know some examples on java processes which are used in monit. Else give me suggestion where can get all these details. Regards,

reply via email to

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