Is there a convenient way (e.g. a readily-available command or a program that I can write using standard system calls) to list socket options (e.g. TCP_NODELAY) of an open TCP socket of some running process on a Linux system?

  • 2
    This is a good question! The standard command should be lsof -T f, see the Manual page here, linux.die.net/man/8/lsof. However, running that on many Linux (I tried Debian, Arch, Kubuntu) returns: lsof: unsupported TCP/TPI info selection: f. – MariusMatutiae Nov 28 '15 at 13:57
  • And, BTW, knetstat does work flawlessly on run-of-the-mill Debian Jessie. and Arch Linux. – MariusMatutiae Nov 28 '15 at 14:05

I have not personally done this myself, but it looks like knetstat may be able to help you. It is not readily-available, but unfortunately I am not sure there is such a way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.