Reputation: 675
I have a tool developed using java . This tool runs on a linux host. I only have terminal access to this host.
The data size that this tool processes is huge and i wish to see the heap usage or the total memory being used by this tool when it is running.
Is there any way that i could do this from the terminal.
Also could you please explain how to do the same when a program is running in eclipse.
Upvotes: 1
Views: 530
Reputation: 1381
I agree with @stranger in the q's answer. However, I'd suggest you to take a look at the gc logs if configured which should give you a good idea of how the heap is being filled. Unless you want real time monitoring which you could do with jvisualvm and other j* tools that cone default with Oracle jdk - I would first read up on what they do and their cost, if in case they pause the app to enable the instrumentation needed to provide the information.
As for Eclipse, you can apply the same tools to monitor your local jvm.
Upvotes: 0
Reputation: 3898
Use Oracle jvisualvm to profile your app. Also you can dump heap of running app with jmap utility, also from jdk. Then jvisualvm helps you to view contest of dump
Upvotes: 2