About Killing php processes in linux

Source: Internet
Author: User
Tags pkill
: 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.