Skip to content

Instantly share code, notes, and snippets.

@matthiasr
Created June 18, 2013 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthiasr/5805902 to your computer and use it in GitHub Desktop.
Save matthiasr/5805902 to your computer and use it in GitHub Desktop.
Translate from ss(8) to netstat(8) TCP state names (AWK dictionary)
translate["ESTAB"] = "ESTABLISHED";
translate["SYN-SENT"] = "SYN_SENT";
translate["SYN-RECV"] = "SYN_RECV";
translate["FIN-WAIT-1"] = "FIN_WAIT1";
translate["FIN-WAIT-2"] = "FIN_WAIT2";
translate["TIME-WAIT"] = "TIME_WAIT";
translate["UNCONN"] = "CLOSE";
translate["CLOSE-WAIT"] = "CLOSE_WAIT";
translate["LAST-ACK"] = "LAST_ACK";
translate["LISTEN"] = "LISTEN";
translate["CLOSING"] = "CLOSING";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment