Results 1 to 4 of 4
i have been tasked with monitoring the java heap via an automated script. Is there something simple that can run via a shell script or perl script? I am not ...
- 04-16-2009 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 3
Monitoring Java Heap
i have been tasked with monitoring the java heap via an automated script. Is there something simple that can run via a shell script or perl script? I am not worried about a lot of output to parse, I just cant seem to find something to generate the output.
Thanks,
B
- 04-16-2009 #2
Since all Java programs are run in the JVM, and are mostly hidden from the underlying operating system, it would probably be difficult to write a shell script to profile the heap and/or JVM. Instead, I would recommend using one of the profiling tools that are available for most Java IDEs. I use HeapWalker for Netbeans which can break things down by class or instance. You can also use some of the more generic profiling tools that come with the IDE.
- 04-16-2009 #3
Here's a snapshot of the Netbeans memory profiler I just took of some code I'm working on (this isn't HeapWalker). As you can see, it shows you how many bytes and objects are allocated for each class/primitive. And you can't tell from this picture but, the IDE allows you to filter on class name.
EDIT: Sorry about the image quality. It was a png and looked fine on my machine; not sure why the forums converted it to a jpg and compressed it down.
- 04-16-2009 #4Just Joined!
- Join Date
- Apr 2009
- Posts
- 3
yeah, i really need something that I can parse and send to a monitoring system. Is there some kind of commandline jconsole that will just send raw output?


Reply With Quote