Last active
March 29, 2016 07:23
-
-
Save kurozumi/be700c05aae561f7bb87 to your computer and use it in GitHub Desktop.
【シェルスクリプト】ゾンビ化したXvfbプロセスが見つかったたらkillする方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 親プロセスID(PPID)が1のXvfbプロセスが見つかったらkillする | |
isZombie=`ps -ef | grep -v grep | grep Xvfb | awk '$3==1' | wc -l` | |
if [ $isZombie -gt 0 ];then | |
kill `ps -ef | grep -v grep | grep Xvfb | awk '$3==1' | awk '{print $2;}'` | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment