Skip to content

Instantly share code, notes, and snippets.

@jschaub30
Created June 15, 2015 16:05
Show Gist options
  • Save jschaub30/9f9d9f54d3ee6f53d2b3 to your computer and use it in GitHub Desktop.
Save jschaub30/9f9d9f54d3ee6f53d2b3 to your computer and use it in GitHub Desktop.
Bash script to read network interrupts in Ubuntu linux
#!/bin/bash
[[ $# -lt 1 ]] && echo Usage: $0 INTERFACE && exit 1
IFACE=$1
cat /proc/interrupts | grep "$IFACE-" | cut -d':' -f1 > tmp.interfaces
echo Reading affinity of $IFACE
for IRQ in $(cat tmp.interfaces)
do
LIST=$(sudo cat /proc/irq/$IRQ/smp_affinity_list)
echo Interrupt $IRQ assigned to $LIST
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment