vi /usr/local/php/etc/php-fpm.conf
放在 <workers> 里面
<!– by evan–>
<value name=”request_slowlog_timeout”>1s</value>
<value name=”slowlog”>/data/log/slow.logs</value>
 
mysql slowlog
Server version: 5.1.51 FRG DB Server (GPL)
 
vi /etc/my.cnf
log-slow-queries = /data/log/mysql-slow.log
或者用下面这个方面
mysql> show variables like ‘%slow%’;
+——————+——-+
| Variable_name | Value |
+——————+——-+
| log_slow_queries | ON |
| slow_launch_time | 2 |
+——————+——-+
2 rows in set (0.00 sec)
mysql>show variables like ‘%log%’;
mysql>set global slow_launch_time=1
mysql>set global log_output=file;
mysql>set global log_slow_queries=ON;