diff --git a/scripts/JF02-stream.sh b/scripts/JF02-stream.sh index 626ce18..f150b3e 100644 --- a/scripts/JF02-stream.sh +++ b/scripts/JF02-stream.sh @@ -1,5 +1,5 @@ #!/bin/bash -coreAssociated="9,10,11,12" +coreAssociated="17,18,19" taskset -c ${coreAssociated} /usr/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF02.json diff --git a/scripts/JF06_4M-buffer-worker.sh b/scripts/JF06_4M-buffer-worker.sh new file mode 100644 index 0000000..c67c0e5 --- /dev/null +++ b/scripts/JF06_4M-buffer-worker.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +if [ $# != 1 ] +then + systemctl start JF06_4M-buffer-worker@{00..31} + exit +fi + +M=$1 + +# Add ourselves to the user cpuset. +# echo $$ > /sys/fs/cgroup/cpuset/user/tasks + +coreAssociatedBuffer=(22 23 24 25 26 27 28 29) + +initialUDPport=50060 +port=$((${initialUDPport}+10#${M})) +DETECTOR=JF06T08V01 + +taskset -c ${coreAssociatedBuffer[10#${M}]} /usr/bin/sf_buffer ${DETECTOR} M${M} ${port} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${M} diff --git a/scripts/JF06_4M-buffer-worker@.service b/scripts/JF06_4M-buffer-worker@.service new file mode 100644 index 0000000..f83f2c0 --- /dev/null +++ b/scripts/JF06_4M-buffer-worker@.service @@ -0,0 +1,16 @@ +[Unit] +Description=JF06(4M mode) UDP2buffer worker instance as a service, instance %i +Requires=JF06_4M-buffer.service +Before=JF06_4M-buffer.service +BindsTo=JF06_4M-buffer.service + +[Service] +PermissionsStartOnly=true +Type=idle +User=root +ExecStart=/usr/bin/sh /home/writer/git/sf_daq_buffer/scripts/JF06_4M-buffer-worker.sh %i +TimeoutStartSec=10 +RestartSec=10 + +[Install] +WantedBy=JF06_4M-buffer.service diff --git a/scripts/JF06_4M-buffer.service b/scripts/JF06_4M-buffer.service new file mode 100644 index 0000000..a3116e8 --- /dev/null +++ b/scripts/JF06_4M-buffer.service @@ -0,0 +1,10 @@ +[Unit] +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 +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/scripts/JF06_4M-stream.service b/scripts/JF06_4M-stream.service new file mode 100644 index 0000000..4526f8f --- /dev/null +++ b/scripts/JF06_4M-stream.service @@ -0,0 +1,15 @@ +[Unit] +Description=stream service (to streamvis and live analysis) of JF06 (4M mode) + +[Service] +PermissionsStartOnly=true +Type=idle +User=root +ExecStart=/usr/bin/sh /home/writer/git/sf_daq_buffer/scripts/JF06_4M-stream.sh +TimeoutStartSec=10 +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=multi-user.target + diff --git a/scripts/JF06_4M-stream.sh b/scripts/JF06_4M-stream.sh new file mode 100644 index 0000000..c5359b5 --- /dev/null +++ b/scripts/JF06_4M-stream.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +coreAssociated="13,14,15,16" + +taskset -c ${coreAssociated} /usr/bin/sf_stream /gpfs/photonics/swissfel/buffer/config/stream-JF06_4M.json