berth updates
This commit is contained in:
17
berth/ctrl/remote/probe-admin.sh
Normal file
17
berth/ctrl/remote/probe-admin.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
# Read-only probe of what only root can size (`ssh $HOST_ADMIN`, sudo).
|
||||
#
|
||||
# Separate from probe.sh on purpose: INDEX §7 — the admin alias only where sudo
|
||||
# is genuinely required. It is here: /var/lib/docker is root-only, so without
|
||||
# this a container's json log — the classic way a small disk fills — has no size.
|
||||
# Sizes only. Nothing is read out of any file.
|
||||
set -u
|
||||
section() { printf '\n### %s\n' "$1"; }
|
||||
|
||||
section admin_docker_dirs
|
||||
sudo -n du -xm --max-depth=1 /var/lib/docker 2>&1 | sort -rn | head -20
|
||||
|
||||
section admin_container_logs
|
||||
sudo -n sh -c 'du -m /var/lib/docker/containers/*/*-json.log 2>/dev/null' | sort -rn | head -20
|
||||
|
||||
section admin_volumes
|
||||
sudo -n du -xm --max-depth=1 /var/lib/docker/volumes 2>&1 | sort -rn | head -20
|
||||
Reference in New Issue
Block a user