116800大写(11680)

1、0 0 104300 16800 95328 72200 0 0 5 26 7 14 4 1 95 00 0 104300 16800 95328 72200 0 0 0 24 1021 64 1 1 98 00 0 104300 16800 95328 72200 0 0 0 0 1009 59 1 1 98 0r表示运行队列的大小,b表示由于IO等待而block的线程数量,in表示中断的数量,cs表示上下文切换的数量,us表示用户CPU时间,sys表示系统CPU时间,wa表示由于IO等待而是CPU处于idle状态的时间,id表示CPU处于idle状态的总时间

2、dstat可以给出每一个设备产生的中断数:# dstat -cip 1----total-cpu-usage---- ----interrupts--- ---procs---usr sys idl wai hiq siq 15 169 185 run blk new6 1 91 2 0 0 12 0 13 0 0 01 0 99 0 0 0 0 0 6 0 0 00 0 100 0 0 0 18 0 2 0 0 00 0 100 0 0 0 0 0 3 0 0 0我们可以看到这里有3个设备号1169和18设备名和设备号的关系我们可以参考文件/proc/interrupts,这里185代表网卡eth# cat /proc/interruptsCPU00: 1277238713 IO-APIC-edge timer6: 5 IO-APIC-edge floppy7: 0 IO-APIC-edge parport08: 1 IO-APIC-edge rtc9: 1 IO-APIC-level acpi14: 6011913 IO-APIC-edge ide015: 15761438 IO-APIC-edge ide1169: 26 IO-APIC-level Intel 82801BA-ICH2185: 16785489 IO-APIC-level eth1193: 0 IO-APIC-level uhci_hcd:usb1mpstat可以显示每个CPU的运行状况,比如系统有4个CPU

3、我们可以看到:# mpstat –P ALL 1Linux 21-20.ELsmp (localhost.localdomain) 05/23/200605:17:31 PM CPU %user %nice %system %idle intr/s05:17:32 PM all 0.00 0.00 19 953 12705:17:32 PM 0 0.00 0.00 0.00 100.00 0.0005:17:32 PM 1 12 0.00 173 815 12705:17:32 PM 2 0.00 0.00 0.00 100.00 0.0005:17:32 PM 3 0.00 0.00 0.00 100.00 0.00总结的说,CPU性能监控包含以下方面:检查系统的运行队列,确保每一个CPU的运行队列不大于确保CPU使用分布满足70/30原则(用户70%,系统30%)

4、如果系统时间过长,可能是因为频繁的调度和改变优先级

5、CPU Bound进程总是会被惩罚(降低优先级)而IO Bound进程总会被奖励(提高优先级)

6、prstat命令要显示系统上当前运行的进程和项目的各种统计信息,请使用带有-J选项的prstat命令:%prstat -J要显示系统上当前运行的进程和任务的各种统计信息,请使用带有-T选项的prstat命令:注–-J和-T选项不能一起使用

本文来自网络,不代表本站立场,转载请注明出处: http://www.fxqlsy.cn/yx/61613.html
返回顶部