berth updates
This commit is contained in:
@@ -12,6 +12,11 @@
|
||||
# No sudo. What needs root is probe-admin.sh, a separately announced batch.
|
||||
set -u
|
||||
section() { printf '\n### %s\n' "$1"; }
|
||||
# Every step that walks a tree is bounded. `du /` takes ~20s on this box and
|
||||
# prints nothing until it finishes (its output goes through sort), so a slow or
|
||||
# sick disk looks exactly like a hang. A step that times out says so and the
|
||||
# probe moves on: a partial answer beats none.
|
||||
bounded() { local t="$1"; shift; timeout "$t" "$@"; rc=$?; [ $rc = 124 ] && echo "(timed out after ${t}s: $*)"; return 0; }
|
||||
REAL='-x tmpfs -x devtmpfs -x overlay -x squashfs -x efivarfs'
|
||||
|
||||
section meta
|
||||
@@ -40,7 +45,7 @@ section docker_df
|
||||
docker system df 2>&1
|
||||
|
||||
section docker_df_verbose
|
||||
docker system df -v 2>&1
|
||||
bounded 30 docker system df -v 2>&1
|
||||
|
||||
section daemon_json
|
||||
cat /etc/docker/daemon.json 2>/dev/null || echo '(absent)'
|
||||
@@ -49,10 +54,12 @@ section journal
|
||||
journalctl --disk-usage 2>&1
|
||||
|
||||
section du_home
|
||||
du -xm --max-depth=3 "$HOME" 2>/dev/null | sort -rn | head -40
|
||||
bounded 30 du -xm --max-depth=3 "$HOME" 2>/dev/null | sort -rn | head -40
|
||||
|
||||
section du_root
|
||||
du -xm --max-depth=2 / 2>/dev/null | sort -rn | head -40
|
||||
# Unprivileged, so /var/lib/docker is absent — probe-admin.sh sizes that. What it
|
||||
# does see matters anyway: the OS under /usr, and /var/log (779 MB, 2026-09-16).
|
||||
bounded 90 du -xm --max-depth=2 / 2>/dev/null | sort -rn | head -40
|
||||
|
||||
section registry_repos
|
||||
# The registry answers /v2/ anonymously (curl -> 200, 2026-09-14), so what is
|
||||
@@ -60,7 +67,7 @@ section registry_repos
|
||||
wd=$(docker inspect --format '{{index .Config.Labels "com.docker.compose.project.working_dir"}}' registry 2>/dev/null)
|
||||
r="${wd:-$HOME/ppl/gateway}/registry-data/docker/registry/v2/repositories"
|
||||
if [ -d "$r" ]; then
|
||||
find "$r" -type d -name _manifests -prune -print 2>/dev/null | while read -r m; do
|
||||
timeout 30 find "$r" -type d -name _manifests -prune -print 2>/dev/null | while read -r m; do
|
||||
repo=${m%/_manifests}; repo=${repo#"$r"/}
|
||||
newest=$(find "$m" -type f -printf '%TY-%Tm-%Td\n' 2>/dev/null | sort | tail -1)
|
||||
tags=$(ls "$m/tags" 2>/dev/null | wc -l)
|
||||
|
||||
Reference in New Issue
Block a user