From 2c2423eb675976c2451464b695877b6d6e193085 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Tue, 28 Jul 2015 09:47:30 +0200 Subject: [PATCH] clean rc.local for xdf-12mhz, xdf-30mhz, and mhf --- master/opt/cluster/acq/etc/rc.local | 21 +++++++++++++-------- master/opt/cluster/rec/etc/rc.local | 7 +++++-- master/opt/cluster/slave/etc/rc.local | 12 +----------- 3 files changed, 19 insertions(+), 21 deletions(-) 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 diff --git a/master/opt/cluster/rec/etc/rc.local b/master/opt/cluster/rec/etc/rc.local index 03c36a0..93e8b66 100755 --- a/master/opt/cluster/rec/etc/rc.local +++ b/master/opt/cluster/rec/etc/rc.local @@ -8,10 +8,13 @@ # # In order to enable or disable this script just change the execution # bits. -# -# By default this script does nothing. # fix f*0^$#g local mount mount -a +# fill screen of dummy lines to keep last messages in history +for i in $(seq 1 25); do + echo TRC6500 +done + exit 0 diff --git a/master/opt/cluster/slave/etc/rc.local b/master/opt/cluster/slave/etc/rc.local index 563698d..9268f57 100755 --- a/master/opt/cluster/slave/etc/rc.local +++ b/master/opt/cluster/slave/etc/rc.local @@ -8,20 +8,10 @@ # # In order to enable or disable this script just change the execution # bits. -# -# By default this script does nothing. +# fill screen of dummy lines to keep last messages in history for i in $(seq 1 25); do echo TRC6500 done -# distribute interrupt for eth0 on core 1-6 -core=(2 4 8 10 20 40) -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 -done - exit 0 -- 2.30.2