sysstat/sysstat — pull request #7 by troosh (2013-10-08 16:19:54+00:00)
Title: Support is not monotonically increasing numbers of CPUs

Please consider my patches to support machines where some CPUs [always] are offline

For example files from my machine:

$ ls /sys/devices/system/cpu
cpu0 cpu12 cpu4 cpu8 cpufreq kernel_max online possible
cpu1 cpu13 cpu5 cpu9 cpuidle offline perf_events present

$ cat /proc/stat
cpu 69718203 0 1882385 218038998 1804702 36288 25309 0 0 0
cpu0 8808366 0 269723 27183642 476367 26869 16761 0 0 0
cpu1 8465166 0 231103 27646034 187699 9417 1313 0 0 0
cpu4 21178358 0 275400 14437817 464907 2 1671 0 0 0
cpu5 8355071 0 212673 27777091 60701 0 800 0 0 0
cpu8 6293057 0 177782 29638971 236829 0 1200 0 0 0
cpu9 6905099 0 292900 29028898 125737 0 1205 0 0 0
cpu12 5984536 0 108855 30066976 197015 0 1286 0 0 0
cpu13 3728550 0 313949 32259569 55447 0 1073 0 0 0
intr 446557057 29 0 0 4606 0 0 0 0 0 0 30147893 13 0 0 0 0 353 4 0 0 378 398669 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 190978396
btime 1380885280
processes 201927
procs_running 5
procs_blocked 0
softirq 188260506 0 111419515 8555828 5877055 398650 0 2062 33460549 5225 28541622

$ cat /proc/interrupts
CPU0 CPU1 CPU4 CPU5 CPU8 CPU9 CPU12 CPU13
0: 29 0 0 0 0 0 0 0 IO-APIC-edge timer
3: 4606 0 0 0 0 0 0 0 IO-APIC-fasteoi serial
10: 30148328 0 0 0 0 0 0 0 IO-APIC-fasteoi eth0
11: 13 0 0 0 0 0 0 0 IO-APIC-fasteoi ide0, ide1
16: 353 0 0 0 0 0 0 0 IO-APIC-fasteoi ohci_hcd:usb5
17: 4 0 0 0 0 0 0 0 IO-APIC-fasteoi ehci_hcd:usb2
19: 0 0 0 0 0 0 0 0 IO-APIC-fasteoi ohci_hcd:usb4
20: 378 0 0 0 0 0 0 0 IO-APIC-fasteoi ehci_hcd:usb1, ohci_hcd:usb3
21: 398697 0 0 0 0 0 0 0 IO-APIC-fasteoi ahci
p256: 0 0 0 0 0 0 0 0 Non-maskable interrupts
v239: 19973097 17293597 26884711 13961648 10903331 9369913 8563289 6084563 Local timer interrupts
v255: 0 0 0 0 0 0 0 0 Spurious interrupts
v253: 1513156 1498256 13183 1053385 23192 47460 53796 37385 Rescheduling interrupts
v252: 25539996 29920885 40942947 39288150 40760839 40644875 40827453 40821395 Function call interrupts
v249: 0 0 0 0 0 0 0 0 RDMA interrupts
ERR: 0
MIS: 0