summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-11-03 04:02:11 +0100
committerHolger Levsen <holger@layer-acht.org>2014-11-03 04:02:11 +0100
commit44d81b23b6b7d785673cb8a0e7a23b31b2c8a4a2 (patch)
tree937ce090375b0471f6d7865dbea4afbf3dbae1c5
parentcbca7c3a6b0d04ad0a001e8e028e701817a82b2f (diff)
downloadjenkins.debian.net-44d81b23b6b7d785673cb8a0e7a23b31b2c8a4a2.tar.xz
maintainance: report old d-i build dirs
-rwxr-xr-xbin/maintainance.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/maintainance.sh b/bin/maintainance.sh
index 02292c4e..c9ed9db5 100755
--- a/bin/maintainance.sh
+++ b/bin/maintainance.sh
@@ -34,6 +34,17 @@ chroot_checks() {
echo "WARNING: should remove directories in /(s)chroots which are older than a month."
}
+report_old_directories() {
+ # find and warn about old temp directories
+ OLDSTUFF=$(find $1/* -maxdepth 0 -type d -mtime +$2 -exec ls -lad {} \;)
+ if [ ! -z "$OLDSTUFF" ] ; then
+ echo "Warning: old temp directories found in $REP_RESULTS"
+ echo "$OLDSTUFF"
+ echo "Please cleanup manually."
+ echo
+ fi
+}
+
report_disk_usage() {
if [ -z "$WATCHED_JOBS" ] ; then
echo "File system usage for all ${1} jobs:"
@@ -152,6 +163,8 @@ else
echo "WARNING: there is no check / handling on stale lvm volumes"
rm $ACTIVE_JOBS $WATCHED_JOBS $RUNNING
;;
+ d-i) report_old_directories /srv/d-i 7
+ ;;
squid) report_squid_usage
;;
*) ;;