1. How do I kill all the PHP processes in Linux?
[Wz@supportserver-51 jd]$ Ps-ef | grep pure-ftpd | Grep-v grep | awk ' {print $ ' "$ $} ' | 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/YEWU)
(WD now:/USR/LOCAL/WEBDATA/JOB/JD)
[7] killed PHP test1.php >> 1.txt (wd:/USR/LOCAL/WEBDATA/YEWU/YEWU)
(WD now:/USR/LOCAL/WEBDATA/JOB/JD)
[8] killed PHP dingdan_money.php >> jd.csv
[9] killed PHP dingdan_money.php >> jd.log
[Killed] php dingdan_money.php >> jd.log
[One] killed PHP dingdan_money.php >> jd.log 2>&1
[Killed] php dingdan_money.php >> jd.log
[Killed] php dingdan_money.php > Jd.log
[Killed] php-q dingdan_money.php >> jd.log
[Killed] php-f dingdan_money.php >> jd.log
[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 19:29 pts/0 00:00:00 php dingdan_money.php
Root 7901 6690 0 19:36 pts/0 00:00:00 sudo php dingdan_money.php
Root 7902 7901 0 19:36 pts/0 00:00:00 php dingdan_money.php
WZ 12713 6690 0 20:10 pts/0 00:00:00 grep php
[18]+ killed PHP dingdan_money.php >> jd.log
2. Workarounds for PHP scripts that always hang when they are run:
[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 20:04 dingdan_money.php
-RWXRWXRWX 1 tuangouadmin Ops 3845934 Dec 20:14 jd.log
[2]+ Stopped php dingdan_money.php >> jd.log
[wz@supportserver-51 jd]$ php dingdan_money.php >> jd.log</dev/null&
can use </dev/null to solve, the specific reason is unknown.
The above describes the killing of Linux in the PHP process, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.