1. 程式人生 > >統計tcp狀態連接數

統計tcp狀態連接數

tcp

# netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'


ESTABLISHED 471
FIN_WAIT1 3
FIN_WAIT2 52
SYN_SENT 1
TIME_WAIT 725



修改tcp連接時間狀態值

tcp_keepalive_time = 30
tcp_keepalive_probes = 9
tcp_keepalive_intvl = 75





統計tcp狀態連接數