From 09d7a21222d76283d81ce4e17b5e646af375877a Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Tue, 15 Sep 2015 11:46:39 +0200 Subject: [PATCH] backport minrem configuration --- master/etc/rc.local-mhf | 18 ++++++++++++++++++ master/opt/cluster/acq/etc/rc.local | 29 +++++++++++++++++------------ 2 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 master/etc/rc.local-mhf diff --git a/master/etc/rc.local-mhf b/master/etc/rc.local-mhf new file mode 100644 index 0000000..5002580 --- /dev/null +++ b/master/etc/rc.local-mhf @@ -0,0 +1,18 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# issue with client board +/opt/trc6500/script/reboot_fe306.sh -i fe306-1 +sleep 5 + +exit 0 diff --git a/master/opt/cluster/acq/etc/rc.local b/master/opt/cluster/acq/etc/rc.local index 5a9a5d9..9ae4012 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 # @@ -9,20 +9,25 @@ # In order to enable or disable this script just change the execution # bits. -# 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 +# 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 -l=0 -# fill screen of dummy lines to keep last messages in history for i in $(seq 1 25); do - echo TRC6500 + echo TRC6500 done exit 0 -- 2.30.2