CMD Tool to find Java Heap Size and Memory Used (Linux)? jstat -gccapacity [insert-pid-here]

I am looking for something like:
Max Memory: 1GB 
Min Memory: 256 MB 
Heap Memory: 700 MB 
Used Memory: 460 MB

Each Java process has a pid, which you first need to find with the jps command.
Once you have the pid, you can use jstat -gc [insert-pid-here] to find statistics of the behavior of the garbage collected heap.
  • jstat -gccapacity [insert-pid-here] will present information about memory pool generation and space capabilities.
  • jstat -gcutil [insert-pid-here] will present the utilization of each generation as a percentage of its capacity. Useful to get an at a glance view of usage.

Comments

Popular posts from this blog

HAproxy logging

tomcat catalina coyote jasper cluster

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all