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?

  • 1
    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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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