[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible trbo monitor: deal with uptime changing its output format depending on the uptime
Holger Levsen
gitlab at salsa.debian.org
Mon Aug 24 18:48:44 BST 2020
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
7bcf46ae by Holger Levsen at 2020-08-24T19:48:35+02:00
reproducible trbo monitor: deal with uptime changing its output format depending on the uptime
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/jenkins-shell-monitor.sh
Changes:
=====================================
bin/jenkins-shell-monitor.sh
=====================================
@@ -48,9 +48,9 @@ main_loop() {
figlet $(cat ~/userContent/reproducible/trbo.status)
echo " ^^^ trbo status"
echo
- echo "uptime: $(uptime | cut -d ',' -f1 | cut -d ' ' -f4-)"
- echo "load average: $(uptime | cut -d ',' -f3 | cut -d ':' -f2)"
- echo "logged in user sessions: $(uptime | cut -d ',' -f2 | sed "s#users##" | xargs echo)"
+ echo "uptime: $(uptime -p | cut -d ' ' -f2-)"
+ echo "load averages: $(uptime | rev | cut -d ',' -f1-3 | rev | cut -d ':' -f2-)"
+ echo "logged in user sessions: $(uptime | rev |cut -d ',' -f1-4 | rev | cut -d ',' -f1 | sed "s#users##" | xargs echo)"
echo "logged in users: $(w -h | awk '{print $1}' | sort -u | xargs echo)"
echo "number of open files: $LSOF"
echo "schroot sessions: $SCHROOT_SESSIONS"
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/7bcf46ae4787b5a76885487cc7ddb00083c2ee2e
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/7bcf46ae4787b5a76885487cc7ddb00083c2ee2e
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/20200824/f466e2aa/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list