[CentOS] count of active tcp sockets?

Wed Apr 16 20:26:36 UTC 2008
J Potter <jpotter-centos at codepuppy.com>

Hi List,

Is there an easy way to get a count of the number of active socket  
connections, or even better, number of socket connections in the  
time_wait state? (Something lightweight... under /proc/sys/net/ipv4/?  
I'd like to avoid the impact of listing out all the connections a-la  
netstat.)

Thanks!
-Jeff