php-fpm开启慢查询日志

php-fpm.conf

/usr/local/php/etc/php-fpm.conf

开启慢查询日志

; The log file for slow requests
; Default Value: not set
; Note: slowlog is mandatory if request_slowlog_timeout is set
slowlog = /usr/local/php/log/php-fpm-slowlog.log ; The timeout for serving a single request after which a PHP backtrace will be
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
request_slowlog_timeout = 1

查看进程

# ps -ef | grep  php
www 2825 30903 0 08:50 ? 00:02:47 php-fpm: pool www
www 4012 30903 0 13:02 ? 00:00:24 php-fpm: pool www
www 4692 30903 0 10:42 ? 00:01:28 php-fpm: pool www
www 6606 30903 0 13:15 ? 00:00:19 php-fpm: pool www
www 7716 30903 0 10:50 ? 00:01:22 php-fpm: pool www
www 8724 30903 0 10:54 ? 00:01:17 php-fpm: pool www
www 9336 30903 0 10:55 ? 00:01:19 php-fpm: pool www
www 10781 30903 0 13:36 ? 00:00:11 php-fpm: pool www
www 10975 30903 1 06:10 ? 00:05:03 php-fpm: pool www
www 15550 30903 0 09:29 ? 00:02:17 php-fpm: pool www
www 16899 30903 1 06:28 ? 00:04:52 php-fpm: pool www
root 17509 10147 0 14:15 pts/0 00:00:00 grep php
www 17793 30903 0 11:28 ? 00:01:02 php-fpm: pool www
www 17883 30903 0 09:37 ? 00:02:13 php-fpm: pool www
www 18711 30903 0 09:40 ? 00:02:12 php-fpm: pool www
www 19865 30903 0 11:36 ? 00:01:00 php-fpm: pool www
www 19947 30903 0 11:36 ? 00:00:55 php-fpm: pool www
www 21549 30903 0 09:50 ? 00:02:05 php-fpm: pool www
www 22299 30903 0 09:53 ? 00:02:01 php-fpm: pool www
www 23138 30903 0 11:53 ? 00:00:49 php-fpm: pool www
www 24023 30903 0 11:56 ? 00:00:47 php-fpm: pool www
www 24052 30903 0 11:56 ? 00:00:47 php-fpm: pool www
www 24313 30903 0 09:59 ? 00:01:58 php-fpm: pool www
www 25016 30903 0 12:00 ? 00:00:48 php-fpm: pool www
www 25339 30903 0 12:01 ? 00:00:46 php-fpm: pool www
www 26568 30903 0 10:08 ? 00:01:52 php-fpm: pool www
www 28173 30903 0 08:32 ? 00:03:07 php-fpm: pool www
www 28586 30903 0 10:14 ? 00:01:48 php-fpm: pool www
www 30012 30903 0 10:19 ? 00:01:44 php-fpm: pool www
www 30385 30903 0 12:23 ? 00:00:34 php-fpm: pool www
www 30388 30903 0 12:23 ? 00:00:35 php-fpm: pool www
www 30389 30903 0 12:23 ? 00:00:35 php-fpm: pool www
root 30903 1 0 Jan26 ? 00:04:09 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)
www 31681 30903 0 Apr14 ? 00:06:49 php-fpm: pool www

重启fpm

kill -USR2 30903
上一篇:基于Java语言的IO操作(文件复制)


下一篇:springboot 配置elasticsearch Java High Rest Client