Skip to content

Instantly share code, notes, and snippets.

@lmmendes
Created February 6, 2018 12:42
Show Gist options
  • Save lmmendes/5843053f4153d7017c0c957f3a8e89c4 to your computer and use it in GitHub Desktop.
Save lmmendes/5843053f4153d7017c0c957f3a8e89c4 to your computer and use it in GitHub Desktop.
JVM Stats

vmstat <ms>

Shows virtual memory stats every ms millis.

jps -lvm

Shows the java processes running, their PID, and command line arguments.

jcmd <pid> help

Allows to list the possible commands to send to the JVM. For example: jcm <pid> VM.version

jstack <pi>

Lists all the running threads of the JVM and their stack trace (meaning, where they are at the moment).

jstat <option> -t -h20 <pid> 1s

Shows stats every 1s. Example options: compiler, printcompilation, class, gcutil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment