3

How should one retrieve all opened socket file descriptors, and other information like socket family, protocol, binding address ?

I need to do this in kernel module, not with some user-land commands...

daisy
  • 22,498
  • 29
  • 129
  • 265

1 Answers1

1

You can use the command lsof (need to be root).

For example : lsof -i

You can process the output with AWK or cut.

Hope this help.

Regards.

TOC
  • 4,326
  • 18
  • 21