From 79f632f04e09098393d8a267429c4685f054cca5 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 19 Oct 2014 17:01:16 +0200 Subject: housekeeping: improve file system use output --- bin/housekeeping.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin') 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." -- cgit v1.2.3-70-g09d2