1、查看php-fpm进程数量
ps -ef |grep "php-fpm"|grep "pool"|wc -l
2、查看每个php-fpm进程占用内存
ps -ylC php-fpm --sort:rss
3、查看php-fpm平均内存占用
ps --no-headers -o "rss,cmd" -C php-fpm | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
4、查看单个php-fpm进程消耗内存明细
pmap $(pgrep php-fpm) | less