美文网首页linux
Linux僵尸进程排查

Linux僵尸进程排查

作者: SkTj | 来源:发表于2019-02-28 09:00 被阅读50次

    1、yum install -y htop iotop smem
    2、smem -k -s uss //查看进程使用的内存量
    smem -p -s uss //查看进程使用的内部百分比
    smem -u -k //查看每个用户使用的内存量
    smem -P ./perf -k //查看单个进程使用的内存量
    3、 ps aux|head -1;ps aux|sort -nr -k4|head -10 //获取内存使用最大的10个进程
    ps aux|head -1;ps aux|sort -nr -k3|head -10 //获取CPU使用最大的10个进程
    4、查找僵尸进程:ps -e -o stat,ppid,pid,cmd|grep -e '^[zZ]'
    5、杀死僵死进程:ps -e -o stat,ppid,pid,cmd|grep -e '^[zZ]'|awk '{print $2}'|xargs kill -9

    相关文章

      网友评论

        本文标题:Linux僵尸进程排查

        本文链接:https://www.haomeiwen.com/subject/vevcuqtx.html