bash: jstat: command not found

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.


To see $JAVA_HOME path, you have to run the following command:

echo $JAVA_HOME

It will print java home directory path.

To run jstat, you have to go to $JAVA_HOME/bin path and run the following command:

./jstat -gc 29563

Note: gc is option (there are more options) and 29563 is java process ID. see oracle document for details.