Welcome! Log In Create A New Profile

Advanced

Nginx cli

Posted by voodooKobra 
Nginx cli
March 22, 2013 02:35PM
Hello, I'm playing around with cron and bash scripting, and I was wondering if there is currently (or could be in the future) a way to do get the number of active connections from the command line? i.e. something like:

root@boxen:/var/www# nginx --get-active-connections
4
root@boxen:/var/www#

Or something to that effect?
Re: Nginx cli
April 27, 2013 04:57AM
netstat -anp | grep -c nginx

or to be more specific

netstat -anp | grep ":80" | grep -c nginx
Re: Nginx cli
April 30, 2013 02:00PM
bender Wrote:
-------------------------------------------------------
> netstat -anp | grep -c nginx
>
> or to be more specific
>
> netstat -anp | grep ":80" | grep -c nginx

Oh thank you, that's clever. I never thought about using netstat for that :)
Re: Nginx cli
January 30, 2014 01:37PM
curl http://localhost/status
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 114
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready