netstat -na | grep ESTAB | grep 80 | wc -l
netstat -na | grep ESTAB | grep 8080 | wc -l
这样应该可以的.
netstat -na | grep ESTAB | grep 8080 | wc -l
这样应该可以的.
[cndefu@www ~]$ netstat -anlt|grep 8009|grep ESTABLISHED
tcp 0 0 127.0.0.1:55177 127.0.0.1:8009 ESTABLISHED
tcp 0 0 127.0.0.1:32857 127.0.0.1:8009 ESTABLISHED
tcp 0 0 127.0.0.1:55184 127.0.0.1:8009 ESTABLISHED
tcp 0 0 127.0.0.1:55177 127.0.0.1:8009 ESTABLISHED
tcp 0 0 127.0.0.1:32857 127.0.0.1:8009 ESTABLISHED
tcp 0 0 127.0.0.1:55184 127.0.0.1:8009 ESTABLISHED