linux下查看插斷要求記錄。通過cpu的插斷要求的響應,可以看出cpu都在為哪些裝置幹活,乾的活有多少量等資訊。
- [~]$ cat /proc/interrupts
- CPU0 CPU1 CPU2 CPU3
- 0: 1383283707 0 0 0 IO-APIC-edge timer
- 1: 3 0 0 0 IO-APIC-edge i8042
- 3: 11 0 0 0 IO-APIC-edge serial
- 8: 1 0 0 0 IO-APIC-edge rtc
- 9: 0 0 0 0 IO-APIC-level acpi
- 12: 4 0 0 0 IO-APIC-edge i8042
- 14: 25 0 0 0 IO-APIC-edge ide0
- 82: 85 0 0 0 IO-APIC-level uhci_hcd:usb5
- 90: 96 0 0 0 IO-APIC-level uhci_hcd:usb6
- 114: 1067499 0 0 0 PCI-MSI-X cciss0
- 130: 96508322 0 0 0 PCI-MSI eth0
- 138: 384295 0 0 0 PCI-MSI eth1
- 169: 0 0 0 0 IO-APIC-level ehci_hcd:usb1, uhci_hcd:usb2
- 177: 0 0 0 0 IO-APIC-level uhci_hcd:usb3
- 185: 0 0 0 0 IO-APIC-level uhci_hcd:usb4
- NMI: 11370 6399 6845 6300
- LOC: 1383174675 1383278112 1383174810 1383277705
- ERR: 0
- MIS: 0
[~]$ cat /proc/interrupts<br /> CPU0 CPU1 CPU2 CPU3<br /> 0: 1383283707 0 0 0 IO-APIC-edge timer<br /> 1: 3 0 0 0 IO-APIC-edge i8042<br /> 3: 11 0 0 0 IO-APIC-edge serial<br /> 8: 1 0 0 0 IO-APIC-edge rtc<br /> 9: 0 0 0 0 IO-APIC-level acpi<br /> 12: 4 0 0 0 IO-APIC-edge i8042<br /> 14: 25 0 0 0 IO-APIC-edge ide0<br /> 82: 85 0 0 0 IO-APIC-level uhci_hcd:usb5<br /> 90: 96 0 0 0 IO-APIC-level uhci_hcd:usb6<br />114: 1067499 0 0 0 PCI-MSI-X cciss0<br />130: 96508322 0 0 0 PCI-MSI eth0<br />138: 384295 0 0 0 PCI-MSI eth1<br />169: 0 0 0 0 IO-APIC-level ehci_hcd:usb1, uhci_hcd:usb2<br />177: 0 0 0 0 IO-APIC-level uhci_hcd:usb3<br />185: 0 0 0 0 IO-APIC-level uhci_hcd:usb4<br />NMI: 11370 6399 6845 6300<br />LOC: 1383174675 1383278112 1383174810 1383277705<br />ERR: 0<br />MIS: 0
---------------------------------------------------------------------------------------------------------
注釋:
1. 對部分IRQ標識的解釋
Interrupt as in /proc/interrupts Name as it appears in ftrace logNMI: Non-maskable interrupts : NMI_VECTORLOC: Local timer interrupts : LOCAL_TIMER_VECTORSPU: Spurious interrupts : SPURIOUS_APIC_VECTORPMI: Performance monitoring interrupts : <not added>PND: Performance pending work : LOCAL_PENDING_VECTORRES: Rescheduling interrupts : RESCHEDULE_VECTORCAL: Function call interrupts : CALL_FUNCTION_VECTOR or CALL_FUNCTION_SINGLE_VECTORTLB: TLB shootdowns : INVALIDATE_TLB_VECTOR_START to INVALIDATE_TLB_VECTOR_ENDTRM: Thermal event interrupts : THERMAL_APIC_VECTORTHR: Threshold APIC interrupts : THRESHOLD_APIC_VECTORMCE: Machine check exceptions : <not added>MCP: Machine check polls : <not added>ERR: : ERROR_APIC_VECTORMIS: : <not added>PLT: Platform interrupts : X86_PLATFORM_IPI_VECTOR
2. IO-APIC-edge timer
此處的timer為系統定時器.