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