利用ngxtop工具对nginx日志实时分析
# ngxtop --helpngxtop - ad-hoc query for nginx access log.
Usage:
ngxtop
ngxtop (print|top|avg|sum)...
ngxtop info
ngxtop query...
Options:
-l , --access-log 需要分析的访问日志
-f , --log-format log_format指令指定的日志格式 [默认: combined]
--no-followngxtop 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 , --interval report interval when running in follow mode
-g , --group-by 根据变量分组 [默认: request_path]
-w , --having having clause
-o , --order-by 排序 [默认: count]
-n , --limit 显示的条数
-a..., --a...add exp (must be aggregation exp: sum, avg, min, max, etc.) into output
-v, --verbose更多的输出
-d, --debugprint every line and parsed record
-h, --help当前帮助信息.
--version输出版本信息.
高级选项:
-c , --config 运行ngxtop解析nginx配置文件
-i , --filter filter in, records satisfied given expression are processed.
-p , --pre-filterin-filter expression to check in pre-parsing phase
页:
[1]