技术解析
我跑了一个很费资源的程序,开始用top看的时候cpu利用率达到9x%,随后用htop看了以下,每核cpu的利用率倒是没超过50%,我该相信谁?
1 [|||||| 6.8%] Tasks: 33, 19 thr; 2 running
2 [|||||||||| 13.0%] Load average: 1.01 0.66 0.28
3 [|||||||||||||||||||||||||||| 36.4%] Uptime: 00:04:34
4 [||||||||||||||| 20.1%]
5 [||||||||||||||||||| 24.8%]
6 [|||||||||||||||||| 23.8%]
7 [|||||||||||||| 17.7%]
8 [|||||| 8.2%]
Mem[|||||| 432/7870MB]
Swp[ 0/0MB]
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
1715 root 20 0 995M 99M 2676 S 93.0 1.3 4:05.50 /usr/local/unba/bin/probe
1811 root 20 0 995M 99M 2676 S 33.0 1.3 1:16.48 /usr/local/unba/bin/probe
1813 root 20 0 995M 99M 2676 S 29.0 1.3 0:59.18 /usr/local/unba/bin/probe
1809 root 20 0 995M 99M 2676 S 13.0 1.3 0:46.68 /usr/local/unba/bin/probe
1805 root 20 0 995M 99M 2676 S 13.0 1.3 0:45.78 /usr/local/unba/bin/probe
1899 chenrui 20 0 156M 5044 1308 S 2.0 0.1 0:00.72 mosh-server new -s -c 0
1560 root 20 0 249M 3776 1092 S 2.0 0.0 0:06.95 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
1807 root 20 0 995M 99M 2676 S 2.0 1.3 0:05.11 /usr/local/unba/bin/probe
...