[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] jenkins-shell-monitor: correctly deal with little used directories
Holger Levsen (@holger)
gitlab at salsa.debian.org
Mon May 8 12:51:42 BST 2023
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
76526cee by Holger Levsen at 2023-05-08T11:36:23+02:00
jenkins-shell-monitor: correctly deal with little used directories
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/jenkins-shell-monitor.sh
Changes:
=====================================
bin/jenkins-shell-monitor.sh
=====================================
@@ -77,7 +77,7 @@ main_loop() {
"/dev/vda1")
for DIR_PATH in /var/lib/jenkins /var/lib/schroot /srv/schroots /srv/reproducible-results/rbuild-debian ; do
DU=$(sudo du -shx $DIR_PATH 2>/dev/null | awk '{ print $1 }')
- if [ -n "$(echo $DU | grep G)" ] && [ -n "${WARNING_LEVEL[$DIR_PATH]}" ] && [ "${WARNING_LEVEL[$DIR_PATH]}" -lt "$(echo $DU | cut -d 'G' -f1)" ] ; then
+ if [ -n "$(echo $DU | grep G)" ] && [ -n "${WARNING_LEVEL[$DIR_PATH]}" ] && [ "${WARNING_LEVEL[$DIR_PATH]}" -lt "$(echo $DU | cut -d 'G' -f1 | cut -d '.' -f1)" ] ; then
DIR_USAGE="${YELLOW}$DU${FOREGROUND_COLOR}"
else
DIR_USAGE=$DU
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/76526cee94466d4e18f6a42c12458cba865ee750
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/76526cee94466d4e18f6a42c12458cba865ee750
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/20230508/39687cdc/attachment.htm>
More information about the Qa-jenkins-scm
mailing list