阅读更多
linux top命令查看内存及多核CPU的使用讲述
http://blog.csdn.net/linghao00/article/details/8059244
$netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
ESTABLISHED 984
CLOSING 1
LAST_ACK 1
$sudo ./jstat -gcutil 144488 1000
S0 S1 E O P YGC YGCT FGC FGCT GCT
0.00 2.12 23.57 2.34 84.87 67 0.654 0 0.000 0.654
0.00 2.12 26.81 2.34 84.87 67 0.654 0 0.000 0.654
0.00 2.12 27.46 2.34 84.87 67 0.654 0 0.000 0.654
0.00 2.12 32.37 2.34 84.87 67 0.654 0 0.000 0.654
0.00 2.12 34.45 2.34 84.87 67 0.654 0 0.000 0.654
0.00 2.12 37.53 2.34 84.87 67 0.654 0 0.000 0.654
$ps -eL -o pid,%cpu,lwp|grep -i 144488 | sort -nr -k 2 | awk '{printf("%s %s %x\n",$1,$2,$3)}'|head -19
144488 0.0 d137
144488 0.0 ae3f
144488 0.0 ae3e
144488 0.0 ac37
144488 0.0 9a65
144488 0.0 3cd8f
144488 0.0 34ed4
144488 0.0 23eea
144488 0.0 23ee9
144488 0.0 23edb
144488 0.0 23eda
144488 0.0 23ed9
144488 0.0 23ed7
144488 0.0 23ed6
144488 0.0 23ed5
144488 0.0 23ed4
144488 0.0 23ed3
144488 0.0 23ed2
144488 0.0 23ed1