Monitor java memory usage

A quickie on how to monitor java memory usage for tomcat. Note you need to have the JDK installed

sudo jstat -gcutil `sudo jps -lv | grep tomcat | awk '{print $1}'` 10000

Change the “tomcat” to any other unique identifier to pick a different process.

Thanks to Maximdim for his post on this.

The JStat reference has the low down on what all the codes mean.

This post was posted in , , , by on