Linux 下 显示僵尸进程

#!/bin/bash
processes=$(ps ax -o user,pid,ppid,pgid,args,stat,start,time)
zombies=$(echo -e "${processes}" | grep -E "\s(Z|z|Z.*)\s")
if [ $? == 1 ]; then
  echo "no zombie processes exists on machine"
else
  echo -e "${processes}" | head -1
  echo "$zombies"
fi

本脚本来自腾讯云

厂家CPU内存硬盘流量价格购买链接
Vultr11GB25GB-SSD1000GB/mUSD $5/m购买
RamNode11GB25GB-SSD500GB/mUSD $5购买
Linode11GB25GB-SSD1000GB/mUSD $5购买
腾讯云Qcloud22GB50GB-SSD购买
DigitalOcean11GB25GB-SSD1000GB/mUSD $5/m购买

已发布

分类

作者:

标签

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注