วันจันทร์ที่ 28 เมษายน พ.ศ. 2551

shell script command zombie process.

zombie process คือ process ที่ไม่มีการทำงานแล้ว แต่ยังคงค้างในระบบ kill ธรรมดานั้น อย่าหวัง

script for show zombie process.
$ ps aux  awk '{ print $8 " " $2 }'  grep -w Z
-show.

Z 12345
<< Exam. process id and Z declare zombie process. -type of process have by under. R=running.
S=sleeping or stoped.
Z=zombie.

script for kill zombie process.
$ kill -9 `ps -A -ostat,ppid,pid,cmd  grep -e '^[Zz]'  awk '{print $2}'`

ไม่มีความคิดเห็น: