Command for restarting and terminating php-fpm in php5.4

Source: Internet
Author: User
The restart and termination commands of php-fpm in php5.4 are as follows:

View the php running Directory command: which php
/Usr/bin/php

View the number of php-fpm processes:
Ps aux | grep-c php-fpm

View running memory
/Usr/bin/php-I | grep mem

Restart php-fpm
/Etc/init. d/php-fpm restart

The php configuration is displayed in the output of phpinfo.
Loaded Configuration File/etc/php. ini

====================================

First you need to find the php-fpm.conf configuration file, view the pid configuration path (not the installation path), and then change the corresponding place below to normal execution.

[Root @ DO-SG-H1 ~] # Ps aux | grep php-fpm
Root 11799 0.0 0.0 103248 880 pts/0 S + grep -- color php-fpm
Root 11973 0.0 0.0 417748 964? Ss Jun01 php-fpm: master process (/etc/php-fpm.conf)

Cat/etc/php-fpm.conf
See
Pid =/var/run/php-fpm/php-fpm.pid.

Php-fpm startup:
/Usr/local/php/sbin/php-fpm
Disable php-fpm:
Kill-INT 'cat/var/run/php-fpm/php-fpm.pid'
Php-fpm restart:
Kill-USR2 'cat/var/run/php-fpm/php-fpm.pid'

View the number of php-fpm processes:
Ps aux | grep-c php-fpm

==================================

[Root @ DO-SG-H1 ~] # Find/-name 'php-fpm'-type d
/Var/log/php-fpm
/Var/run/php-fpm

The path found by the find command is incorrect.

Which php
/Usr/bin/php

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.