lsof and ss Will Tell You Who Owns That Port

Port in use, connection stuck, file handle exhausted. Three of the most common production questions are answered by two old tools that read the kernel's own…

lsof and ss Will Tell You Who Owns That Port. Abstract tooling illustration in orange and dark grey on debugly.dev
Flag Meaning
-t TCP
-l listening sockets
-n numeric, no resolution
-p show the owning process
State Read as
ESTAB healthy in flight
SYN-SENT our connect is not being answered, path or peer down
SYN-RECV we are trying to accept but the handshake stalls
CLOSE-WAIT the peer closed, we have not, our code is holding the socket
TIME-WAIT normal after close, only a problem in huge numbers

Published on debugly.dev by Rohit Bhadani | Founder of Krova Cloud