Java CPU utilization on a per-thread basis

Y

Yaroslav Klyukin

Hello everybody.

Does anyone know how to get per-thread CPU utilization of a running java
process without any modifications to it and in command-line?
visualvm does it, but it's a GUI.
I am looking for a command-line tool which I can run from a script.
Something like "top" under linux, but which would show every java thread.
Any hints or leads will be appreciated.

Thank you.
 
M

Mark Space

Yaroslav said:
Hello everybody.

Does anyone know how to get per-thread CPU utilization of a running java
process without any modifications to it and in command-line?
visualvm does it, but it's a GUI.
I am looking for a command-line tool which I can run from a script.
Something like "top" under linux, but which would show every java thread.
Any hints or leads will be appreciated.

Thank you.


There are some command line tools here, although I'm not sure any do
exactly what you're asking.

<http://java.sun.com/j2se/1.5.0/docs/tooldocs/#manage>

The Jconsole one does appear to have a plug-in for thread monitoring,
although it seems to be GUI based also. Still maybe there's a hint in
there for you.

<http://weblogs.java.net/blog/emcmanus/archive/2007/06/top_threads_plu.html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top