cat /proc/net/tcp |awk ‘{print $4}’|grep -c 01
当然也可以:
netstat -nat |grep -c ESTABLISHED
或者:
netstat -s -t | grep connections\ established
经过time测试,netstat -s -t | grep connections\ established 这种方法是效率最高的。
On this day..
- BASH中字符串的处理 - 2008
- SHELL程序的不同执行方式 - 2008
- BASH多进程并行处理的方法实现 - 2008
Tags: Linux, tcpCurrEstab