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

php-fpm慢查询日志分析

WBOY
WBOYOriginal
2016-06-23 13:42:041509browse

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行数据


Statement:
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