在Linux上%system%和%si cpu时间

在顶部和iostat输出似乎有一些系统和softirq项目的问题。

1-你认为这只是由以太网中断造成的?

2-我在该服务器上运行60 Mbpsstream量的netfilter。 我如何看到netfilter和其他内核模块使用了多less%的系统?

3-时间,系统挂起与OOM条件。 但是在那个时候系统根据sar输出有很多的空闲内存。 更高的%system和%idle会导致被内核到达内存阻塞?

avg-cpu: %user %nice %system %iowait %steal %idle 34.17 0.00 50.25 0.00 0.00 15.58 Cpu0 : 37.5%us, 18.8%sy, 0.0%ni, 6.2%id, 0.0%wa, 0.0%hi, 37.5%si, 0.0%st Cpu1 : 33.3%us, 44.4%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 22.2%si, 0.0%st cat /proc/interrupts Thu Jul 28 11:55:11 2011 CPU0 CPU1 0: 136049409 43332 IO-APIC-edge timer 1: 1 1 IO-APIC-edge i8042 4: 5 7 IO-APIC-edge serial 7: 0 0 IO-APIC-edge parport0 8: 2 1 IO-APIC-edge rtc 9: 0 0 IO-APIC-level acpi 12: 2 2 IO-APIC-edge i8042 50: 0 0 IO-APIC-level uhci_hcd:usb4 58: 0 0 IO-APIC-level uhci_hcd:usb7 66: 80860 4360213 PCI-MSI ahci 74: 1698104 274488209 IO-APIC-level eth1 98: 157341956 3131716 PCI-MSI eth4 106: 92 95 IO-APIC-level HDA Intel 169: 0 0 IO-APIC-level uhci_hcd:usb3 225: 0 0 IO-APIC-level ehci_hcd:usb1, uhci_hcd:usb5, uhci_hcd:usb 

1-当你说“以太网中断”时,你是什么意思?

2-几乎确切的方式:

 $ echo "$(cat /proc/`pidof iptables`/stat | awk '{ print $15 }') * 100 / $(cat /proc/stat | awk '/cpu / { print $4 }')" | bc -l 

看看man proc的更多细节。

3-找出哪个进程正在吃你的RAM:

 $ ps -eo pmem,pid,comm | sort -k1rn | head 

atophtop ,…