[lkml]   [1996]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject[Q] Howto read task list in userspace ?
    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    [W:0.038 / U:8.752 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site