php如何杀死进程,关于杀掉linux中的php进程

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教程有兴趣的朋友有所帮助。

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值