cosa-memory.sh
#!/bin/sh
#author: ken tsai
#date: 2013/7/11
TOMCAT_PID=$(ps aux | grep /bin/java |grep -v grep | grep 'logging' |awk '{print $2}')
echo "tomcat pid :$TOMCAT_PID"
echo "######################memory monitor##################"
jstat -gcutil -h 10 $TOMCAT_PID 1000
-gcutil Option
| 列名 | 描述 |
|---|---|
| S0 | survivor 0区利用率。 Survivor space 0 utilization as a percentage of the space’s current capacity. |
| S1 | survivor 1区利用率。 Survivor space 1 utilization as a percentage of the space’s current capacity. |
| E | eden区利用率。 Eden space utilization as a percentage of the space’s current capacity. |
| O | 年老代空间利用率。 Old space utilization as a percentage of the space’s current capacity. |
| P | 永生代空间利用率。Permanent space utilization as a percentage of the space’s current capacity. |
| YGC | young gc次数。 Number of young generation GC events. |
| YGCT | young gc耗时。 Young generation garbage collection time. |
| FGC | full gc次数。 Number of full GC events. |
| FGCT | full gc耗时。 Full garbage collection time. |
| GCT | GC总耗时。 Total garbage collection time. |
http://itzoo.info/?p=256

開始研究Linux ??
回覆刪除