全部 #linux apache nginx awk '{a[$1]=a[$1]+$10}END{for(i in a)print a[i]/1024/1024"MB",i}' access.log|sort -nr ip_tarffic_bbs.linuxtone.org.20110114 #iis awk '{a[$7]=a[$7]+$NF}END{for(i in a)print a[i]/1024/1024"MB",i}' access.log|sort -nr
全部
- #linux apache nginx
- awk '{a[$1]=a[$1]+$10}END{for(i in a)print
a[i]/1024/1024"MB",i}' access.log|sort -nr
>ip_tarffic_bbs.linuxtone.org.20110114
- #iis
- awk '{a[$7]=a[$7]+$NF}END{for(i in a)print
a[i]/1024/1024"MB",i}' access.log|sort -nr
>ip_tarffic_bbs.linuxtone.org.20110114
特定时间段
- #linux apache nginx
- sed -n
'/\[13\/Jan\/2011\:16\:00\:00/,/\[13\/Jan\/2011\:19\:00\:00/p'
access.log|awk '{a[$1]=a[$1]+$10}END{for(i in
a)print a[i]/1024/1024"MB",i}' |sort -nr
>ip_tarffic_bbs.linuxtone.org.20110114_16-18
- #iis
- sed -n '/16\:00\:00/,/19\:00\:00/p'
access.log|awk '{a[$7]=a[$7]+$NF}END{for(i in
a)print a[i]/1024/1024"MB",i}' |sort -nr
>ip_tarffic_bbs.linuxtone.org.20110114_16-18
统计应用访问量
#linux apache nginx
awk '{print $7}' access.log |sort|uniq -c|sort -nr|head -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