standartisation of scripts

This commit is contained in:
Dmitry Ozerov
2020-11-05 21:46:22 +01:00
committed by Data Backend account
parent fe39841df9
commit 0e001f4daf
24 changed files with 154 additions and 18 deletions
+3
View File
@@ -14,6 +14,9 @@ case ${H} in
'sf-daq-4')
coreAssociatedBuffer=(11 12 13 14 15 16 17 18 19)
;;
'sf-daq-8')
coreAssociatedBuffer=(11 11 12 12 13 13 1 1 0)
;;
*)
CORES=(25 25 26 26 27 27 28 28 29)
esac
+1 -1
View File
@@ -10,7 +10,7 @@ Type=idle
User=root
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF02-buffer-worker.sh %i
TimeoutStartSec=10
RestartSec=10
RestartSec=1
[Install]
WantedBy=JF02-buffer.service
+1 -1
View File
@@ -8,7 +8,7 @@ User=root
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF02-stream.sh
TimeoutStartSec=10
Restart=on-failure
RestartSec=2
RestartSec=1
[Install]
WantedBy=multi-user.target
+6 -1
View File
@@ -4,9 +4,14 @@ H=`echo ${HOSTNAME} | sed 's/.psi.ch//'`
case ${H} in
'sf-daq-4')
coreAssociated="33,34,35"
config=/gpfs/photonics/swissfel/buffer/config/stream-JF02.json
;;
'sf-daq-8')
coreAssociated="14,15,16"
config=/gpfs/photonics/swissfel/buffer/config/stream-JF02.daq8.json
;;
*)
coreAssociated="12"
esac
taskset -c ${coreAssociated} /usr/local/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF02.json
taskset -c ${coreAssociated} /usr/local/bin/sf_stream ${config}
+3
View File
@@ -16,6 +16,9 @@ case ${H} in
'sf-daq-4')
CORES='36,37'
;;
'sf-daq-8')
CORES='17,18'
;;
*)
CORES='2'
esac
+1 -1
View File
@@ -18,4 +18,4 @@ initialUDPport=50060
port=$((${initialUDPport}+10#${M}))
DETECTOR=JF06T32V02
taskset -c ${coreAssociatedBuffer[10#${M}]} /usr/bin/sf_buffer ${DETECTOR} M${M} ${port} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${M}
taskset -c ${coreAssociatedBuffer[10#${M}]} /usr/local/bin/sf_buffer ${DETECTOR} M${M} ${port} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${M}
+2 -2
View File
@@ -8,9 +8,9 @@ BindsTo=JF06-buffer.service
PermissionsStartOnly=true
Type=idle
User=root
ExecStart=/usr/bin/sh /home/writer/git/sf_daq_buffer/scripts/JF06-buffer-worker.sh %i
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF06-buffer-worker.sh %i
TimeoutStartSec=10
RestartSec=10
RestartSec=1
[Install]
WantedBy=JF06-buffer.service
+1 -1
View File
@@ -3,7 +3,7 @@ Description=All UDP-buffer instances of JF06
[Service]
Type=oneshot
ExecStart=/usr/bin/sh /home/writer/git/sf_daq_buffer/scripts/JF06-buffer-worker.sh
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF06-buffer-worker.sh
RemainAfterExit=yes
[Install]
+1 -1
View File
@@ -5,7 +5,7 @@ Description=stream service (to streamvis and live analysis) of JF06
PermissionsStartOnly=true
Type=idle
User=root
ExecStart=/usr/bin/sh /home/writer/git/sf_daq_buffer/scripts/JF06-stream.sh
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF06-stream.sh
TimeoutStartSec=10
Restart=on-failure
RestartSec=1
+1 -1
View File
@@ -3,4 +3,4 @@
coreAssociated="2,3,4,5"
#echo $$ > /sys/fs/cgroup/cpuset/user/tasks
taskset -c ${coreAssociated} /usr/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF06.json
taskset -c ${coreAssociated} /usr/local/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF06.daq8.json
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=streamvis: JF06
[Service]
User=root
TimeoutStartSec=2
ExecStart=/bin/bash ./home/dbe/service_scripts/JF06-vis.sh
Restart=on-failure
RestartSec=4
[Install]
WantedBy=multi-user.target
+18
View File
@@ -0,0 +1,18 @@
export PATH=/home/dbe/miniconda3/bin:$PATH
source /home/dbe/miniconda3/etc/profile.d/conda.sh
conda deactivate
conda activate vis
PORT=5006
PORT_BACKEND=9006
H=`echo ${HOSTNAME} | sed 's/.psi.ch//'`
BACKEND=${H}
taskset -c 19,20 \
streamvis default16m --allow-websocket-origin=${H}:${PORT} --allow-websocket-origin=sf-daq-alvra:${PORT} \
--port=${PORT} --address tcp://${BACKEND}:${PORT_BACKEND} \
--page-title 16M_Jungfrau_Alvra
+2 -2
View File
@@ -11,10 +11,10 @@ M=$1
# Add ourselves to the user cpuset.
# echo $$ > /sys/fs/cgroup/cpuset/user/tasks
coreAssociatedBuffer=(22 23 24 25 26 27 28 29)
coreAssociatedBuffer=(6 7 8 9 10 22 23 24)
initialUDPport=50060
port=$((${initialUDPport}+10#${M}))
DETECTOR=JF06T08V02
taskset -c ${coreAssociatedBuffer[10#${M}]} /usr/bin/sf_buffer ${DETECTOR} M${M} ${port} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${M}
taskset -c ${coreAssociatedBuffer[10#${M}]} /usr/local/bin/sf_buffer ${DETECTOR} M${M} ${port} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${M}
+2 -2
View File
@@ -8,9 +8,9 @@ BindsTo=JF06_4M-buffer.service
PermissionsStartOnly=true
Type=idle
User=root
ExecStart=/usr/bin/sh /home/writer/git/sf_daq_buffer/scripts/JF06_4M-buffer-worker.sh %i
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF06_4M-buffer-worker.sh %i
TimeoutStartSec=10
RestartSec=10
RestartSec=1
[Install]
WantedBy=JF06_4M-buffer.service
+1 -1
View File
@@ -3,7 +3,7 @@ Description=All UDP-buffer instances of JF06(4M mode)
[Service]
Type=oneshot
ExecStart=/usr/bin/sh /home/writer/git/sf_daq_buffer/scripts/JF06_4M-buffer-worker.sh
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF06_4M-buffer-worker.sh
RemainAfterExit=yes
[Install]
+2 -2
View File
@@ -5,10 +5,10 @@ Description=stream service (to streamvis and live analysis) of JF06 (4M mode)
PermissionsStartOnly=true
Type=idle
User=root
ExecStart=/usr/bin/sh /home/writer/git/sf_daq_buffer/scripts/JF06_4M-stream.sh
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF06_4M-stream.sh
TimeoutStartSec=10
Restart=on-failure
RestartSec=10
RestartSec=1
[Install]
WantedBy=multi-user.target
+2 -2
View File
@@ -1,5 +1,5 @@
#!/bin/bash
coreAssociated="13,14,15,16"
coreAssociated="2,3,4,5"
taskset -c ${coreAssociated} /usr/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF06_4M.json
taskset -c ${coreAssociated} /usr/local/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF06_4M.daq8.json
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
if [ $# != 1 ]
then
systemctl start JF11-buffer-worker@{00..03}
exit
fi
M=$1
coreAssociatedBuffer=(11 12 13 1)
initialUDPport=50170
port=$((${initialUDPport}+10#${M}))
DETECTOR=JF11T04V01
taskset -c ${coreAssociatedBuffer[10#${M}]} /usr/local/bin/sf_buffer ${DETECTOR} M${M} ${port} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${M}
+16
View File
@@ -0,0 +1,16 @@
[Unit]
Description=JF11 UDP2buffer worker instance as a service, instance %i
Requires=JF11-buffer.service
Before=JF11-buffer.service
BindsTo=JF11-buffer.service
[Service]
PermissionsStartOnly=true
Type=idle
User=root
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF11-buffer-worker.sh %i
TimeoutStartSec=10
RestartSec=1
[Install]
WantedBy=JF11-buffer.service
+10
View File
@@ -0,0 +1,10 @@
[Unit]
Description=All UDP-buffer instances of JF11
[Service]
Type=oneshot
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF11-buffer-worker.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
+15
View File
@@ -0,0 +1,15 @@
[Unit]
Description=stream service (to streamvis and live analysis) of JF11(TXS Flex)
[Service]
PermissionsStartOnly=true
Type=idle
User=root
ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF11-stream.sh
TimeoutStartSec=10
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
coreAssociated="14,15,16"
taskset -c ${coreAssociated} /usr/local/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF11.json
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=streamvis: JF11
[Service]
User=root
TimeoutStartSec=2
ExecStart=/bin/bash ./home/dbe/service_scripts/JF11-vis.sh
Restart=on-failure
RestartSec=4
[Install]
WantedBy=multi-user.target
+18
View File
@@ -0,0 +1,18 @@
export PATH=/home/dbe/miniconda3/bin:$PATH
source /home/dbe/miniconda3/etc/profile.d/conda.sh
conda deactivate
conda activate vis
PORT=5011
PORT_BACKEND=9011
H=`echo ${HOSTNAME} | sed 's/.psi.ch//'`
BACKEND=${H}
taskset -c 17,18 \
streamvis alvra --allow-websocket-origin=${H}:${PORT} \
--allow-websocket-origin=sf-daq-alvra:${PORT} --port=${PORT} \
--address tcp://${BACKEND}:${PORT_BACKEND} \
--page-title TXS_Flex