一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務器之家:專注于服務器技術及軟件下載分享
分類導航

云服務器|WEB服務器|FTP服務器|郵件服務器|虛擬主機|服務器安全|DNS服務器|服務器知識|Nginx|IIS|Tomcat|

服務器之家 - 服務器技術 - Nginx - 采用ngxtop實現nginx實時訪問數據統計

采用ngxtop實現nginx實時訪問數據統計

2019-10-21 14:36shichen2014 Nginx

這篇文章主要介紹了采用ngxtop實現nginx實時訪問數據統計,需要的朋友可以參考下

對于nginx的實時訪問數據統計可采用ngxtop實現監控web server的訪問情況 。ngxtop 允許你對 NGINX 的訪問日志 (access log) 進行實時解析, 并輸出類似 top 的有用信息。

ngxtop 是 python 腳本安裝包,需要python支持。

對于python的包和庫文件我們一般喜歡pip管理,沒有安裝的可以:

wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python get-pip.py #安裝pip python包管理工具
pip install ngxtop #下載安裝ngxtop

使用:

ngxtop -l /usr/local/nginx/logs/access.log

顯示請求最多的ip和request

ngxtop -t 1 -l /var/log/nginx/access.log top remote_addr request

使用幫助:

Usage:
  ngxtop [options]
  ngxtop [options] (print|top|avg|sum) <var>
  ngxtop info

Options:
  -l <file>, --access-log <file> access log file to parse.
  -f <format>, --log-format <format> log format as specify in log_format directive.
  --no-follow ngxtop default behavior is to ignore current lines in log
           and only watch for new lines as they are written to the access log.
           Use this flag to tell ngxtop to process the current content of the access log instead.
  -t <seconds>, --interval <seconds> report interval when running in follow mode [default: 2.0]
  -g <var>, --group-by <var> group by variable [default: request_path]
  -w <var>, --having <expr> having clause [default: 1]
  -o <var>, --order-by <var> order of output for default query [default: count]
  -n <number>, --limit <number> limit the number of records included in report for top command [default: 10]
  -a <exp> ..., --a <exp> ... add exp (must be aggregation exp: sum, avg, min, max, etc.) into output
  -v, --verbose more verbose output
  -d, --debug print every line and parsed record
  -h, --help print this help message.
  --version print version information.
  Advanced / experimental options:
  -c <file>, --config <file> allow ngxtop to parse nginx config file for log format and location.
  -i <filter-expression>, --filter <filter-expression> filter in, records satisfied given expression are processed.
  -p <filter-expression>, --pre-filter <filter-expression> in-filter expression to check in pre-parsing phase.
 

 

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 欧美人与禽交片在线播放 | 楚乔传第二部免费观看全集完整版 | 校花被老头夺去第一次动图 | 明星ai人脸替换造梦在线播放 | 国产日本欧美亚洲精品视 | 欧美日韩一区二区中文字幕视频 | 色综合久久丁香婷婷 | 亚洲国产精品一区二区首页 | 国产麻豆剧果冻传媒观看免费视频 | 91精品啪在线观看国产老湿机 | 天天成人| 国内久久精品 | 国产成人精品视频午夜 | 爽好舒服使劲添高h视频 | 日韩欧美国产在线 | 美女张开下身让男人桶 | 二区三区不卡不卡视频 | 第一国内永久免费福利视频 | 色中色软件 | xxx95日本老师xxx学生 | 日韩亚洲国产激情在线观看 | 亚洲精品国产精品国自产观看 | 亚洲国产精品成 | 国产私拍精品88福利视频 | 色婷婷六月丁香在线观看 | 女上男下gifxxoo动态视频 | 日b在线| 精品国产品在线18年 | 国产成人精品本亚洲 | 2018亚洲男人天堂 | 丁香五香天堂 | 日本五级床片全都免费播放 | 国产成人福利免费观看 | 国内精品久久久久香蕉 | 美女被吸乳老师羞羞漫画 | 日本伊人久久 | 国产精品久久久天天影视香蕉 | 免费日批视频 | 欧美国产日本精品一区二区三区 | 91精品国产色综合久久不卡蜜 | 大又大又黄又爽免费毛片 |