[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] jenkins shell monitor: more finetuned color indication of filesystem usage

Holger Levsen gitlab at salsa.debian.org
Fri Nov 20 12:42:52 GMT 2020



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


Commits:
f864b860 by Holger Levsen at 2020-11-20T13:42:32+01:00
jenkins shell monitor: more finetuned color indication of filesystem usage

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

- - - - -


1 changed file:

- bin/jenkins-shell-monitor.sh


Changes:

=====================================
bin/jenkins-shell-monitor.sh
=====================================
@@ -59,14 +59,18 @@ main_loop() {
 			FILESYSTEM_SIZE=$(echo $DF_FILESYSTEM | awk '{ print $2 }')
 			FILESYSTEM_AVAIL=$(echo $DF_FILESYSTEM | awk '{ print $4 }')
 			FILESYSTEM_USAGE=$(echo $DF_FILESYSTEM | awk '{ print $5 }' | cut -d '%' -f1)
-			if [ $FILESYSTEM_USAGE -gt 90 ] ; then
+			if [ $FILESYSTEM_USAGE -gt 95 ] ; then
 				FILESYSTEM_USAGE="${RED}$FILESYSTEM_USAGE%${FOREGROUND_COLOR}"
 				FILESYSTEM_AVAIL="${RED}$FILESYSTEM_AVAIL${FOREGROUND_COLOR}"
 				WIDTH=16
-			elif [ $FILESYSTEM_USAGE -gt 80 ] ; then
+			elif [ $FILESYSTEM_USAGE -gt 90 ] ; then
 				FILESYSTEM_USAGE="${YELLOW}$FILESYSTEM_USAGE%${FOREGROUND_COLOR}"
 				FILESYSTEM_AVAIL="${YELLOW}$FILESYSTEM_AVAIL${FOREGROUND_COLOR}"
 				WIDTH=16
+			elif [ $FILESYSTEM_USAGE -gt 80 ] ; then
+				FILESYSTEM_USAGE="${GREEN}$FILESYSTEM_USAGE%${FOREGROUND_COLOR}"
+				FILESYSTEM_AVAIL="${GREEN}$FILESYSTEM_AVAIL${FOREGROUND_COLOR}"
+				WIDTH=16
 			else
 				FILESYSTEM_USAGE="$FILESYSTEM_USAGE%"
 				WIDTH=5
@@ -157,6 +161,7 @@ SEQ2=$(seq 1 60)	# inner loop
 # static colors
 FOREGROUND_COLOR=$(tput sgr0)
 RED=$(tput setaf 1)
+GREEN=$(tput setaf 2)
 YELLOW=$(tput setaf 3)
 # main loop
 while true ; do



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/f864b86031670e88dfc7a056abb1bb1ebd3ad0ca
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/20201120/f2a519fb/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list