Reputation: 1216
I've an application running without any flags setting its max heap size i.e. I'm using the VM defaults. I'd like to know what they are and I'm wondering if theres any jsomething command that would return to me my stats for max heap size. I've already tried profiling and jstat, but these tools only show me how much I'm currently using. I'd like to know what's my current MAX heap size.
Upvotes: 3
Views: 1121
Reputation: 2311
# To get the pid of the java process you want to check
jps
# Gives you all the info on the process. Look for -XX:MaxHeapSize=
jinfo <pid>
Upvotes: 1
Reputation: 1216
I've managed to solve it using jconsole:
jconsole hostname:port (usually 1099)
jmx has to be active to use it.
Go to VMSummary section and look for Maximum heap size.
Upvotes: 1