了解Linux最高CPU利用率输出
我正在使用在Debian下运行的单核小型ARM处理器,并且在理解top的CPU利用率输出时遇到问题,请参阅:
top - 15:31:54 up 30 days,23:00,2 users,load average: 0.90,0.89,0.87 Tasks: 44 total,1 running,43 sleeping,0 stopped,0 zombie Cpu(s): 65.0%us,20.3%sy,0.0%ni,14.5%id,0.0%wa,0.0%hi,0.3%si,0.0%st Mem: 61540k total,40056k used,21484k free,0k buffers Swap: 0k total,0k used,0k free,22260k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 26028 root 20 0 2536 1124 912 R 1.9 1.8 0:00.30 top 31231 root 19 -1 45260 964 556 S 1.9 1.6 1206:15 owserver 3 root 15 -5 0 0 0 S 0.3 0.0 0:08.68 ksoftirqd/0 694 root 20 0 28640 840 412 S 0.3 1.4 468:26.74 rsyslogd 列%CPU在所有进程中都非常低,在此示例中它们总共为4,4%(以下所有其他进程均为0%) 更新:同时我找到了这个线程here,它讨论了一个类似的问题,但是我无法验证那里写的是什么: >命令正常运行时间显示每1/5/15分钟的平均CPU利用率 谢谢 解决方法
您应该阅读top的联机帮助页以更精确地了解其输出.从联机帮助页:
任务在上次屏幕更新后经过的CPU时间的份额,表示为总CPU时间的百分比.默认屏幕更新时间为3秒,可以使用#top -d ss.tt进行更改.要测量通信CPU使用率,请运行top -S.
从最后记住的’S’状态开始逆转.当“累积模式”为“开”时,每个进程都会列出它和它的死孩子使用的CPU时间. CPU状态显示在摘要区域中.它们始终显示为百分比,表示从现在到最后一次刷新之间的时间. us -- User CPU time The time the CPU has spent running users' processes that are not niced. sy -- System CPU time The time the CPU has spent running the kernel and its processes. ni -- Nice CPU time The time the CPU has spent running users' proccess that have been niced. wa -- iowait Amount of time the CPU has been waiting for I/O to complete. hi -- Hardware IRQ The amount of time the CPU has been servicing hardware interrupts. si -- Software Interrupts The amount of time the CPU has been servicing software interrupts. st -- Steal Time The amount of CPU 'stolen' from this virtual machine by the hypervisor for other tasks (such as running another virtual machine). 在正常情况下,%us%sy应始终更高. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |