CentOS上のJavaで動くシステムの各種情報をダンプする時に使うコマンドの健忘録。
#標準出力にスレッドダンプを出す
kill -3 {pid}
#起動引数などを含めてJavaプロセスID表示
/usr/java/default/bin/jps -vlm
#ヒープ概要表示
/usr/java/default/bin/jmap -heap {java pid}
#ヒープダンプをファイルに取得(visualvmなどで確認可)
/usr/java/default/bin/jmap -dump:format=b,file=heap.dump {java pid}
#GC統計表示
/usr/java/default/bin/jstat -gc -t {java pid}