LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Java monitoring (https://www.linuxquestions.org/questions/programming-9/java-monitoring-726096/)

manolakis 05-14-2009 07:56 PM

Java monitoring
 
Hi there,

I have a Java program which I want to monitor its runtime, and memory allocation. Can anybody suggest any tool for doing that? I tried to use jconsole, but I do not know how to find what is the process id of this program. Furthermore, the application is quiet small, and I have not placed it in jar file.

Thank you.

jlliagre 05-14-2009 08:44 PM

Jconsole doesn't require the application to be in a jar file.

Even while you are unable to locate your application PID, jconsole still allows you to select from the application main class name.

manolakis 05-15-2009 10:36 AM

Dear jlliagre,

I would like to get the chance to ask you something. The case is that my application is quiet fast so when I start the application I can not really find the time to start the jconsole before the application terminates. I therefore put in the main method Thread.sleep(10000) in order to find the time to load jconsole. As I noticed, when the application terminates jconsole terminates as well. Do you know how it is possible to keep jconsole running after the end of application (in order to look at the statistics)? Furthermore, is anyway that I can first start jconsole without having started my application? Do you or anybody knows any other monitoring tool quiet similar to jconsole that work can work like that?

Thank you.


All times are GMT -5. The time now is 12:27 PM.