Skip to content

Instantly share code, notes, and snippets.

@centminmod
Last active August 29, 2015 13:58
Show Gist options
  • Save centminmod/d613128cdb9eed86c9ec to your computer and use it in GitHub Desktop.
Save centminmod/d613128cdb9eed86c9ec to your computer and use it in GitHub Desktop.
ngxtop https://github.com/lebinh/ngxtop for Centmin Mod Nginx usage http://centminmod.com/

To install ngxtop type:

yum -y install python-pip; pip install ngxtop

By default ngxtop only reports new connections (live) not previously logged connections. So if you have a relatively idle server you may not see live stats.

To check live stats for Centmin Mod Nginx hosted domains pass the location of the domain vhost's access.log

ngxtop -l /home/nginx/domains/yourdomain.com/log/access.log

To check previously logged data use the --no-follow option

ngxtop -l /home/nginx/domains/yourdomain.com/log/access.log --no-follow 

More commands outlined at https://github.com/lebinh/ngxtop - just remember to pass the Centmin Mod Nginx accesslog file with the commands (-l /home/nginx/domains/yourdomain.com/log/access.log).

For example

ngxtop -l /home/nginx/domains/yourdomain.com/log/access.log --no-follow top remote_addr
ngxtop -l /home/nginx/domains/yourdomain.com/log/access.log --no-follow -i 'status >= 400' print request status http_referer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment