correct interrupt distribution on acq
[debian6500.git] / master / opt / cluster / acq / etc / rc.local
CommitLineData
5316baff
LM
1#!/bin/bash -e
2#
3# rc.local
4#
5# This script is executed at the end of each multiuser runlevel.
6# Make sure that the script will "exit 0" on success or any other
7# value on error.
8#
9# In order to enable or disable this script just change the execution
10# bits.
11#
12# By default this script does nothing.
13
14# distribute interrupt for eth0 on core 1-5
20643014 15core=(2 4 8 10 20)
5316baff
LM
16l=0
17for i in $(awk '/eth0/ {sub(/:/, ""); print $1}' /proc/interrupts); do
18 echo ${core[$l]} > /proc/irq/$i/smp_affinity
19 let l++
20643014 20 [ $l -eq 6 ] && l=1
5316baff
LM
21done
22
23exit 0