Is it possible to check the %CPU,%MEM usage of each thread produced by a JVM by using a perl script??? If yes then is there any particular module

I'd probably use some of the more esoteric of the $JAVA_OPTS availalbe at Sun's site to get more detailed logging, and then parse the logfile for the info you need.

For instance:

you can use the jmap feature and get a heap histogram:

jmap -histo <PID>

or you can get heap metrics:

jmap -heap <PID>

Also check out the fields you can get from the Heap Profiler:

java -agentlib:hprof


Most of that output can be regexed out.


Any of that can be run via system() and then just parse through for what you're looking for. There are other utilities out there, I'm sure, but this is how I would do it.


(I do Apache+Tomcat+Java for The Weather Channel)

--jms

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to