安装ngxtop
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
python setup.py install
wget https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz#md5=3823d2343d9f3aaab21cf9c917710196
tar zxvf pip-7.1.2.tar.gz
cd pip-7.1.2
python setup.py install
pip install ngxtop
分析日志
ngxtop -l /var/log/nginx/access.log
访问量前十的IP
ngxtop -c /etc/nginx/nginx.conf top remote_addr
ngxtop 不支持nginx inclued 引用文件
http://www.ttlsa.com/nginx/nginx-modules-ngxtop-ttlsa/
本文出自 “秋水无痕” 博客,转载请与作者联系!
原文地址:http://7456193.blog.51cto.com/7446193/1771067