lkml.org 
[lkml]   [1996]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[Q] Howto read task list in userspace ?
Date
The real question is:
How can i retrive which process (pid) has opened
which socket on my machine w/o modifining the kernel?

After reading a book describing the kernel layout the khg
an walking around in the source this is very much unclear,
but i think it should be possible because the kernel keeps
this information.

Reading the /proc filesystem seems not to be enough,
there is no relation between the socket describing files
and those who describe the running processes.

My idea is to access the kernel tasklist (via /dev/kmem ??)
and find as much as possible informations about a process
(including opend sockets, files ....)
can this be done ? where to get more information ?
is there a better way ? (to make this work w/ kernels on
different machines i try to avoid a kernel modification)

Thanks in advance,
Andreas Weiss
ps. i hope this mail issn't broken i'm testing a new installation


\
 
 \ /
  Last update: 2005-03-22 13:37    [from the cache]
©2003-2011 Jasper Spaans