Re: Total Number of conecctions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 12/3/2010 2:57 PM, Alejandro Rodriguez Luna wrote:
> I have the need to know how many connection the server has, i run this
> command but i don't know how to sum all the results and get a final number.
> any ideas?
>
> netstat -an | grep -E 'tcp|udp' | awk '{print $6}' | sort | uniq -c |
> sort -n
>
> 1 CLOSE_WAIT
> 1 FIN_WAIT_2
> 1 LAST_ACK
> 1 TIME_WAIT
> 4 SYN_SENT
> 15
> 37 LISTEN
> 44 ESTABLISHED

Personally, I'd only call 'ESTABLISHED' state a connection.  The other 
states might still have a socket tied up at your end, but you don't 
really know what's going on at the other.

-- 
   Les Mikesell
    lesmikesell@xxxxxxxxx

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux