alrcatraz/astra-sre/server-health-audit
Claude Code and agent skill by alrcatraz/astra-sre
- community
Checking that the SKILL.md file is still in the repository.
Systematic procedure for checking the health of any Linux server. Use this for periodic check-ins, performance investigations, or pre/post-maintenance verification.
Install
npx vskill@latest install alrcatraz/astra-sre/server-health-auditSKILL.md
The same SKILL.md was published earlier as alrcatraz/astra-sre/server-health-audit.
Server Health Audit
Systematic procedure for checking the health of any Linux server. Use this for periodic check-ins, performance investigations, or pre/post-maintenance verification.
Methodology — Bottom-Up Layers
Work through these in order (dependency-first).
0. Establish Who Owns the Evidence Before Reading Any Log
⚠️ A clean server-side log does not mean the server is healthy for that client — it may mean the server never learned anything was wrong. When the user reports a symptom in a client (a desktop app, a remote machine that dials in), work out which end holds the evidence first. Reading only the server's logs and finding them green is a half-diagnosis, not a diagnosis.
- Ask which client and from where. "My desktop keeps doing X" is not
enough — get the hostname or source IPs. The fix and the logs both live on the client side. Conversely, a server log showing connection accepted is not delivery confirmation.
- **Confirm which transport actually carries the traffic — do not infer it
from which daemons are running. A host commonly runs several overlay/VPN clients at once (EasyTier, NetBird, ZeroTier, Tailscale) and only one carries a given flow: ```bash getent hosts <target-host> # what does the client resolve it to? ip route get <target-ip> # which interface actually carries it? ``` Zero counters on an overlay that is not** in the path are expected, not a fault. Reporting them as a broken link is a false positive — confirm the interface before concluding anything about the link.
- Distinguish "no error" from "no evidence". A transport that only logs
session establishment looks perfectly healthy while individual messages are lost. When the server says status=complete but the user says the result never arrived, the missing evidence is downstream — go to the client.
- Read the client log for the reported minute, in the client's timezone.
Daemon logs are frequently UTC while the human reports local time; convert before concluding "nothing happened then".
- Attribute errors to a connection scope before counting them. A client
with several configured backends/profiles emits failures for all of them, including ones not in use. An error line with no scope prefix usually belongs to the active backend; one naming another profile is often noise. Counting errors without reading their scope yields a confident, wrong root cause.
Resource contention masquerading as an application bug
A single-process server (one HTTP/WS event loop) competing for CPU with a heavy local job (compiler, indexer, training run) delivers partially: streamed content goes out over the already-open connection while the confirming/finalising request queues behind the job and blows the client's timeout. The client then discards unconfirmed output — which the user experiences as "it appeared and then vanished". Before blaming the application, check host load and who is consuming it:
A heavy build overlapping the incident window is a first-class hypothesis, and the remedy is scheduling (move the job off the serving host, or nice / limit its parallelism), not a code change. This bites hardest on low-core hosts, where one saturated core starves the event loop of the rest.
📎references/priority-and-resource-bounds.md— the remedy: raising aservice withCPUWeight(and whyNice=-10is silently ignored on anunprivileged user unit), bounding bulk jobs with asystemd-run --user --scopewrapper, theMemorySwapMaxbound that actually protects resident services,and how to verify a scheduler setting took effect rather than merely being set.
⚠️ Read load average against swap before concluding "CPU was the problem". A load below nproc with a single hot process rules CPU out as the cause of a multi-second stall. The far more common culprit for a long-running process timing out under a heavy job is exhausted swap — once swap nears full, any allocation blocks on reclaim, which presents as a stall that looks like CPU starvation but leaves the load average unremarkable. Diagnose the two apart:
| Reading | Meaning | |
|---|---|---|
load > nproc and one process pegged | 🚨 Genuine CPU saturation | |
load < nproc, SwapFree near 0, long-running RSS-heavy process | 🚨 Memory reclaim stall — the real cause despite low load | |
| Both | Both contribute; fix memory first, it dominates the tail latency |
Long-lived application processes accumulate the problem: a server up for days serving very long sessions (hundreds of turns, 100K+ token contexts) holds memory that fragments, so the margin to swap exhaustion shrinks over time. Corroborate with ss -tnp for connection counts, not just CPU.
Process liveness: zombies & self-matching probes
Full incident case study:references/ps-selfmatch-vnc-watcher.md(camofox VNC watcher, 2026-08-03) — ps|awk matching its own command line,stale X-socket cleanup, port-based liveness,podman execprobe pollution.
kill -0 <pid>returns success for zombie (defunct) processes — a dead
service whose child was never reaped passes pid-based checks. Liveness proof must come from observable state: listening port (ss -tln), socket, or actual I/O — never process presence alone.
ps | grep/awk <pattern>can match its own cmdline: the probe process
appears in the listing and its args contain the searched tokens (binary name, display number, resolution, port). A watcher/monitor can then believe a dead service is alive and skip restart/cleanup forever (camofox vnc-watcher 104 saga, 2026-08). For probes use pgrep -af (self-excluding); in scripts filter first: ps -eo stat=,args= | grep -v 'awk'.
- Both traps compound: zombie + self-match = monitor sees "alive" while the
port is down. Always verify with the actual endpoint when a monitor says OK but users report failures.
📎 Reference data:references/multi-machine-memory-baseline.mdhas livecalibration numbers for the user's fleet — use as sanity check when assessingan unfamiliar machine in the same class.
1. System Basics
Load Average Interpretation:
| Pattern | Meaning | |
|---|---|---|
1min > 5min > 15min | 📈 Rising — recent activity spike | |
1min < 5min < 15min | 📉 Falling — past peak, recovering | |
| All ≈ equal | ⚖️ Steady state | |
| All high (>> cores) | 🔥 Persistent overload — investigate root |
Common pitfalls:
- Load ≠ CPU usage — high load + idle CPU = processes stuck on I/O (disk/network/locks)
- On 1-core systems, load > 1 means immediate queuing. On 8-core, load 4 is comfortable.
- Routers can have legitimately higher load due to network softIRQ overhead (→
references/busybox-diagnostics.md)
2. Memory & Swap Pressure
Common memory hogs on Hermes systems: orphaned MCP subprocesses, containers with no limits, accumulated kanban worker processes, desktop processes.
⚠️ Swap usage ALONE is a poor pressure signal — "high" swap ≠ memory pressure. A swap device can sit 90%+ full while the system is perfectly healthy. The decisive question is MemAvailable (from free -m / /proc/meminfo:
| Condition | Meaning | |
|---|---|---|
| Swap high (>80%) AND MemAvailable low (<~1GB) | 🚨 Real pressure — investigate | |
| Swap high (>80%) AND MemAvailable ample (>~4GB) | ✅ Benign zombie residue — NOT a fault |
Benign zombie swap (verified on DS425Plus, 2026-08): swap was 93% full (1910/2047MB) but MemAvailable was 4.5GB and used RAM only 1.16GB. Root cause: a historical memory peak (e.g. office/document suite cold loads) paged ~1.9GB of cold pages out; the kernel is not under pressure so it never reclaims them, leaving "ownerless" swapped pages idle forever. This is normal Linux behaviour.
How to prove it's residue, not pressure (run these before concluding):
If VmSwap total is far below the swap device usage AND SwapFree is static AND MemAvailable is healthy → benign, document as Watch, do not chase a leak. For a Synology DSM-specific replay see references/synology-dsm-notes.md.
Watchdog-design corollary: an alert that keys on swap usage alone fires forever on zombie residue. Gate it on swap high AND MemAvailable low (e.g. swap >1600MB && available <1024MB) so it only fires under genuine pressure.
📎references/swap-zombie-residue-diagnosis.md— full DS425Plus case study:concrete numbers, the VmSwap-ΔSwapFree-ΔMemAvailable proof sequence, and thenas_watch.shthreshold fix.
🟢 Optane PMem on Xeon servers? →linux-host-admin→references/hardware/intel-optane-pmem/(free -hshowing far less than expected is normal — reboot needed to apply goal).→references/ipmi-diagnostics-notes.mdfor IPMI/BMC tool checks.
3. Process Audit — Detect Leaks
Leak heuristic: 3+ instances of the same MCP server, oldest >1 hour → leaking. Prevention: Prefer uvx over npx for MCP commands (simpler process tree).
Redundant proxy daemons after migration: If xray + mihomo both running after a proxy stack swap, one is likely idle. Check FD count and RSS to identify, then kill.
→astra-sre-proxy-daemonfor full proxy lifecycle.
4. Services Check
AlmaLinux ghost failures: cloud-init*, mcelog, tuned may fail once at first boot on VM images with no operational impact. Disable + reset-failed to clean up the list.
5. Network & Listening Ports
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingreferences/routine/server-health-audit/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alrcatraz/astra-sre/server-health-audit)