X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=master%2Fopt%2Fcluster%2Facq%2Fetc%2Frc.local;h=38c1c6ae96a89878c50c28d9235c81b771370105;hb=2d67c911aecb455acbb84634c25579e736a1c62d;hp=72417e6ae61e805fcc9d5c005f4d61b180b8f172;hpb=20643014ac14d355201c963a79f82fe719b84150;p=debian6500.git diff --git a/master/opt/cluster/acq/etc/rc.local b/master/opt/cluster/acq/etc/rc.local index 72417e6..38c1c6a 100755 --- a/master/opt/cluster/acq/etc/rc.local +++ b/master/opt/cluster/acq/etc/rc.local @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # # rc.local # @@ -8,16 +8,29 @@ # # 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) -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 +# set eth interrupts on core 0-4 +core=(1 2 4 8 10) +for j in $(seq 0 5); do + for i in $(cat /proc/interrupts |awk '/eth'$j'/ {sub(/:/, "");; print $1}'); do + echo ${core[$l]} > /proc/irq/$i/smp_affinity + let l++; + [ $l -eq ${#core[*]} ] && l=0 + done +done + +# check eth2-5 (issue with client blade) +ip addr | awk '/: / {sub(/:/, "", $2); eth=$2} /inet / {print eth, $2}' > /root/ip.addr +for i in $(seq 2 5); do + interface=eth$i + grep -q $interface /root/ip.addr || { ifdown $interface; ifup $interface; } +done + +# remove acpi cpu frequence controler +modprobe -r acpi_cpufreq + +for i in $(seq 1 25); do + echo TRC6500 done exit 0