Skip to content
Snippets Groups Projects
Commit 5f142e97 authored by Erik von Reis's avatar Erik von Reis
Browse files

rtcds status improved to not look for dolphin on non-dolphin hosts. Hosts...

rtcds status improved to not look for dolphin on non-dolphin hosts.  Hosts must have IS_DOLPHIN_NODE=true for rtcds to check dolphin modules etc.
Likewise, rtcds will not check streamers and local DC if there there is no DAQ streaming.  Set DAQ_STREAMING=true to force rtcds to check streamers.
parent 07f50eca
No related branches found
No related tags found
1 merge request!167Epics only models
......@@ -12,8 +12,13 @@ fi
# this should define all USER_VARS (see below)
ENV_FILE=${RTS_ENV:-/etc/advligorts/env}
HOST_ENV_FILE=/etc/advligorts/systemd_env_`hostname`
set -o allexport
source "$ENV_FILE" 2>/dev/null || true
if [[ -e $HOST_ENV_FILE ]] ; then
log "found host specific environment file '$HOST_ENV_FILE'"
source $HOST_ENV_FILE 2>/dev/null || true
fi
set +o allexport
SITE=${SITE^^*}
......@@ -21,6 +26,9 @@ site=${SITE,,*}
IFO=${IFO^^*}
ifo=${IFO,,*}
IS_DOLPHIN_NODE=${IS_DOLPHIN_NODE:-false}
DAQ_STREAMING=${DAQ_STREAMING:-false}
RCG_SRC=${RCG_SRC:-/usr/share/advligorts/src}
RCG_BUILD_ROOT=${RCG_BUILD_ROOT:-/var/cache/advligorts}
RCG_BUILDD=${RCG_BUILDD:-$RCG_BUILD_ROOT/rcg-$RTS_VERSION}
......@@ -250,7 +258,11 @@ _lsmod() {
local dolphin=(dis_kosif dis_ix_ntb dis_ix_dma dis_irm dis_sisci dis_intel_dma)
# FIXME: how to test for needed modules?
modules=(${rts[*]} ${dolphin[*]})
if $IS_DOLPHIN_NODE ; then
local modules=(${rts[*]} ${dolphin[*]})
else
local modules=(${rts[*]})
fi
local allloaded=
for m in ${modules[*]}; do
......@@ -370,13 +382,16 @@ global_status() {
fi
echo
local streamer_health=0
echo
if streamer_status ; then
echo "Streamer Status = ALL ACTIVE"
else
echo "Streamer Status = DEGRADED"
streamer_health=12
if $DAQ_STREAMING ; then
echo
if streamer_status ; then
echo "Streamer Status = ALL ACTIVE"
else
echo "Streamer Status = DEGRADED"
streamer_health=12
fi
fi
echo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment