查看gc的次数

1,查找出程序进程id

# 这里输出tomcat的进程id
echo `ps -ef|grep tomcat|grep -v 'grep'|awk '{print $2'}`

2,查看gc的次数

jstat -gc pid

原文地址:https://www.cnblogs.com/dongma/p/10052811.html