监控、排障与验证流程
发现影响 → 缩小范围 → 形成证据 → 恢复与调优 → 验证闭环。
判断依据
- 发现影响:成功率、P95/P99、流量。
- 缩小范围:时间、节点、接口、变更。
- 形成证据:基线 + 日志 + 指标 + 抓包。
注意事项
- 先止损;每次修改一个变量。
- 同负载复测;持续观察并回退。
- URL / PID / IFACE / CT / POD / NS 须替换。PSI 需内核支持;跟踪按需限范围。
读图提示
命令中的 PID、SERVICE、IFACE 等占位符需替换为实际值。图中的分隔符用于列出独立检查项;复制按钮已按单条命令整理。结合业务影响、基线和时间窗口判断。
图谱署名:老男孩教育-李导996 · v1.2 · 2026-10-22
发现影响 → 缩小范围 → 形成证据 → 恢复与调优 → 验证闭环。
从用户可见现象出发,分别验证 DNS、TLS 与依赖服务。
监控可用率、DNS/TLS 耗时、HTTP 错误率、P95/P99。
getent ahosts app.example.comcurl -v --connect-timeout 3 --max-time 10 URLcurl --resolve app.example.com:443:10.0.0.20 URL监控请求时延、5xx、线程/连接池、GC、慢 SQL。
systemctl status nginx --no-pagerjournalctl -u nginx --since "10 min ago"nginx -tnginx -Tss -lntptail -n 100 /var/log/nginx/error.logperf top -p PIDstrace -p PID -tt -T监控各核 us/sy/steal、运行队列、CPU PSI 与限额节流。
uptimempstat -P ALL 1 5pidstat -u -w 1 5top -H -p PIDvmstat 1 5cat /proc/pressure/cpu监控 MemAvailable、RSS、交换区换入换出、OOM、内存 PSI。
free -hvmstat 1 5pidstat -r 1 5ps aux --sort=-rsscat /proc/pressure/memoryjournalctl -k --since "10 min ago"监控空间/inode、IOPS/吞吐、await、队列、I/O PSI。
df -hTdf -ilsblk -fiostat -xz -y 1 5pidstat -d 1 5lsof +L1cat /proc/pressure/io监控带宽、丢包/错误、RTT、TCP 重传、连接/监听队列。
ip -br aip route get 10.0.0.20ip neighping -c 4 10.0.0.20nc -vz -w 3 10.0.0.20 443ss -sss -tinip -s linkethtool -S IFACE按应用、系统调用、内核子系统、驱动和硬件逐层观察。
核查容器状态、日志、目标资源组与实际限额。
docker stats --no-streamdocker logs --tail 100 CTdocker inspect CTkubectl top pod -n NSkubectl describe pod POD -n NSkubectl logs POD -n NS --tail=100kubectl logs POD -n NS --previous先保留现场,再决定深入方向。
uptimevmstat 1 5free -hdf -hTss -s同为“网站打不开”,证据决定排查分支。