|
大家好啊,从网站的服务器上下载了www.abc.com_nginx.log
% L1 x* A: x6 N: x- e/ Q, m
: @: \& g' f8 b$ I* a" E想看看log数据。
: O& V2 P8 D/ Y% H( g. p1 q
$ F% m. p$ |6 l) Z但是数据比较分散、杂乱:
) |7 d/ Z. b5 X7 H+ p' W! ~! f/ L7 w/ e5 L7 b% v. l6 `& y: k) o
203.208.60.10 - - [10/Aug/2019:06:25:06 +0800] "GET /pba.html HTTP/1.1" 200 17416 "-" "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"2 p" z; R4 J4 d6 `8 v
123.125.71.105 - - [10/Aug/2019:06:25:09 +0800] "GET /tag/forty-seven HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Linux;u;Android 4.2.2;zh-cn;) AppleWebKit/534.46 (KHTML,like Gecko) Version/5.1 Mobile Safari/10600.6.3 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"% x8 y0 M, ] A" S
123.125.71.32 - - [10/Aug/2019:06:25:10 +0800] "GET /tag/forty-seven/ HTTP/1.1" 200 36940 "-" "Mozilla/5.0 (Linux;u;Android 4.2.2;zh-cn;) AppleWebKit/534.46 (KHTML,like Gecko) Version/5.1 Mobile Safari/10600.6.3 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"( |9 N" E: P; `" c7 M
203.208.60.124 - - [10/Aug/2019:06:25:10 +0800] "GET /cari.html HTTP/1.1" 200 13978 "-" "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
3 D. w: { r$ v- }. i% |185.86.164.102 - - [10/Aug/2019:06:25:13 +0800] "GET /wp-login.php HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
3 E. c2 o$ C5 `: H* B' {" s( ~203.208.60.105 - - [10/Aug/2019:06:25:14 +0800] / x: U* `9 i5 `3 P
& [3 n. E" n8 {5 ?4 |: A
# p! B6 Q) y2 ~* w上面这种数据有几十M,我想按IP统计下,按照每个IP访问次数多少从高到低排列,并且显示每个IP访问的次数,要怎么弄呢?' F1 z, {4 T; U# Y7 p8 V: M
7 V) V, t6 U* S4 Q: w, h我之前见过别人的,但是不知道怎么弄?用notepad++还是excel统计呢?* b' C4 f# a& D( N
& j. H4 _/ c, l( h谢谢!@_@
+ a, C5 R1 s. J% _; Q
4 |$ D9 q- u: Q+ \0 x. y9 z% Q0 }4 I2 }) m5 Z
|
|