feat(perf): census platform-health sweep (inotify/daemons/pg) [#757]
Read-only: inotify limits vs live use, dockerd+containerd uptime, dockerd 24h err/warn count, pg too-many-clients. Only auto-fix is re-applying the #755-approved inotify sysctls on drift. Details: https://projects.knownelement.com/issues/757#note-1
This commit is contained in:
@@ -62,3 +62,19 @@ echo "== memcg OOM events, last 24h =="
|
||||
journalctl --since "-24 hours" --no-pager 2>/dev/null \
|
||||
| grep -i "memory cgroup out of memory" | tail -6
|
||||
echo "(count: $(journalctl --since '-24 hours' --no-pager 2>/dev/null | grep -ci 'memory cgroup out of memory'))"
|
||||
|
||||
echo "== platform health (report; inotify re-apply per #755 is the only auto-fix) =="
|
||||
printf 'inotify limits: instances %s, watches %s\n' \
|
||||
"$(cat /proc/sys/fs/inotify/max_user_instances)" \
|
||||
"$(cat /proc/sys/fs/inotify/max_user_watches)"
|
||||
inst=$(find /proc/[0-9]*/fd -lname 'anon_inode:inotify' 2>/dev/null | wc -l)
|
||||
watches=$(cat /proc/[0-9]*/fdinfo/* 2>/dev/null | grep -c '^inotify wd')
|
||||
printf 'inotify in use: %s instances, %s watches\n' "$inst" "$watches"
|
||||
for svc in docker containerd; do
|
||||
printf '%s up since: %s\n' "$svc" \
|
||||
"$(systemctl show -p ActiveEnterTimestamp --value "$svc" 2>/dev/null)"
|
||||
done
|
||||
printf 'dockerd err/warn lines 24h: %s\n' \
|
||||
"$(journalctl -u docker --since '-24 hours' --no-pager 2>/dev/null | grep -ciE 'error|fail')"
|
||||
printf 'pg too-many-clients 24h: %s\n' \
|
||||
"$(docker logs postgresql --since 24h 2>&1 | grep -c 'too many clients')"
|
||||
|
||||
Reference in New Issue
Block a user