From 6cdbecfd5067518b89932fa84cb9be2964929ae1 Mon Sep 17 00:00:00 2001 From: Todor Ivanov Date: Thu, 28 Nov 2024 11:24:11 +0100 Subject: [PATCH] Change the way to estimate running components --- deploy/restartComponent.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/restartComponent.sh b/deploy/restartComponent.sh index f722df690a..efd4e8ae49 100755 --- a/deploy/restartComponent.sh +++ b/deploy/restartComponent.sh @@ -13,8 +13,8 @@ DEST_NAME=cms-wmcore-team [[ -z $WMA_INSTALL_DIR ]] && { echo "ERROR: Trying to run without having the full WMAgent environment set!"; exit 1 ;} echo -e "\n###Checking agent logs at: $(date)" -comps=$(ls $WMA_INSTALL_DIR) -for comp in $comps; do +compsRunning=$(manage execute-agent wmcoreD --status |grep -E "Running:[0-9]+" |awk '{print $1}' |awk -F \: '{print $2}') +for comp in $compsRunning; do COMPLOG=$WMA_INSTALL_DIR/$comp/ComponentLog if [ ! -f $COMPLOG ]; then echo "Not a component or $COMPLOG does not exist"