To count socket states use following command:
# netstat -an | awk '/^tcp/ {A[$(NF)]++} END {for (I in A) {printf "%5d %s\n", A[I], I}}'
Output should be something like this: Continue reading “Count TCP socket state and decrease TIME_WAIT state”
To count socket states use following command:
# netstat -an | awk '/^tcp/ {A[$(NF)]++} END {for (I in A) {printf "%5d %s\n", A[I], I}}'
Output should be something like this: Continue reading “Count TCP socket state and decrease TIME_WAIT state”