LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   from kernel data structures ? (https://www.linuxquestions.org/questions/linux-kernel-70/from-kernel-data-structures-559111/)

sha_neb 06-04-2007 01:49 PM

from kernel data structures ?
 
Hi ,

How do I get the following info of a process
from kernel data structures ?

1. command line ,
2. current working directory ,
3. environment ,
4. executed command ,
5. root directory.

I know these can be obtained from the proc . But how do I get from kernel data structures ?



thanks,
sha

Mara 06-08-2007 03:54 PM

In your case, everything is in the process descriptor or is linked from there. /proc is an interface to kernel structures, and a very useful one. Is there a specific reason you don't want to use it? Apart from /proc you have sysctls and ioctls, which are harder to use.


All times are GMT -5. The time now is 07:20 PM.