XWLinux

ss

Socket statistics — nowszy i szybszy niż netstat.

Opis

ss (socket statistics) — następca netstat. -t (TCP), -u (UDP), -l (LISTEN), -p (process), -n (no resolve), -a (all), -e (extended), -m (memory). ss -tlnp = TCP LISTEN z processami. Szybszy niż netstat (czyta z kernela, nie /proc).

Przykłady

$ ss -tlnp
TCP LISTEN (z procesami)
$ ss -ulnp
UDP (z procesami)
$ ss -tnp state established
Połączenia established
$ ss -tn state time-wait
TIME_WAIT sockets
$ ss -e state connected
Extended info (buffer sizes)
$ ss -m
Memory usage per socket

Flagi

FlagaOpis
-t TCP
-u UDP
-l LISTEN only
-p Pokaż process
-n No resolve (IP + port)
-a All (listening + established)
-e Extended (buffer, timer)
-m Memory per socket
-o Timers
state Filtr po stanie (established, time-wait, ...)