News for hackers. Stuff that matters.
Re:Linux debugging tools you'll love by geofft on Wednesday September 07, 2016 @01:19PM (#12445231)
Nifty, `ss -i` seems useful. I think most of the rest of the info you can get with netstat, though (and there doesn't seem to be a way to resolve usernames, as `netstat -e` does).

Is there a way to make the output not justified to the width of my terminal? The extra whitespace makes it hard to see which rows match up, and also makes it annoying to paste into IM or email.

Re:Linux debugging tools you'll love by mVChr on Wednesday September 07, 2016 @03:30PM (#12446539)
> (and there doesn't seem to be a way to resolve usernames, as `netstat -e` does)

Challenge accepted:

  ss -e | grep uid | gawk 'match($0,/uid:([0-9]+)/,u) {printf "%s user:",$0;system("getent passwd "u[1]" | cut -d: -f1");}'
Not your point, I know, but it was fun.
Re:Linux debugging tools you'll love by wang_li on Thursday September 08, 2016 @10:41AM (#12453415)
You lose three points for using grep and gawk in the same pipeline. :P
Re:Linux debugging tools you'll love by mVChr on Thursday September 08, 2016 @12:34PM (#12454564)
Oops, the grep was just to filter the lines that actually have a uid while I worked on it, it's not needed or desired if you were to actually use this. You can remove that part. :P