Skip to contentSkip to conversation

processes / net connections - an API

DISCUSSION stf 2 participants 2 messages May 11, 2007

Subsystems (2)
lore
Share & tools
lore

stf

author
#0 lore raw

Hi!

I want to write a library or application showing processes and net connections. I was looking on ps and netstat to see how those programs are retrieving the information. It seems that they are parsing /proc entries.

Is there any other kernel API to get information about processes or net connections?

Thank you.

#1 lore raw
Quoted 10 lines · stf

Hi!

I want to write a library or application showing processes and net connections. I was looking on ps and netstat to see how those programs are retrieving the information. It seems that they are parsing /proc entries.

Is there any other kernel API to get information about processes or net connections?

For processes, take a look at kernel-sources/accounting/* For networking, your question is hard to answer because netstat really wont tell you much about flows; in any case, but take a look at iproute2-sources/iproute2/misc/*

cheers,
jamal