linux下查看php-fpm是否已经启动

环境 linux、centos7.x、php5.6

问:如何查看linux下是否启动了php-fpm服务?

答:ps -aux | grep php

1
2
3
[me@VM_0_14_centos application]# ps -aux | grep php
root 3072 0.0 0.0 112708 980 pts/1 R+ 12:26 0:00 grep --color=auto php
[me@VM_0_14_centos application]#

这代表了php-fpm没有启动


1
2
3
4
5
6
7
8
9
10
[me@localhost ~]# ps aux | grep php
root 6035 0.0 0.0 112708 984 pts/0 S+ 12:12 0:00 grep --color=auto php
root 9235 0.0 0.2 491876 23716 ? Ss 2019 42:05 php-fpm: master process (/etc/php-fpm.conf)
apache 9236 0.0 0.7 605100 56148 ? S 2019 23:34 php-fpm: pool www
apache 9237 0.0 0.8 620392 70508 ? S 2019 22:58 php-fpm: pool www
apache 9238 0.0 0.6 604492 54880 ? S 2019 19:50 php-fpm: pool www
apache 9239 0.0 0.9 621884 74552 ? S 2019 20:50 php-fpm: pool www
apache 9240 0.0 0.9 621148 72980 ? S 2019 20:29 php-fpm: pool www
apache 9241 0.0 1.0 630396 81216 ? S 2019 22:59 php-fpm: pool www
apache 9350 0.0 0.9 621792 73156 ? S 2019 24:12 php-fpm: pool www

这代表了php-fpm服务已经启动

坚持原创技术分享,谢谢鼓励我继续创作!