summing proc interrupts (testing irqbalance)

We can sum the interrupts by CPU to see how the balance is or if IRQBALANCE_BANNED_CPUS is working

# awk '{if(NR>1){for (i=2; i<=9; i++){ a[i]+=$i;}}} END {for (i in a){ j=i-2; printf "CPU"j" "; print a[i];}}' /proc/interrupts 
CPU0 173547874
CPU1 17912
CPU2 17845
CPU3 17081
CPU4 17110
CPU5 21396188
CPU6 27354442
CPU7 17073

Leave a Reply

Your email address will not be published. Required fields are marked *