bash: jstat: command not found

Kumar Saras picture Kumar Saras · May 29, 2015 · Viewed 16.5k times · Source

I want to use the gc utility to analyse the garbage collection for my Cassandra database. But when I am running jstat command the output comes that bash:jstat: command not found. I searched and found that jstat is located in $JAVA_HOME/bin but I am not able to understand where is $JAVA_HOME/bin. I want to know how to start using jstat?

Answer

Shriram picture Shriram · May 29, 2015

jstat is a tool which is available in jdk (development environment). If your application is using jre then only the tools under jre/bin will be available in your execution environment. Make sure to use jdk as your execution environment to use jstat tool.