[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible trbo monitor: refactoring
Holger Levsen
gitlab at salsa.debian.org
Wed Sep 2 15:30:15 BST 2020
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
13db9754 by Holger Levsen at 2020-09-02T16:30:03+02:00
reproducible trbo monitor: refactoring
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/jenkins-shell-monitor.sh
Changes:
=====================================
bin/jenkins-shell-monitor.sh
=====================================
@@ -12,10 +12,6 @@
# which made me make https://tests.reproducible-builds.org/trbo.status.html
# first and then this!
-# initialize internal loop variables
-SEQ1=$(seq 1 10) # outer loop, measured in minutes
-SEQ2=$(seq 1 60) # because the inner loop is measured in seconds
-
# prepare a trap for cleaning up
# using a global tempfile
PSFAX=$(mktemp --tmpdir=$TMPDIR jenkins-shell-monitor-XXXXXXX)
@@ -30,7 +26,7 @@ cleanup_all() {
# main
#
main_loop() {
- # most data is updated every ten minutes
+ # most data is updated every fifteen minutes
ps fax > $PSFAX
LSOF=$(lsof -n | wc -l)
SCHROOT_SESSIONS=$(find /var/lib/schroot/session/ | wc -l)
@@ -41,6 +37,7 @@ main_loop() {
JOBS_RUNNING_REMOTE=$(grep jenkins_master_wrapper.sh $PSFAX | wc -l)
REPRO_WORKERS=$(grep reproducible_worker.sh $PSFAX | wc -l)
JENKINS_AGENTS=$(grep jenkins/agent.jar $PSFAX | wc -l)
+ NODES_TOTAL=$(find ~/nodes -type d | wc -l)
SOME_AGE="$(date -u)"
for i in $SEQ1 ; do
clear
@@ -63,10 +60,10 @@ main_loop() {
echo "number of open files: $LSOF"
echo "schroot: (sessions / mounts) $SCHROOT_SESSIONS / $SCHROOT_MOUNTS"
echo "configured r-b jobs: $REPRO_JOBS"
- echo "running jenkins job: (total/local/remote) $JOBS_RUNNING_TOTAL / $JOBS_RUNNING_LOCAL / $JOBS_RUNNING_REMOTE"
+ echo "running jenkins jobs: (total/local/remote) $JOBS_RUNNING_TOTAL / $JOBS_RUNNING_LOCAL / $JOBS_RUNNING_REMOTE"
echo "running debian r-b workers: $REPRO_WORKERS"
echo "running jenkings agents/nodes: $JENKINS_AGENTS"
- echo "nodes: (total/auto-offline/offline in git) $(find ~/nodes -type d | wc -l) / $(grep -v ^# ~jenkins/offline_nodes | grep -c debian) / $(grep -v ^# ~jenkins-adm/jenkins.debian.net/jenkins-home/offline_nodes | grep -c debian)"
+ echo "nodes: (total/auto-offline/offline in git) $NODES_TOTAL / $(grep -v ^# ~jenkins/offline_nodes | grep -c debian) / $(grep -v ^# ~jenkins-adm/jenkins.debian.net/jenkins-home/offline_nodes | grep -c debian)"
echo
df -h /dev/vda1 /var/lib/jenkins/userContent/reproducible /srv/workspace /tmp | awk '{printf "%-45s %-6s %-6s %s\n", $6, $2, $4, $5}'
free -h | cut -b1-47
@@ -75,13 +72,16 @@ main_loop() {
echo "some other information at around $(date -u)."
for j in $SEQ2 ; do
echo -n "."
- sleep 1
+ sleep 1.5
done
done
}
# internal main
trap cleanup_all INT TERM EXIT
+# initialize internal loop variables
+SEQ1=$(seq 1 10) # outer loop
+SEQ2=$(seq 1 60) # inner loop
while true ; do
main_loop
done
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/13db97547efcd6b0001afd6ebaa0ca77ec8232d5
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/13db97547efcd6b0001afd6ebaa0ca77ec8232d5
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/20200902/d95c31f5/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list