關於殺掉linux中的php進程

來源:互聯網
上載者:User
1.關於如何kill掉linux中的所有php進程?

[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/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
[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 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.關於php指令碼運行時總是掛掉的解決辦法:

[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 20:04 dingdan_money.php
-rwxrwxrwx 1 tuangouadmin ops 3845934 Dec 22 20:14 jd.log
[2]+ Stopped php dingdan_money.php >> jd.log

[wz@supportserver-51 jd]$ php dingdan_money.php >> jd.log< /dev/null&

可以使用 < /dev/null 來解決,具體原因還未知。

以上就介紹了關於殺掉linux中的php進程,包括了方面的內容,希望對PHP教程有興趣的朋友有所協助。

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.