机器经常死机(停了服务),大家有什么办法,来指导一下
死机的主要原因是 swapfree 变成了 0,原来这是 4G 的,但运行一段时间,可能一个星期或者半个月或者更长时间,就会变成 0 了,再之后就会停了 http vsftp ssh 等服务,但 ping 依然是正常的!
shell> more /proc/meminfo
MemTotal: 2054240 kB
MemFree: 92728 kB
Buffers: 14984 kB
Cached: 1363852 kB
SwapCached: 0 kB
Active: 1227868 kB
Inactive: 534152 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 2054240 kB
LowFree: 92728 kB
SwapTotal: 4096564 kB
SwapFree: 4096564 kB
Dirty: 204528 kB
Writeback: 0 kB
Mapped: 396748 kB
Slab: 131124 kB
Committed_AS: 1714512 kB
PageTables: 50544 kB
VmallocTotal: 536870911 kB
VmallocUsed: 265536 kB
VmallocChunk: 536604831 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 2048 kB
使用 top 显示信息:
shell > top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7423 apache 16 0 175m 15m 9216 S 4.0 0.8 0:00.56 httpd
7410 apache 15 0 175m 16m 9296 S 1.0 0.8 0:00.46 httpd
7467 apache 16 0 174m 14m 9260 S 1.0 0.7 0:00.23 httpd
7315 apache 15 0 173m 14m 9028 S 0.7 0.7 0:00.60 httpd
7317 apache 16 0 175m 15m 9280 S 0.7 0.8 0:00.68 httpd
7319 apa