在centos中给定结果的cpu高的原因是什么

时间:2014-12-10 12:24:05

标签: cpu-usage

我正在使用centos。 当我运行命令free -m然后它显示在下面:

             total       used       free     shared    buffers     cached
Mem:          2048        373       1674         10          0        147
-/+ buffers/cache:        225       1822
Swap:            0          0          0

我已运行命令“Top”并获得以下结果:

top - 07:08:01 up 16:09,  3 users,  load average: 0.00, 0.00, 0.00
Tasks:  39 total,   1 running,  38 sleeping,   0 stopped,   0 zombie
Cpu(s):  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:   2097152k total,   381024k used,  1716128k free,        0k buffers
Swap:        0k total,        0k used,        0k free,   150200k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                           
    1 root      20   0 19236 1452 1212 S  0.0  0.1   0:00.02 init                                                                                                                              
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd/23354                                                                                                                    
    3 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper/23354                                                                                                                     
  147 root      16  -4 10644  668  400 S  0.0  0.0   0:00.00 udevd                                                                                                                             
  453 root      20   0  179m 1512 1056 S  0.0  0.1   0:00.27 rsyslogd                                                                                                                          
  489 root      20   0 66692 1296  536 S  0.0  0.1   0:00.03 sshd                                                                                                                              
  497 root      20   0 22192  972  716 S  0.0  0.0   0:00.00 xinetd                                                                                                                            
  658 root      20   0 66876 1028  312 S  0.0  0.0   0:00.00 saslauthd                                                                                                                         
  659 root      20   0 66876  764   48 S  0.0  0.0   0:00.00 saslauthd                                                                                                                         
  731 root      20   0  114m 1260  620 S  0.0  0.1   0:00.24 crond                                                                                                                             
  835 ossecm    20   0 10512  492  312 S  0.0  0.0   0:00.32 ossec-maild                                                                                                                       
  839 root      20   0 13088  960  712 S  0.0  0.0   0:00.00 ossec-execd                                                                                                                       
  843 ossec     20   0 12780 2380  620 S  0.0  0.1   0:10.15 ossec-analysisd                                                                                                                   
  847 root      20   0  4200  444  304 S  0.0  0.0   0:00.84 ossec-logcollec                                                                                                                   
  858 root      20   0  5004 1484  468 S  0.0  0.1   0:07.06 ossec-syscheckd                                                                                                                   
  862 ossec     20   0  6388  624  372 S  0.0  0.0   0:00.03 ossec-monitord                                                                                                                    
  870 root      20   0 92420  21m 1620 S  0.0  1.0   0:01.21 miniserv.pl                                                                                                                       
 4363 root      20   0 96336 4448 3464 S  0.0  0.2   0:00.10 sshd                                                                                                                              
 4365 root      20   0  105m 2024 1532 S  0.0  0.1   0:00.03 bash                                                                                                                              
 4615 root      20   0 96776 4936 3460 S  0.0  0.2   0:00.61 sshd                                                                                                                              
 4617 root      20   0  105m 2052 1548 S  0.0  0.1   0:00.20 bash                                                                                                                              
 4674 root      20   0 96336 4452 3460 S  0.0  0.2   0:00.22 sshd                                                                                                                              
 4676 root      20   0  105m 2012 1532 S  0.0  0.1   0:00.06 bash                                                                                                                              
 7494 root      20   0 96336 4404 3428 S  0.0  0.2   0:00.03 sshd                                                                                                                              
 7496 root      20   0 57712 2704 2028 S  0.0  0.1   0:00.01 sftp-server                                                                                                                       
 7719 root      20   0 83116 2700  836 S  0.0  0.1   0:00.10 sendmail                                                                                                                          
 7728 smmsp     20   0 78692 2128  636 S  0.0  0.1   0:00.00 sendmail                                                                                                                          
 7742 root      20   0  402m  14m 7772 S  0.0  0.7   0:00.13 httpd                                                                                                                             
 7744 asterisk  20   0  502m  22m  10m S  0.0  1.1   0:00.11 httpd                                                                                                                             
 7938 root      20   0  105m  756  520 S  0.0  0.0   0:00.00 safe_asterisk                                                                                                                     
 7940 asterisk  20   0 3157m  26m 8508 S  0.0  1.3   0:07.14 asterisk                                                                                                                          
 8066 root      20   0  105m 1568 1304 S  0.0  0.1   0:00.01 mysqld_safe                                                                                                                       
 8168 mysql     20   0  499m  21m 6472 S  0.0  1.1   0:01.44 mysqld                                                                                                                            
 8607 asterisk  20   0  402m 8288 1404 S  0.0  0.4   0:00.00 httpd                                                                                                                             
 8608 asterisk  20   0  402m 8288 1404 S  0.0  0.4   0:00.00 httpd                                                                                                                             
 8611 asterisk  20   0  402m 8284 1400 S  0.0  0.4   0:00.00 httpd                                                                                                                             
 8615 asterisk  20   0  402m 8296 1412 S  0.0  0.4   0:00.00 httpd   

即使我试图通过禁用服务星号,httpd,sendmail,mysqld仍然显示100%的CPU使用率。

有谁知道我怎样才能检查出这么多CPU使用的实际内容是什么?

1 个答案:

答案 0 :(得分:1)

顶部的CPU使用率表示:

Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

您的CPU 100%空闲。这是解释:

us: user cpu time (or) % CPU time spent in user space

sy: system cpu time (or) % CPU time spent in kernel space

ni: user nice cpu time (or) % CPU time spent on low priority processes

id: idle cpu time (or) % CPU time spent idle

wa: io wait cpu time (or) % CPU time spent in wait (on disk)

hi: hardware irq (or) % CPU time spent servicing/handling hardware interrupts

si: software irq (or) % CPU time spent servicing/handling software interrupts

st: steal time - - % CPU time in involuntary wait by virtual cpu while hypervisor is servicing another processor (or) % CPU time stolen from a virtual machine