统计访问最多的ip

1. tail -n 10000 xxaccess_log | cut -d " " -f 1 |sort|uniq -c|sort -rn|head -10 |more

2.tail -n 10000 xx-access_log | awk '{print $1}'|sort|uniq -c|sort -rn|head -10 | more

统计访问最多的url

tail -n 10000 xx-access_log |awk '{print $7}'| sort|uniq -c| sort -rn| head -10 | more

指定ip统计访问最多的url
tail -n 1000 xx-access_log  | grep ‘00.00.00.00’|awk '{print $7}'| sort|uniq -c| sort -rn| head -10 | more
通过日志查看当天访问次数最多的时间段

tail -n 1000 xx-access_log | awk '{print $4}'|cut -c 14-21 |sort|uniq -c|sort -rn|head -10|more

分析nginx access log日志的命令的更多相关文章

  1. shell分析nginx access log日志

    统计访问最多的ip1. tail -n 10000 xxaccess_log | cut -d " " -f 1 |sort|uniq -c|sort -rn|head -10 | ...

  2. Nginx Access Log日志统计分析常用命令

    Nginx Access Log日志统计分析常用命令 IP相关统计 统计IP访问量 awk '{print $1}' access.log | sort -n | uniq | wc -l 查看某一时 ...

  3. 转 Nginx Access Log日志统计分析常用命令

    Nginx Access Log日志统计分析常用命令Nginx Access Log日志统计分析常用命令IP相关统计 统计IP访问量 awk '{print $1}' access.log | sor ...

  4. elk收集分析nginx access日志

    elk收集分析nginx access日志 首先elk的搭建按照这篇文章使用elk+redis搭建nginx日志分析平台说的,使用redis的push和pop做队列,然后有个logstash_inde ...

  5. 利用logrotate切割nginx的access.log日志

    一.新建一个nginx的logrotate配置文件 /var/log/nginx/access.log { daily rotate compress delaycompress missingok ...

  6. [日志分析] Access Log 日志分析

    0x00.前言: 如何知道自己所在的公司或单位是否被入侵了?是没人来“黑”,还是因自身感知能力不足,暂时还没发现?入侵检测是每个安全运维人员都要面临的严峻挑战.安全无小事,一旦入侵成功,后果不堪设想. ...

  7. awk技巧 nginx access.log

    1.1 介绍 awk其名称得自于它的创始人 Alfred Aho .Peter Weinberger 和 Brian Kernighan 姓氏的首个字母.实际上 AWK 的确拥有自己的语言: AWK ...

  8. 使用mapreduce来分析网站的log日志

    近日,有人和我说分析log日志. 之前,就写过,但是忘了总结了,找了半天也没有找到,看了以后要将东西整理了. 无奈,在网上收拾,看到这个人写的,索性,就搬过来,待我找到我写的,在一块补充一下! 所有网 ...

  9. nginx access.log 忽略favicon.ico訪问记录的方法

    favicon.ico 文件是浏览器收藏网址时显示的图标,当第一次訪问页面时.浏览器会自己主动发起请求获取页面的favicon.ico文件.当/favicon.ico文件不存在时,服务器会记录404日 ...

随机推荐

  1. Spring 事务中 readOnly 的解释

      spring 中事务的PROPAGATION_REQUIRED,Readonly的解释  (2012-11-21 16:29:38) 转载▼ 标签:  杂谈                  一. ...

  2. n人比赛,可轮空,比赛轮数和场数

    #include<stdio.h> int chang(int x,int s){ ) return s; ) ; !=){ s+=(x-)/; )/,s); } else{ s+=x/; ...

  3. TUXEDO错误解决方案

    错误1: root@tfjus:/opt/tuxedo/simpapp# buildclient -f simpcl.c -o simpcl simpcl.c: In function 'main': ...

  4. CSS在不同浏览器兼容问题,margin偏移/offset溢出等

    margin在垂直取值时取最大值 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "h ...

  5. ASP.NET MVC 学习1、新增Controller,了解MVC运行机制

    1,turorial ,根据链接教程新建一个MVC项目 http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/ ...

  6. "xxxx".zip:这个压缩文件格式未知或者数据已经被损坏,打不开压缩文件,总出现这个提示的解决方法

    从网上下载了一些压缩文件,有时解压时会出现“这个压缩文件格式未知或者数据已经被损坏”或“未找到压缩文件”的提示. 造成的原因有两种: 一.网站上的压缩文件本来就是坏的. 1.你可以尝试可以使用WINR ...

  7. MongoDB入门分享-笔记整理精选

    最近在学习MongoDB,怕以后忘记,自己做了一个整理,给不知道的小伙伴一起分享学习一下. 第一步> 首先到官网下载,安装MongoDB.(注意MongoDB还有一个可视化管理工具叫: Mong ...

  8. 原创:js代码, 让dedecms支持Tag选择, 添加内容更为方便,不用手输Tag

    dedecms在编辑修改内容时,TAG标签需要手动输,中文的Tag, 中间还得用半角字符','分隔,  输入法切来切去很不方便,   于是动手改后台代码, 利用后台的tags_main.php, 让d ...

  9. Java [Leetcode 223]Rectangle Area

    题目描述: Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is def ...

  10. Java [leetcode 8] String to Integer (atoi)

    问题描述: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input ...