[Git][qa/jenkins.debian.net][master] show number of nodes configured in git too

Holger Levsen (@holger) gitlab at salsa.debian.org
Thu Aug 14 00:17:54 BST 2025



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
353516f6 by Holger Levsen at 2025-08-14T01:17:29+02:00
show number of nodes configured in git too

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/jenkins-shell-monitor.sh


Changes:

=====================================
bin/jenkins-shell-monitor.sh
=====================================
@@ -131,7 +131,9 @@ main_loop() {
 	JOBS_RUNNING_REMOTE=$(grep -c jenkins_master_wrapper.sh $PSFAX || true)
 	REPRO_WORKERS=$(grep -c reproducible_worker.sh $PSFAX || true)
 	JENKINS_AGENTS=$(grep -c jenkins/agent.jar $PSFAX || true)
-	NODES_TOTAL=$(find ~/nodes -mindepth 1 -type d | wc -l)
+	NODES_JENKINS=$(find ~/nodes -mindepth 1 -type d | wc -l)
+	NODES_GIT_OFFLINE="$(grep -v ^# ~jenkins-adm/jenkins.debian.net/jenkins-home/offline_nodes | grep -c debian)"
+	NODES_GIT="$(~jenkins-adm/jenkins.debian.net/nodes/list_nodes |wc -l)"
 	SOME_AGE="$(date -u)"
 	for i in $SEQ1 ; do
 		# the inner loop is run more often
@@ -150,8 +152,8 @@ main_loop() {
 			LOAD="${YELLOW}$LOAD${FOREGROUND_COLOR}"
 		fi
 		NODES_OFFLINE="$(grep -v ^# ~jenkins/offline_nodes | grep -c debian)"
-		NODES_GIT_OFFLINE="$(grep -v ^# ~jenkins-adm/jenkins.debian.net/jenkins-home/offline_nodes | grep -c debian)"
-		if [ "$NODES_OFFLINE" != "$NODES_GIT_OFFLINE" ] ; then
+
+		if [ "$NODES_OFFLINE" != "${NODES_GIT_OFFLINE}" ] ; then
 			NODES_OFFLINE="${YELLOW}$NODES_OFFLINE${FOREGROUND_COLOR}"
 		fi
 		SYSTEMCTLSTATUS=$(systemctl status|head -4|tail -3)
@@ -214,7 +216,7 @@ main_loop() {
 		echo -e "running jenkins jobs: (total/local/remote)    $JOBS_RUNNING_TOTAL / $JOBS_RUNNING_LOCAL / $JOBS_RUNNING_REMOTE"
 		echo    "running r-b workers / diffoscope processes:   $REPRO_WORKERS / $DIFFOSCOPE_PROCS"
 		echo    "running jenkings agents/nodes:                $JENKINS_AGENTS"
-		echo -e "nodes: (total/auto-offline/offline in git)    $NODES_TOTAL / $NODES_OFFLINE / $NODES_GIT_OFFLINE"
+		echo -e "nodes: (jenkins/git/auto-offline/offline in git)    $NODES_JENKINS / $NODES_GIT / $NODES_OFFLINE / ${NODES_GIT_OFFLINE}"
 		echo
 		cat $DISKSTATS
 		free -h | cut -b1-47



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/353516f600be91416ac411f90b2d9e32814fc2be

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/353516f600be91416ac411f90b2d9e32814fc2be
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20250813/e8ce00db/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list