How to check apache_php_fpm status
Howdy,
In WHM terminal, how do I check the service status for apache_php_fpm?
I know that "service mysqld status" works for MySQL, so I tried "service apache_php_fpm status", but even though PHP-FPM was known to be working at the time, I got:
[root@server ~]# service apache_php_fpm status
Redirecting to /bin/systemctl status apache_php_fpm.service
● apache_php_fpm.service - Apache PHP-FPM services
Loaded: loaded (/etc/systemd/system/apache_php_fpm.service; static; vendor preset: disabled)
Active: inactive (dead)
[root@server ~]#
Thoughts? Thanks!
-
I know in cpanel if you click server information on the right sidebar all the status values are there if you scroll down. In WHM its under server status -> service status There is also an apache status
not sure with command line, sorry
I did find this
0 -
Is there something specific you're looking for? There isn't a "status" page like what "apachectl status" will show for PHP-FPM on the server.
0 -
Hey cPRex What I meant was, when I run "service mysqld status" in Terminal I get
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mysqld.service.d
└─limits.conf
Active: active (running) since Sat 2024-08-17 19:11:34 PDT; 1 day 19h ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 541 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 581 (mysqld)
Status: "Server is operational"
CGroup: /system.slice/mysqld.service
└─581 /usr/sbin/mysqldAnd when I run "service apache_php_fpm status" I get a similar output, but it says "inactive (dead)" (see initial post) though it's clearly running, since all my PHP-FPM sites are up, and I'm not getting email notices from WHM that it's down. (When it does supposedly go down and then get restored, I get email notifications.)
So I was just looking for the quickest way to verify that it's actually up. Thanks!
0 -
I didn't know the answer to this one either, so I reached out to one of our developers. The short version is that systemd doesn't manage the PHP-FPM processes, so it doesn't have a way to show a valid status. There is a note about this inside the service file:
# systemctl cat apache_php_fpm | head -4
# /etc/systemd/system/apache_php_fpm.service
#
# This systemd unit is a placeholder and should not be enabled nor used for
# management of Apache PHP-FPM processes.The best thing to do is just check processes with good ol' "ps aux" and see if things are running as they should.
0 -
Thanks. I just figured out I can use
systemctl list-units --type=service --state=running
That shows me
ea-php74-php-fpm.service loaded active running The PHP FastCGI Process Manager
ea-php81-php-fpm.service loaded active running The PHP FastCGI Process ManagerSo that should work!
Thanks!
0 -
That works too!
0
Please sign in to leave a comment.
Comments
6 comments