It's not a secret anymore!
The moose likes Performance and the fly likes Console based java profiler needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Console based java profiler needed" Watch "Console based java profiler needed" New topic

Console based java profiler needed

sumit anand kumar
Ranch Hand

Joined: Apr 28, 2010
Posts: 83
Hi All,

I have a application running in AWS EC2. Now i can just login from console to run the app. I don't have X11 support.
I want to monitor the health of the application running there. CPU usage, heap size, memory leakage etc.
Most of the profilers JConsole,JVisualVM are UI based. And its very difficult to use them for the end user side to monitor the application.

Another one i used is HPROF, but the data generated by it is not readable. it is in so much details.

This -agentlib:hprof=heap=sites doesn't give much data, & -agentlib:hprof=heap=all gives too much data.
I am using jhat to parse the output.
But what i really want is simple info about CPU usage, heap size, memory leakage. Identifying any culprit in my apps etc.

I want the tool to monitor the app, then i will fire my testcases for doing the performance runs. The tool should be able to record the VM stats, and i can download it and view it offline.
Kindly suggest any open source tool that does / matches like the one i need.
Rohan Dhapodkar

Joined: Jun 27, 2011
Posts: 23
If you can access your server from any X11 based desktop(Windows/Linux), then you can use JVIsualVM which can connect to remote JVM configured with remote JMX settings. Refer for remote JMX settings.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Have you considered such tools as JamonApi, and Probe (on GoogleCode)? JamonApi in particular can be programmatically extended to suit your needs.
sumit anand kumar
Ranch Hand

Joined: Apr 28, 2010
Posts: 83
@Rohan : Internet connection is sometimes too slow to do that.

@Dittmer : Yes i use JamonApis, but it only tells the time taken to execute some section of code. But i need something that can tell me CPU utilization & Memory consumptions related data.
Also not sure if i can use, as my project don't have the privilege of getting outside access.
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 862
You could try jstat (,5.0/docs/tooldocs/share/jstat.html) or write some code that writes memory, cpu stats to a log file every 30 seconds or so. - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
I agree. Here's the link:
subject: Console based java profiler needed
It's not a secret anymore!