Subject: Re: processes / net connections - an API

From: jamal <[email-masked]>
Date: Fri, 11 May 2007 08:47:49 -0400

On Fri, 2007-11-05 at 14:41 +0200, stf wrote:
> 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