LOG统计分析命令(持续更新)

1:vmstat3>out时间.txt

2:统计全天的请求

cataccess.20100330.log|egrep"POST"|egrep"sendXml"|awk'{print$1}'|awk'{total+=$1}END{printtotal}'

3:按小时统计请求

cataccess.20100329.log|egrep"POST"|egrep"sendXml"|awk'{print$4}'|awk-F':''{print$2}'|awk'{a[$1]++}END{for(iina)print

i,a[i]}'|sort-n

4:按IP的前16位统计

cataccess.log|awk'{print$1}'|awk-F'.''{print$1$2}'|awk'{a[$1]++}END{for(iina)printi,a[i]}'

5:流量统计

cat11.acc|awk-F'\t''{print$2":"$16}'|awk-F':''{print$1""$4}'|awk'{a[$1]+=$2}END{for(iina)printi,a[i]/1024/1024}'|sort-n

6:linux下的命令

tarcvfaa.taraa

tarxvfaa.tar

相关推荐