程服务器负载异常处理

1、内存告警

[root@localhost eversec]# free -m
             total       used       free     shared    buffers     cached
Mem:         32072      31873        199          0        129         90
-/+ buffers/cache:      31653        419
Swap:        16103       3519      12584

2、查看负载:

[root@localhost eversec]# uptime
15:00:46 up 89 days, 54 min,  1 user,  load average: 4880.43, 4872.78, 4852.09

3、top:

[root@localhost eversec]# top

top - 15:00:46 up 89 days, 54 min,  1 user,  load average: 4880.43, 4872.78, 4852.09
Tasks: 15719 total,   1 running, 15717 sleeping,   1 stopped,   0 zombie
Cpu(s):  0.2%us,  0.4%sy,  0.0%ni, 95.4%id,  4.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  32842712k total, 31825648k used,  1017064k free,   138396k buffers
Swap: 16490488k total,  2988636k used, 13501852k free,   107888k cached

4、pstree

[root@localhost eversec]# pstree
init─┬─auditd───{auditd}
     ├─crond───5111*[crond───sendmail───postdrop]
     ├─master─┬─3*[cleanup]
     │        ├─pickup
     │        └─qmgr
     ├─6*[mingetty]
     ├─newiup───61*[{newiup}]
     ├─rsyslogd───3*[{rsyslogd}]
     ├─sshd───sshd───sshd───enable───su───bash─┬─pstree
     │                                         └─vmstat
     └─udevd───2*[udevd]

 5、df -i 查看为inodes空间满

 6、关闭sendmail进程

 7、清除占用inodes的垃圾文件,服务器恢复正常

# 1、确定是某个目录下面:
for i in /*; do echo -ne $i"\t"; find $i | wc -l; done

# 2、若是/var/spool:
for i in /var/spool/*; do echo $i; find $i | wc -l; done

# 3、找到相应目录后,进行删除操作:
ls | xargs -n 10 rm -rf

 

转载于:https://www.cnblogs.com/pzzning/p/8609884.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值