liunx下面查看cpu过高的系统调用

2. 找出消耗资源最高的线程

top -H -p 24138 可以不用第一步,直接执行命令 top -H ,就可以查看到消耗资源最高的线程

top - 09:49:49 up 70 days, 16:41, 2 users, load average: 1.01, 1.04, 1.00
Tasks: 72 total, 1 running, 71 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.6%us, 1.3%sy, 0.0%ni, 97.7%id, 0.1%wa, 0.0%hi, 0.0%si, 0.2%st
Mem: 2067816k total, 1760840k used, 306976k free, 236744k buffers
Swap: 524284k total, 253344k used, 270940k free, 279092k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24167 apache 20 0 1273m 384m 3688 R 99.1 19.0 1169:43 java
24152 apache 20 0 1273m 384m 3688 S 2.0 19.0 0:28.58 java
24188 apache 20 0 1273m 384m 3688 S 2.0 19.0 4:56.69 java
24138 apache 20 0 1273m 384m 3688 S 0.0 19.0 0:00.00 java
3. 查看这个线程所有系统调用

strace -p 24167


转子:
http://www.cnblogs.com/aofo/p/6180093.html

你可能感兴趣的:(JVM)