系统相关
首页 > 系统相关> > CentOS查看多核负载

CentOS查看多核负载

作者:互联网

1、使用top命令之后,按下数字1,则显示多个CPU 的信息,和内存信息

[root@testpc ~]# top
top - 15:38:40 up 2 days,  2:05,  2 users,  load average: 0.00, 0.00, 0.00
Tasks: 138 total,   1 running, 137 sleeping,   0 stopped,   0 zombie
Cpu0  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  3725.047M total,  263.312M used, 3461.734M free,   45.711M buffers
Swap: 8095.992M total,    0.000k used, 8095.992M free,   55.977M cached
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                        
    1 root      20   0 19228 1512 1224 S  0.0  0.0   0:00.61 init                                                                            
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd  

2、查看多核信息

[root@CENTOS ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
     16  Intel(R) X CPU @ 1.90GHz
[root@localhost ~]# cat /proc/cpuinfo | grep physical | uniq -c
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 46 bits physical, 48 bits virtual
[root@CENTOS liu]# cat /proc/cpuinfo |grep "processor"|wc -l
16
[root@localhost ~]# cat /proc/cpuinfo |grep "physical id"
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
[root@localhost ~]# cat /proc/cpuinfo |grep "processor"
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
processor : 8
processor : 9
processor : 10
processor : 11
[root@localhost ~]# cat /proc/cpuinfo |grep "cores"
cpu cores : 6
cpu cores : 6
cpu cores : 6
cpu cores : 6
cpu cores : 6
cpu cores : 6
cpu cores : 6
cpu cores : 6
cpu cores : 6
cpu cores : 6
cpu cores : 6
cpu cores : 6
[root@localhost ~]# cat /proc/stat
cpu 27115520 242 4622815 4662722506 12504018 246 96658 0 0
cpu0 4126112 0 855568 375445053 10489170 76 32126 0 0
cpu1 2370590 0 291429 389439543 27264 53 6368 0 0
cpu2 1744553 0 225295 390309511 16425 12 3430 0 0
cpu3 1451736 0 256399 390612263 9784 1 3077 0 0
cpu4 911835 0 257589 391264891 7095 0 2000 0 0
cpu5 706379 0 249467 391522706 5312 0 1582 0 0
cpu6 11307712 0 976287 378460372 1915138 0 14559 0 0
cpu7 1069543 0 354557 390922711 9657 0 8219 0 0
cpu8 827844 0 269726 391350780 5797 5 7072 0 0
cpu9 1043103 242 351579 390805163 7193 21 8010 0 0
cpu10 884193 0 298011 391092737 6363 30 6141 0 0
cpu11 671915 0 236902 391496772 4814 45 4067 0 0
intr 3434565703 127 0 0 1 1 0 0 0 1 116 247 0 0 0 0 0 0 0

 

标签:负载,CentOS,processor,多核,cores,physical,bits,id,0.0%
来源: https://www.cnblogs.com/ggzhangxiaochao/p/13597129.html