X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=master%2Fopt%2Fcluster%2Facq%2Fetc%2Frc.local;h=5a9a5d94c6f4144ea29322f064b21a63def0e8e1;hb=2c2423eb675976c2451464b695877b6d6e193085;hp=72417e6ae61e805fcc9d5c005f4d61b180b8f172;hpb=004ca315c0fa90defb0fe1ba9d2b16480ffeaca8;p=debian6500.git diff --git a/master/opt/cluster/acq/etc/rc.local b/master/opt/cluster/acq/etc/rc.local index 72417e6..5a9a5d9 100755 --- a/master/opt/cluster/acq/etc/rc.local +++ b/master/opt/cluster/acq/etc/rc.local @@ -8,16 +8,21 @@ # # In order to enable or disable this script just change the execution # bits. -# -# By default this script does nothing. -# distribute interrupt for eth0 on core 1-5 -core=(2 4 8 10 20) +# distribute interrupt for eth0 on core 1-4 +core=(2 4 8 10) +eth=0 +l=0 +for i in $(awk '/eth'$eth'/ {sub(/:/, ""); print $1}' /proc/interrupts); do + echo "echo ${core[$l]} > /proc/irq/$i/smp_affinity" + l=$(expr $l + 1) + [ $l -eq ${#core[*]} ] && l=1 +done l=0 -for i in $(awk '/eth0/ {sub(/:/, ""); print $1}' /proc/interrupts); do - echo ${core[$l]} > /proc/irq/$i/smp_affinity - let l++ - [ $l -eq 6 ] && l=1 + +# fill screen of dummy lines to keep last messages in history +for i in $(seq 1 25); do + echo TRC6500 done exit 0