Server reagiert nicht, Festplatte voll, Netzwerk funktioniert nicht. Hier sind 10 Befehle, die Sie retten.
1. df/du — Volle Festplatte¶
df -h du -sh /* 2>/dev/null | sort -rh | head -10 find / -xdev -type f -size +100M 2>/dev/null
2. ps/kill — Prozesse¶
ps aux –sort=-%mem | head -20 kill -9 $(pgrep -f “stuck_process”)
3. lsof — Wer hält eine Datei/einen Port?¶
lsof -i :8080 lsof +D /var/log
4. ss — Netzwerk¶
ss -tlnp ss -s
5. dmesg — Kernel-Logs¶
dmesg -T | tail -50 dmesg | grep -i “out of memory”
6. journalctl — systemd¶
journalctl -u nginx –since “1 hour ago” journalctl -p err -b journalctl –vacuum-size=500M
7. strace — Was macht ein Prozess?¶
strace -p 12345 strace -c -p 12345
8. iotop/iostat — I/O¶
iotop -o iostat -x 1
9. tcpdump¶
tcpdump -i eth0 port 80 tcpdump -w capture.pcap
10. Rettungsoperationen¶
mount -o remount,rw / echo s > /proc/sysrq-trigger
Merken Sie sich¶
In einer Krise systematisch diagnostizieren: Festplatte → Speicher → CPU → Netzwerk → Anwendung.