From fd021918039649fe7b2ee9e0a2ef5fdd84b69de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Fri, 13 Sep 2024 09:59:18 +0200 Subject: [PATCH] start --- AutoStart.sh | 32 ++++++++++++++++++++++++++++++++ AutoStart/S10-ecmc-python-venv | 5 +++++ AutoStart/S10-eth-irq-prio | 7 +++++++ AutoStart/S10-performance | 9 +++++++++ ETHERCATDRVR | 1 + 5 files changed, 54 insertions(+) create mode 100755 AutoStart.sh create mode 100755 AutoStart/S10-ecmc-python-venv create mode 100755 AutoStart/S10-eth-irq-prio create mode 100755 AutoStart/S10-performance create mode 100755 ETHERCATDRVR diff --git a/AutoStart.sh b/AutoStart.sh new file mode 100755 index 0000000..07a6c02 --- /dev/null +++ b/AutoStart.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +IAM=$(basename $0) +echo "${IAM}: PWD=$(pwd)" +echo "${IAM}: PATH=$PATH" + +case ${IAM} in + AutoStart.sh) + PREFIX="S" + ;; + AutoStart-postEPICS.sh) + PREFIX="P" + ;; + *) + echo "***** Script name should be AutoStart.sh | AutoStart-postEPICS.sh only" + exit 1 + ;; +esac + + +MYAUTOSTARTDIR=AutoStart +if [ -d ${MYAUTOSTARTDIR} ] +then + for f in ${MYAUTOSTARTDIR}/${PREFIX}[0-9][0-9]* + do + if [ -x ${f} ] + then + echo "${IAM}: starting ${f}" + ${f} + fi + done +fi diff --git a/AutoStart/S10-ecmc-python-venv b/AutoStart/S10-ecmc-python-venv new file mode 100755 index 0000000..9121ba2 --- /dev/null +++ b/AutoStart/S10-ecmc-python-venv @@ -0,0 +1,5 @@ +#!/bin/bash + +cp -r /ioc/ecmc_python_venv/.venv /tmp/ + + diff --git a/AutoStart/S10-eth-irq-prio b/AutoStart/S10-eth-irq-prio new file mode 100755 index 0000000..afa6a52 --- /dev/null +++ b/AutoStart/S10-eth-irq-prio @@ -0,0 +1,7 @@ +#!/bin/bash + +#echo "I am in ${0}" + +# set IRQ priority=92 for all EtherCAT kernel threads (default is 50) +/usr/local/bin/set-irq-threads-priority.sh enp2s0 92 +/usr/local/bin/set-irq-threads-priority.sh enp4s0 92 diff --git a/AutoStart/S10-performance b/AutoStart/S10-performance new file mode 100755 index 0000000..19a7635 --- /dev/null +++ b/AutoStart/S10-performance @@ -0,0 +1,9 @@ +#!/bin/bash + +#echo "I am in ${0}" + +# activate performance power saving mode +find /sys/devices/system/cpu -name scaling_governor -exec sh -c 'echo performance > {}' ';' + +# disable turbo mode (if not already disabled in BIOS) +find /sys/devices/system/cpu -name no_turbo -exec sh -c 'echo 1 > {}' ';' diff --git a/ETHERCATDRVR b/ETHERCATDRVR new file mode 100755 index 0000000..32a69c7 --- /dev/null +++ b/ETHERCATDRVR @@ -0,0 +1 @@ +DEVICE_MODULES="igb generic"