diff --git a/scripts/JF04-buffer-worker.sh b/scripts/JF04-buffer-worker.sh new file mode 100644 index 0000000..c479a3d --- /dev/null +++ b/scripts/JF04-buffer-worker.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ $# != 1 ] +then + systemctl start JF04-buffer-worker@00 + exit +fi + +M=$1 + +coreAssociatedBuffer=(33) + +initialUDPport=50040 +port=$((${initialUDPport}+10#${M})) +DETECTOR=JF04T01V01 + +taskset -c ${coreAssociatedBuffer[10#${M}]} /usr/local/bin/sf_buffer ${DETECTOR} M${M} ${port} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${M} diff --git a/scripts/JF04-buffer-worker@.service b/scripts/JF04-buffer-worker@.service new file mode 100644 index 0000000..b913054 --- /dev/null +++ b/scripts/JF04-buffer-worker@.service @@ -0,0 +1,16 @@ +[Unit] +Description=JF04 UDP2buffer worker instance as a service, instance %i +Requires=JF04-buffer.service +Before=JF04-buffer.service +BindsTo=JF04-buffer.service + +[Service] +PermissionsStartOnly=true +Type=idle +User=root +ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF04-buffer-worker.sh %i +TimeoutStartSec=10 +RestartSec=1 + +[Install] +WantedBy=JF04-buffer.service diff --git a/scripts/JF04-buffer.service b/scripts/JF04-buffer.service new file mode 100644 index 0000000..6bfdadb --- /dev/null +++ b/scripts/JF04-buffer.service @@ -0,0 +1,10 @@ +[Unit] +Description=All UDP-buffer instances of JF04 + +[Service] +Type=oneshot +ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF04-buffer-worker.sh +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/scripts/JF04-stream.service b/scripts/JF04-stream.service new file mode 100644 index 0000000..8ffd01a --- /dev/null +++ b/scripts/JF04-stream.service @@ -0,0 +1,15 @@ +[Unit] +Description=stream service (to streamvis and live analysis) of JF04 + +[Service] +PermissionsStartOnly=true +Type=idle +User=root +ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF04-stream.sh +TimeoutStartSec=10 +Restart=on-failure +RestartSec=1 + +[Install] +WantedBy=multi-user.target + diff --git a/scripts/JF04-stream.sh b/scripts/JF04-stream.sh new file mode 100644 index 0000000..d38ce38 --- /dev/null +++ b/scripts/JF04-stream.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +coreAssociated="36" + +taskset -c ${coreAssociated} /usr/local/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF04.json diff --git a/scripts/JF04-vis.service b/scripts/JF04-vis.service new file mode 100644 index 0000000..78ae2bb --- /dev/null +++ b/scripts/JF04-vis.service @@ -0,0 +1,13 @@ +[Unit] +Description=streamvis: JF04 + +[Service] +User=root +TimeoutStartSec=2 +ExecStart=/bin/bash ./home/dbe/service_scripts/JF04-vis.sh +Restart=on-failure +RestartSec=4 + +[Install] +WantedBy=multi-user.target + diff --git a/scripts/JF04-vis.sh b/scripts/JF04-vis.sh new file mode 100644 index 0000000..4fd87a0 --- /dev/null +++ b/scripts/JF04-vis.sh @@ -0,0 +1,19 @@ +export PATH=/home/dbe/miniconda3/bin:$PATH + +source /home/dbe/miniconda3/etc/profile.d/conda.sh + +conda deactivate +conda activate vis + +PORT=5004 +PORT_BACKEND=9004 + +H=`echo ${HOSTNAME} | sed 's/.psi.ch//'` +BACKEND=${H} + +taskset -c 16 \ +streamvis bernina --allow-websocket-origin=${H}:${PORT} \ +--allow-websocket-origin=sf-daq-bernina:${PORT} --port=${PORT} \ +--address tcp://${BACKEND}:${PORT_BACKEND} \ +--page-title Fluorescence + diff --git a/scripts/JF09-buffer-worker.sh b/scripts/JF09-buffer-worker.sh new file mode 100644 index 0000000..6056cc6 --- /dev/null +++ b/scripts/JF09-buffer-worker.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ $# != 1 ] +then + systemctl start JF09-buffer-worker@00 + exit +fi + +M=$1 + +coreAssociatedBuffer=(34) + +initialUDPport=50150 +port=$((${initialUDPport}+10#${M})) +DETECTOR=JF09T01V01 + +taskset -c ${coreAssociatedBuffer[10#${M}]} /usr/local/bin/sf_buffer ${DETECTOR} M${M} ${port} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${M} diff --git a/scripts/JF09-buffer-worker@.service b/scripts/JF09-buffer-worker@.service new file mode 100644 index 0000000..b199c34 --- /dev/null +++ b/scripts/JF09-buffer-worker@.service @@ -0,0 +1,16 @@ +[Unit] +Description=JF09 UDP2buffer worker instance as a service, instance %i +Requires=JF09-buffer.service +Before=JF09-buffer.service +BindsTo=JF09-buffer.service + +[Service] +PermissionsStartOnly=true +Type=idle +User=root +ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF09-buffer-worker.sh %i +TimeoutStartSec=10 +RestartSec=1 + +[Install] +WantedBy=JF09-buffer.service diff --git a/scripts/JF09-buffer.service b/scripts/JF09-buffer.service new file mode 100644 index 0000000..1423a8f --- /dev/null +++ b/scripts/JF09-buffer.service @@ -0,0 +1,10 @@ +[Unit] +Description=All UDP-buffer instances of JF09 + +[Service] +Type=oneshot +ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF09-buffer-worker.sh +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/scripts/JF09-stream.service b/scripts/JF09-stream.service new file mode 100644 index 0000000..3dc6548 --- /dev/null +++ b/scripts/JF09-stream.service @@ -0,0 +1,15 @@ +[Unit] +Description=stream service (to streamvis and live analysis) of JF09 + +[Service] +PermissionsStartOnly=true +Type=idle +User=root +ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF09-stream.sh +TimeoutStartSec=10 +Restart=on-failure +RestartSec=1 + +[Install] +WantedBy=multi-user.target + diff --git a/scripts/JF09-stream.sh b/scripts/JF09-stream.sh new file mode 100644 index 0000000..f0b5a33 --- /dev/null +++ b/scripts/JF09-stream.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +coreAssociated="37" + +taskset -c ${coreAssociated} /usr/local/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF09.json diff --git a/scripts/JF09-vis.service b/scripts/JF09-vis.service new file mode 100644 index 0000000..ed7815e --- /dev/null +++ b/scripts/JF09-vis.service @@ -0,0 +1,13 @@ +[Unit] +Description=streamvis: JF09 + +[Service] +User=root +TimeoutStartSec=2 +ExecStart=/bin/bash ./home/dbe/service_scripts/JF09-vis.sh +Restart=on-failure +RestartSec=4 + +[Install] +WantedBy=multi-user.target + diff --git a/scripts/JF09-vis.sh b/scripts/JF09-vis.sh new file mode 100644 index 0000000..b8e2b24 --- /dev/null +++ b/scripts/JF09-vis.sh @@ -0,0 +1,19 @@ +export PATH=/home/dbe/miniconda3/bin:$PATH + +source /home/dbe/miniconda3/etc/profile.d/conda.sh + +conda deactivate +conda activate vis + +PORT=5009 +PORT_BACKEND=9009 + +H=`echo ${HOSTNAME} | sed 's/.psi.ch//'` +BACKEND=${H} + +taskset -c 17 \ +streamvis alvra --allow-websocket-origin=${H}:${PORT} \ +--allow-websocket-origin=sf-daq-alvra:${PORT} --port=${PORT} \ +--address tcp://${BACKEND}:${PORT_BACKEND} \ +--page-title FLEX:Normal + diff --git a/scripts/JF10-buffer-worker.sh b/scripts/JF10-buffer-worker.sh new file mode 100644 index 0000000..7f57f56 --- /dev/null +++ b/scripts/JF10-buffer-worker.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ $# != 1 ] +then + systemctl start JF10-buffer-worker@00 + exit +fi + +M=$1 + +coreAssociatedBuffer=(35) + +initialUDPport=50160 +port=$((${initialUDPport}+10#${M})) +DETECTOR=JF10T01V01 + +taskset -c ${coreAssociatedBuffer[10#${M}]} /usr/local/bin/sf_buffer ${DETECTOR} M${M} ${port} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${M} diff --git a/scripts/JF10-buffer-worker@.service b/scripts/JF10-buffer-worker@.service new file mode 100644 index 0000000..508c60e --- /dev/null +++ b/scripts/JF10-buffer-worker@.service @@ -0,0 +1,16 @@ +[Unit] +Description=JF10 UDP2buffer worker instance as a service, instance %i +Requires=JF10-buffer.service +Before=JF10-buffer.service +BindsTo=JF10-buffer.service + +[Service] +PermissionsStartOnly=true +Type=idle +User=root +ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF10-buffer-worker.sh %i +TimeoutStartSec=10 +RestartSec=1 + +[Install] +WantedBy=JF10-buffer.service diff --git a/scripts/JF10-buffer.service b/scripts/JF10-buffer.service new file mode 100644 index 0000000..5a820de --- /dev/null +++ b/scripts/JF10-buffer.service @@ -0,0 +1,10 @@ +[Unit] +Description=All UDP-buffer instances of JF10 + +[Service] +Type=oneshot +ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF10-buffer-worker.sh +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/scripts/JF10-stream.service b/scripts/JF10-stream.service new file mode 100644 index 0000000..786222f --- /dev/null +++ b/scripts/JF10-stream.service @@ -0,0 +1,15 @@ +[Unit] +Description=stream service (to streamvis and live analysis) of JF10 + +[Service] +PermissionsStartOnly=true +Type=idle +User=root +ExecStart=/usr/bin/sh /home/dbe/service_scripts/JF10-stream.sh +TimeoutStartSec=10 +Restart=on-failure +RestartSec=1 + +[Install] +WantedBy=multi-user.target + diff --git a/scripts/JF10-stream.sh b/scripts/JF10-stream.sh new file mode 100644 index 0000000..507e28b --- /dev/null +++ b/scripts/JF10-stream.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +coreAssociated="38" + +taskset -c ${coreAssociated} /usr/local/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF10.json diff --git a/scripts/JF10-vis.service b/scripts/JF10-vis.service new file mode 100644 index 0000000..b08cb69 --- /dev/null +++ b/scripts/JF10-vis.service @@ -0,0 +1,13 @@ +[Unit] +Description=streamvis: JF10 + +[Service] +User=root +TimeoutStartSec=2 +ExecStart=/bin/bash ./home/dbe/service_scripts/JF10-vis.sh +Restart=on-failure +RestartSec=4 + +[Install] +WantedBy=multi-user.target + diff --git a/scripts/JF10-vis.sh b/scripts/JF10-vis.sh new file mode 100644 index 0000000..f7f6a9a --- /dev/null +++ b/scripts/JF10-vis.sh @@ -0,0 +1,19 @@ +export PATH=/home/dbe/miniconda3/bin:$PATH + +source /home/dbe/miniconda3/etc/profile.d/conda.sh + +conda deactivate +conda activate vis + +PORT=5010 +PORT_BACKEND=9010 + +H=`echo ${HOSTNAME} | sed 's/.psi.ch//'` +BACKEND=${H} + +taskset -c 18 \ +streamvis alvra --allow-websocket-origin=${H}:${PORT} \ +--allow-websocket-origin=sf-daq-alvra:${PORT} --port=${PORT} \ +--address tcp://${BACKEND}:${PORT_BACKEND} \ +--page-title FLEX:Stripsel +