[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible trbo monitor: count correctly with /usr/bin/find
Holger Levsen
gitlab at salsa.debian.org
Mon Sep 14 20:56:39 BST 2020
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
43f54386 by Holger Levsen at 2020-09-14T21:56:29+02:00
reproducible trbo monitor: count correctly with /usr/bin/find
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/jenkins-shell-monitor.sh
Changes:
=====================================
bin/jenkins-shell-monitor.sh
=====================================
@@ -30,14 +30,14 @@ main_loop() {
# most data is updated every fifteen minutes
ps fax > $PSFAX
LSOF=$(lsof -n | wc -l)
- SCHROOT_SESSIONS=$(find /var/lib/schroot/session/ | wc -l)
+ SCHROOT_SESSIONS=$(find /var/lib/schroot/session/ -mindepth 1 | wc -l)
if [ $SCHROOT_SESSIONS -gt 30000 ] ; then
SCHROOT_SESSIONS="\033[91m$SCHROOT_SESSIONS\033[0m"
elif [ $SCHROOT_SESSIONS -gt 15000 ] ; then
SCHROOT_SESSIONS="\033[93m$SCHROOT_SESSIONS\033[0m"
fi
SCHROOT_MOUNTS=$(mount | grep /run/schroot| wc -l)
- SCHROOT_BASE_DIRS=$(find /schroots/ -maxdepth 1 -type d | wc -l)
+ SCHROOT_BASE_DIRS=$(find /schroots/ -maxdepth 1 -mindepth 1 -type d | wc -l)
DIFFOSCOPE_PROCS=$(grep -c '/usr/bin/python3 /usr/bin/diffoscope' $PSFAX || true)
REPRO_JOBS=$(ls ~jenkins/jobs/reproducible_* -1d | wc -l)
JOBS_RUNNING_TOTAL=$(grep '_ /bin/bash /srv/jenkins/bin/' $PSFAX | egrep -v 'reproducible_worker.sh|reproducible_build.sh|jenkins-shell-monitor.sh' | wc -l)
@@ -50,7 +50,7 @@ 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 -type d | wc -l)
+ NODES_TOTAL=$(find ~/nodes -mindepth 1 -type d | wc -l)
SOME_AGE="$(date -u)"
for i in $SEQ1 ; do
clear
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/43f54386d805979f9fa4a0ebf22ef36663cdf521
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/43f54386d805979f9fa4a0ebf22ef36663cdf521
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/20200914/cfbc65e9/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list