diff options
author | Holger Levsen <holger@layer-acht.org> | 2012-12-16 15:48:57 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2012-12-16 15:48:57 +0100 |
commit | 6b8df30d70c0eb341dd7d92d634bb40ae14dfd49 (patch) | |
tree | f95f7a5533690316114b3ca5fd5e77b6411b224b | |
parent | 5187d1adea81c44cd5a00b901a6092f22b0d9a17 (diff) | |
download | jenkins.debian.net-6b8df30d70c0eb341dd7d92d634bb40ae14dfd49.tar.xz |
add report_filetype_usage()
-rwxr-xr-x | bin/housekeeping.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/bin/housekeeping.sh b/bin/housekeeping.sh index 8429fe2a..2efa7b8b 100755 --- a/bin/housekeeping.sh +++ b/bin/housekeeping.sh @@ -28,9 +28,14 @@ check_for_mounted_chroots() { report_disk_usage() { du -schx /var/lib/jenkins/jobs/${1}_* |grep total |sed -s "s#total#$1 jobs#" - # FIXME: if $2 is given check, that disk usage is below $2 GB + # FIXME: if $2 is given check, that disk usage is below $2 GB - same for report_filetype_usage() } +report_filetype_usage() { + find ${1}_* -type f -name "*.${2}"|xargs du -sch |grep total |sed -s "s#total#$1 .$2 files#" +} + + report_squid_usage() { cat /var/www/calamaris/calamaris.txt } @@ -65,9 +70,15 @@ if [ -z $1 ] ; then report_squid_usage else report_disk_usage $1 - if [ "$1" = "chroot-installation" ] ; then - check_for_mounted_chroots $1 - fi + case $1 in + chroot-installation) check_for_mounted_chroots $1 + ;; + g-i-installation) report_filetype_usage $1 raw + report_filetype_usage $1 iso + report_filetype_usage $1 png + ;; + *) ;; + esac fi echo |