通过jstat命令查看堆内存使用情况
使用class加载统计
[root@localhost ~]# jps
7607 Bootstrap
7659 Jps
[root@localhost ~]# jstat -class 7607
Loaded Bytes Unloaded Bytes Time
3609 7683.8 0 0.0 1.80
参数说明
- Loaded:加载class的数量
- Bytes:所占用空间大小
- Unloaded:未加载数量
- Bytes:未加载占用空间
- Time:时间
查看编译统计
[root@localhost ~]# jstat -compiler 7607
Compiled Failed Invalid Time FailedType FailedMethod
2526 1 0 5.64 1 org/apache/tomcat/util/IntrospectionUtils setProperty
参数说明
- Compiled:编译数量。
- Failed:失败数量
- Invalid:不可用数量
- Time:时间
- FailedType:失败类型
- FailedMethod:失败的方法