Created
June 14, 2016 04:47
-
-
Save mkyung/43d19b67386e490ddce31b0d3a797889 to your computer and use it in GitHub Desktop.
Linux TCP connection stats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -tn | awk '/^tcp/ {t[$NF]++}END{for(state in t){print state, t[state]} }' | |
# Results: | |
# LAST_ACK 1 | |
# ESTABLISHED 4 | |
# FIN_WAIT1 9 | |
# TIME_WAIT 9 | |
# SYN_SENT 500 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment