1 统计本日志文件的总pv、uv
2 列出全天每小时的pv、uv数
3 列出top 10 uv的IP地址,以及每个ip的pv点击数
4 列出top 10 访问量最多的页面及每个页面的访问量
5 列出访问来源的设备列表及每个设备的访问量
以下为部分日志文件:
122.71.241.175 - - [15/Apr/2019:00:00:01 +0800] "GET /api/v1/affiches/ HTTP/1.1" 200 24 "https://m.luffycity.com/home" "Mozilla/5.0 (Linux; Android 8.1.0; MI 6X Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.3 baiduboxapp/11.3.0.13 (Baidu; P1 8.1.0)"
122.71.241.175 - - [15/Apr/2019:00:00:04 +0800] "GET /api/v1/course_sub/category/list/ HTTP/1.1" 200 413 "https://m.luffycity.com/courses" "Mozilla/5.0 (Linux; Android 8.1.0; MI 6X Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.3 baiduboxapp/11.3.0.13 (Baidu; P1 8.1.0)"
106.121.76.134 - - [15/Apr/2019:00:00:05 +0800] "GET /api/v1/course/71/sections/ HTTP/1.1" 200 601 "https://m.luffycity.com/courses/71/common-problems" "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1"
122.71.241.175 - - [15/Apr/2019:00:00:05 +0800] "GET /api/v1/courses?sub_category=2&ordering=%27%27 HTTP/1.1" 301 0 "https://m.luffycity.com/courses" "Mozilla/5.0 (Linux; Android 8.1.0; MI 6X Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.3 baiduboxapp/11.3.0.13 (Baidu; P1 8.1.0)"
122.71.241.175 - - [15/Apr/2019:00:00:09 +0800] "GET /api/v1/courses/?sub_category=4&ordering=%27%27 HTTP/1.1" 200 1605 "https://m.luffycity.com/courses" "Mozilla/5.0 (Linux; Android 8.1.0; MI 6X Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.3 baiduboxapp/11.3.0.13 (Baidu; P1 8.1.0)"
122.71.241.175 - - [15/Apr/2019:00:00:14 +0800] "GET /api/v1/courses/?sub_category=7&ordering=%27%27 HTTP/1.1" 200 695 "https://m.luffycity.com/courses" "Mozilla/5.0 (Linux; Android 8.1.0; MI 6X Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.3 baiduboxapp/11.3.0.13 (Baidu; P1 8.1.0)"
106.121.76.134 - - [15/Apr/2019:00:00:27 +0800] "GET /api/v1/course/71/right/ HTTP/1.1" 200 750 "https://m.luffycity.com/courses/71/details-introduce" "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1"
122.71.241.175 - - [15/Apr/2019:00:00:32 +0800] "GET /api/v1/courses/?sub_category=9&ordering=%27%27 HTTP/1.1" 200 692 "https://m.luffycity.com/courses" "Mozilla/5.0 (Linux; Android 8.1.0; MI 6X Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.3 baiduboxapp/11.3.0.13 (Baidu; P1 8.1.0)"
122.71.241.175 - - [15/Apr/2019:00:00:36 +0800] "GET /api/v1/courses/?sub_category=10&ordering=%27%27 HTTP/1.1" 200 715 "https://m.luffycity.com/courses" "Mozilla/5.0 (Linux; Android 8.1.0; MI 6X Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.3 baiduboxapp/11.3.0.13 (Baidu; P1 8.1.0)"
106.121.76.134 - - [15/Apr/2019:00:01:00 +0800] "GET /api/v1/nation/ HTTP/1.1" 200 1586 "https://m.luffycity.com/signup" "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1"