linux查看内核数量命令

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yaomingyang/article/details/78953505

top命令+1

先按下top命令:

 

top - 17:00:18 up 776 days, 23:26,  5 users,  load average: 0.19, 0.29, 0.18
Tasks: 409 total,   1 running, 408 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.4%us,  0.7%sy,  0.0%ni, 97.9%id,  0.0%wa,  0.0%hi,  0.0%si,  0.1%st
Mem:  32815228k total, 31816676k used,   998552k free,   164024k buffers
Swap:  8524272k total,  7193976k used,  1330296k free,  5049088k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                          14733 webuser   20   0 16.6g 128m 4900 S 15.6  0.4   2023:24 java                                                                                                                              5263 webuser   20   0 12.7g 1.9g  19m S  1.7  6.0   3:45.43 java      


再按下数字1:

 

 

top - 17:01:04 up 776 days, 23:27,  5 users,  load average: 0.09, 0.25, 0.17
Tasks: 409 total,   1 running, 408 sleeping,   0 stopped,   0 zombie
Cpu0  :  3.0%us,  1.0%sy,  0.0%ni, 95.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.3%st
Cpu1  :  0.3%us,  0.3%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  0.7%us,  0.7%sy,  0.0%ni, 98.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  0.3%us,  0.3%sy,  0.0%ni, 99.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.3%st
Cpu4  :  0.3%us,  0.3%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu5  :  1.7%us,  0.3%sy,  0.0%ni, 98.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu6  :  0.3%us,  0.3%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu7  :  0.3%us,  0.3%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu8  :  0.3%us,  0.0%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu9  :  0.7%us,  0.7%sy,  0.0%ni, 98.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu10 :  0.3%us,  0.7%sy,  0.0%ni, 98.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.3%st
Cpu11 :  1.0%us,  0.3%sy,  0.0%ni, 98.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu12 :  0.3%us,  0.3%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu13 : 31.1%us, 12.6%sy,  0.0%ni, 56.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu14 :  1.7%us,  0.7%sy,  0.0%ni, 97.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu15 :  1.0%us,  0.0%sy,  0.0%ni, 99.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  32815228k total, 32185144k used,   630084k free,   164236k buffers
Swap:  8524272k total,  7193836k used,  1330436k free,  5049256k cached


可以看到服务器端是16核,每个核cpu使用情况

 

阅读更多

扫码向博主提问

随风yy

非学,无以致疑;非问,无以广识
  • 擅长领域:
  • java
  • mongodb
  • play
去开通我的Chat快问
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页