一、 top - 进程活动 top提供一个当前运行系统实时动态的视图,也就是正在运行进程。 在默认情况下,显示系统中CPU使用率最高的任务,并每5秒钟刷新一次。 图01.Linux top命令
常用热键 热键 用途 t 显示摘要信息开关. m 显示内存信息开关. A 分类显示系统不同资源的使用大户。有助于快速识别系统中资源消耗多的任务。 f 添加删除所要显示栏位. o 调整所要显示栏位的顺序. r 调整一个正在运行的进程Nice值. k 结束一个正在运行的进程. z 彩色/黑白显示开关 相关链接:How do I Find Out Linux CPU Utilization?
Understanding mpstat output The report generated by the mpstat command has the following format: CPU: Processor number. The keyword all indicates that statistics are calculated as averages among all processors. %user: Show the percentage of CPU utilization that occurred while executing at the user level (application). %nice: Show the percentage of CPU utilization that occurred while executing at the user level with nice priority. %system: Show the percentage of CPU utilization that occurred while executing at the system level (kernel). Note that this does not include the time spent servicing interrupts or softirqs. %iowait: Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request. %irq: Show the percentage of time spent by the CPU or CPUs to service interrupts. %soft: Show the percentage of time spent by the CPU or CPUs to service softirqs. A softirq (software interrupt) is one of up to 32 enumerated software interrupts which can run on multiple CPUs at once. %idle: Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request. intr/s: Show the total number of interrupts received per second by the CPU or CPUs.
输出样例: Linux 2.6.18-128.1.14.el5 (www03.nixcraft.in) 06/26/2009