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
  • 21,114
  • 28
  • 118
  • 236

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,236
  • 16
  • 21