统计nginx记录某个站点日志
awk '{print $1}' /usr/local/nginx/log/nginx.access.log |sort -n |uniq -c |sort -nr |head -20 |awk '{print $2}'
统计所报500错误的次数
#根据状态码,awk '$8=="500"' /usr/local/nginx/log/nginx.access.log |wc -l
统计nginx记录某个站点日志
awk '{print $1}' /usr/local/nginx/log/nginx.access.log |sort -n |uniq -c |sort -nr |head -20 |awk '{print $2}'
统计所报500错误的次数
#根据状态码,awk '$8=="500"' /usr/local/nginx/log/nginx.access.log |wc -l