11

When I run ss -tnlp to display all programs listening for tcp connections (something I do rather often) I get something like this:

Spread-out output with line breaks

Despite the terminal being wide enough, ss chooses to split some lines and display the processes on the next line. I can make my terminal spread two huge monitors but it doesn't matter how wide the terminal is, ss likes to use line breaks and huuuge whitspace in-between columns. Compare this with the deprecated netstat output:

nice and tidy netstat output

Everything fits on one line, very nice and readable tabular output. But because I'm a good person cough I use ss, not netstat because that's what we ought to do, right?

I can make ss behave sanely by piping its output to cat:

enter image description here

Still, a lot of wasted space but at least there are no unnecessary line-breaks.

My question: Why was ss written to behave this way? Why would anyone ever want their output spread across a huge space and then line-wrapped?

Patrick
  • 369
  • 1
  • 12
  • 2
    Very similar to: http://unix.stackexchange.com/questions/252744/ss-linux-socket-statistics-utility-output-format – Tagwint Mar 13 '17 at 15:51

0 Answers0