next up previous
Next: Filtering by addresses and Up: Time to talk about Previous: Time to talk about

Filtering by state.

ss allows to filter socket states, using keywords state and exclude, followed by some state identifier.

State identifier are standard TCP state names (not listed, they are useless for you if you already do not know them) or abbreviations:

F.e. to dump all tcp sockets except SYN-RECV:


\begin{tscreen}
\begin{verbatim}ss exclude SYN-RECV\end{verbatim}
\end{tscreen}

If neither state nor exclude directives are present, state filter defaults to all with option -a or to all, excluding listening, syn-recv, time-wait and closed sockets.