Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-06-2007, 11:49 AM   #1
Registered: May 2007
Posts: 34

Rep: Reputation: 15
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 ?

Old 06-07-2007, 09:53 AM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I doubt if you can get such info directly from the kernel, especially not in a portable way. The whole point of the proc filesystem is to export such information to userspace, in the absence of any other method.
--- rod.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
from kernel data structures ? sha_neb Linux - Kernel 1 06-08-2007 03:54 PM
data structures used by ls command vishalbutte Programming 1 01-19-2006 02:47 PM
kernel data structures vishalbutte Programming 8 01-05-2006 03:19 PM
Data structures - Trees rahul_kulkarni Programming 1 05-16-2005 05:45 AM
java data structures tunedLow Programming 4 12-17-2002 11:51 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:36 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration