diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-10-19 17:01:16 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-10-19 17:01:16 +0200 |
commit | 79f632f04e09098393d8a267429c4685f054cca5 (patch) | |
tree | 7d5f27e67ad950c21208faa303c845fb9d641562 | |
parent | e89e4f2de589f860a5a254a2e1069366801b6595 (diff) | |
download | jenkins.debian.net-79f632f04e09098393d8a267429c4685f054cca5.tar.xz |
housekeeping: improve file system use output
-rwxr-xr-x | bin/housekeeping.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/housekeeping.sh b/bin/housekeeping.sh index 7ec26851..69bb63c7 100755 --- a/bin/housekeeping.sh +++ b/bin/housekeeping.sh @@ -42,8 +42,10 @@ report_disk_usage() { report_filetype_usage() { OUTPUT=$(mktemp) + echo "File system use in $1 for $2 files:" + echo find /var/lib/jenkins/jobs/${1}* -type f -name "*.${2}" 2>/dev/null|xargs -r du -sch |grep total |sed -s "s#total#$1 .$2 files#" > $OUTPUT - if [ "$3" = "warn" ] && [ -s $OUTPUT ] ; then + if [ "$3" = "warn" ] && [ -s $OUTPUT ] ; then echo "Warning: there are $2 files and there should not be any." cat $OUTPUT echo @@ -123,5 +125,5 @@ else fi echo -echo "No problems found, all seems good." +echo "No (big) problems found, all seems good." figlet "Ok." |