#! /usr/bin/bash irqnum=$(cat /proc/interrupts | grep $1 | tr ":" "\n" | head -1 | tr -d ' ' ) cores=$(grep -c 'cpu[0-9]' /proc/stat) coresm1=cores-1 declare -i NewMask=2**coresm1 echo Cores: $cores echo Actual CPU Mask: $(cat /proc/irq/$irqnum/smp_affinity) echo Desired CPU Mask: $NewMask echo Kernel command line: $(cat /proc/cmdline)