在 Debian 系统中,**进程占用过高(CPU / 内存 / IO)**通常由以下几类原因引起,你可以对照排查:
查看方式:
top
htop
ps aux --sort=-%cpu | head
排查:
netstat -antup
ss -antup
ls -l /proc/<PID>/exe
top
# 看是否有 kworker / ksoftirqd
dmesg | tail
free -h
ps aux --sort=-%mem | head
Linux 会利用空闲内存做 cache:
free -h
# available 才是真正可用内存
swapon -s
vmstat 1
iotop
du -sh /var/log/*
dmesg | grep error
smartctl -a /dev/sda
常见问题服务:
apt / dpkg 卡死systemd 异常rsyslog 循环写日志systemctl status <service>
journalctl -xe
top
# 找出高占用 PID
ls -l /proc/<PID>/exe
cat /proc/<PID>/cmdline
大概率是:
df -h
crontab -l
ls /etc/cron.*
如果你愿意,可以告诉我:
top 里占用最高的进程名我可以帮你精准分析。