Linux – See active connection on apache web server

apache-http-serverlinuxnetworking

I need a command or something to see live web viewer in Apache2 web server, in other word i want see the ip address of active connection and i found some commands like :

netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort
-nk 1

netstat -plan|grep :80 | wc -l

netstat -an | grep ESTABLISHED | awk '{print $5}' | awk -F: '{print
$1}' | sort | uniq -c | awk '{ printf("%s\t%s\t",$2,$1) ; for (i = 0;
i < $1; i++) {printf("*")}; print "" }'

But i can't understand it completely .
My questions are :

1 – Is there any other command to server this purpose ?

2 – What is the the state of live visitors in netstat (Establish or Connected) ?

Best Answer

Check out Apache mod_status, this gives an overview of activity at the HTTP level and might be what you're looking for.

Sample output of mod_status

Related Question