: This article describes how to kill the php process in linux. if you are interested in the PHP Tutorial, refer to it. 1. how can I kill all php processes in linux?
[Wz @ supportserver-51 jd] $ ps-ef | grep pure-ftpd | grep-v grep | awk '{print $2 "" $3}' | xargs kill-9 = pkill php
Kill: can't find process "="
Kill: can't find process "pkill"
[2] Killed php dingdan_money.php> jd.csv
[3] Killed php dingdan_money.php> jd.csv
[4] Killed php dingdan_money.php.bak> jd.csv
[5] Killed php dingdan_money.php> jd.csv
[6] Killed php test1.php (wd:/usr/local/webdata/yewu)
(Wd now:/usr/local/webdata/job/jd)
[7] Killed php test1.php> 1.txt (wd:/usr/local/webdata/yewu)
(Wd now:/usr/local/webdata/job/jd)
[8] Killed php dingdan_money.php> jd.csv
[9] Killed php dingdan_money.php> jd. log
[10] Killed php dingdan_money.php> jd. log
[11] Killed php dingdan_money.php> jd. log 2> & 1
[12] Killed php dingdan_money.php> jd. log
[13] Killed php dingdan_money.php> jd. log
[14] Killed php-q dingdan_money.php> jd. log
[15] Killed php-f dingdan_money.php> jd. log
[16] Killed php-q dingdan_money.php> jd. log
[17]-Killed php dingdan_money.php> jd. log
[Wz @ supportserver-51 jd] $ ps-ef | grep php
Root 6561 6549 0 00:00:00 pts/0 php dingdan_money.php
Root 7901 6690 0 00:00:00 pts/0 sudo php dingdan_money.php
Root 7902 7901 0 00:00:00 pts/0 php dingdan_money.php
Wz 12713 6690 0 00:00:00 pts/0 grep php
[18] + Killed php dingdan_money.php> jd. log
2. solutions to failures during php script running:
[Wz @ supportserver-51 jd] $ php dingdan_money.php> jd. log &
[2] 13340
[Wz @ supportserver-51 jd] $ ll
Total 3760
-Rwxrwxrwx 1 tuangouadmin ops 1524 Dec 22 dingdan_money.php
-Rwxrwxrwx 1 tuangouadmin ops 3845934 Dec 22 jd. log
[2] + Stopped php dingdan_money.php> jd. log
[Wz @ supportserver-51 jd] $ php dingdan_money.php> jd. log </dev/null &
You can use </dev/null to solve the problem. The reason is unknown.
The above describes how to kill the php process in linux, including some content, and hope to help those who are interested in the PHP Tutorial.