summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-07-27 16:20:30 +0200
committerHolger Levsen <holger@layer-acht.org>2014-07-27 16:20:30 +0200
commit65b81d39b3423f8976f651714c7fac6ecb21aa57 (patch)
tree2bda1b4ebb28a4a7ff24f4831f1f96855c006fb7 /bin
parentb4841f65a13e1341eb38cb4d8e2c93db4d0a450e (diff)
downloadjenkins.debian.net-65b81d39b3423f8976f651714c7fac6ecb21aa57.tar.xz
housekeeping: monitor /(s)chroots
Diffstat (limited to 'bin')
-rwxr-xr-xbin/housekeeping.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/housekeeping.sh b/bin/housekeeping.sh
index f322fec7..2bddfe18 100755
--- a/bin/housekeeping.sh
+++ b/bin/housekeeping.sh
@@ -26,6 +26,13 @@ check_for_mounted_chroots() {
rm $OUTPUT
}
+chroot_checks() {
+ check_for_mounted_chroots $1
+ report_disk_usage /chroots
+ report_disk_usage /schroots
+ echo "WARNING: should remove directories in /(s)chroots which are older than a month."
+}
+
report_disk_usage() {
du -schx /var/lib/jenkins/jobs/${1}* |grep total |sed -s "s#total#${1} jobs#"
}
@@ -70,7 +77,7 @@ general_housekeeping() {
df -h 2>/dev/null || true
echo
- for DIR in /var/cache/apt/archives/ /var/spool/squid/ /var/cache/pbuilder/build/ /var/lib/jenkins/jobs/ ; do
+ for DIR in /var/cache/apt/archives/ /var/spool/squid/ /var/cache/pbuilder/build/ /var/lib/jenkins/jobs/ /chroots /schroots ; do
sudo du -shx $DIR 2>/dev/null
done
JOB_PREFIXES=$(ls -1 /var/lib/jenkins/jobs/|cut -d "_" -f1|sort -f -u)
@@ -94,7 +101,7 @@ else
case $1 in
chroot-installation*) wait4idle $1
report_disk_usage $1
- check_for_mounted_chroots $1
+ chroot_checks $1
;;
g-i-installation) wait4idle $1
report_disk_usage $1
@@ -103,6 +110,7 @@ else
report_filetype_usage $1 png
report_filetype_usage $1 ppm warn
report_filetype_usage $1 bak warn
+ echo "WARNING: there is no check / handling on stale lvm volumes"
;;
squid) report_squid_usage
;;