PHP-FPM workers handle PHP requests for websites. This guide explains how a server administrator can list and count the workers owned by a cPanel account when investigating slow or queued requests.
Check one account
Connect to the server over SSH with permission to inspect its processes. Replace exampleuser with the actual cPanel username:
account_user='exampleuser'
ps -u "$account_user" -o pid=,etime=,args= | grep '[p]hp-fpm: pool'The columns show the process ID, elapsed time and command. To count matching workers at that moment:
ps -u "$account_user" -o args= | grep -c '[p]hp-fpm: pool'Zero means no matching worker was found at that moment, not necessarily that PHP-FPM is disabled.
Check all cPanel accounts
As a server administrator, extract the unique account names from cPanel’s domain-owner file and inspect each:
awk -F': ' '{print $2}' /etc/trueuserdomains | sort -u |
while IFS= read -r account_user; do
[ -n "$account_user" ] || continue
printf '\nAccount: %s\n' "$account_user"
ps -u "$account_user" -o pid=,etime=,args= | grep '[p]hp-fpm: pool'
doneTo report counts instead, replace the ps line and its filter with the count command above.
Interpret the results
One account can own several domain pools. Its total worker count does not show whether an individual pool has reached pm.max_children. Compare each pool’s configuration with its PHP-FPM error log and demand over time before changing limits. Raising limits without checking memory can exhaust the server’s RAM.