jstat命令能够查看堆内存各部分的使用量,以及加载类的数量。java
jstat -options查看可用参数以下mysql
[root@localhost servers]# jstat -options option -class -compiler -gc -gccapacity -gccause -gcmetacapacity -gcnew -gcnewcapacity -gcold -gcoldcapacity -gcutil -printcompilation
jstat -class 用于查看类加载信息sql
Loaded Bytes Unloaded Bytes Time 12408 22663.9 0 0.0 11.13 12408 22663.9 0 0.0 11.13 12408 22663.9 0 0.0 11.13 12408 22663.9 0 0.0 11.13
jstat -compiler 用于编绎统计code
Compiled Failed Invalid Time FailedType FailedMethod 14276 2 0 54.43 1 com/mysql/jdbc/AbandonedConnectionCleanupThread run
jstat -gc 查看gc信息server
jstat -gc 16002 S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT GCT 512.0 512.0 0.0 320.0 173568.0 82801.1 349696.0 92495.3 72192.0 69136.8 8704.0 8192.9 687 8.424 3 0.408 8.832