There’s a nifty little socket reader lumped in with iproute2, and if you didn’t think to look for it, you probably wouldn’t know it was there. Here’s ss:
I’ve prodded ss a little more than is necessary there, just to keep the results on the screen and lined up neatly; that’s what head and column are for. ss will do that for you for free, but then the results wouldn’t make a good screenshot. π
ss can read network or X server info; the man page lists quite a few options for each, as well as some examples to get you started.
ss will also allow you to filter stats by TCP states, match ports or addresses, and a slew of other nifty tricks. The man page compares ss to netstat; I’d probably lump them into the same category too, just out of naivetΓ©.
And yet strangely, I’ve not heard as much about ss. Perhaps this is another one of those Linux secrets I keep stumbling into. … π
