Home > Backend Development > PHP Tutorial > php-fpm慢查询日志分析

php-fpm慢查询日志分析

WBOY
Release: 2016-06-23 13:42:04
Original
1546 people have browsed it

grep -v "^$" www.log.slow.tmp | cut -d " " -f 3,2 | sort | uniq -c | sort -k1,1nr | head -n 10

参数解释:

     sort:  对单词进行排序
     uniq -c:  显示唯一的行,并在每行行首加上本行在文件中出现的次数
     sort -k1,1nr:  按照第一个字段,数值排序,且为逆序
     head -10:  取前10行数据


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template