Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 4th June 2007, 11:18 PM
sha_neb Offline
Registered User
 
Join Date: May 2007
Posts: 6
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
Reply With Quote
  #2  
Old 4th June 2007, 11:31 PM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
get the pid of the process using ps, then look in /proc/<pid>/. All that info is in there

oops, sorry, you said from kernel data structures, what do you mean?

EDIT
I guess you meant to post this in the programming forum.
You can try googling task_struct which is defined in linux/sched.h, but I don't know much about accessing the struct, it's surely easier to do it by reading from /proc

Last edited by sideways; 4th June 2007 at 11:50 PM.
Reply With Quote
  #3  
Old 8th June 2007, 01:47 AM
sha_neb Offline
Registered User
 
Join Date: May 2007
Posts: 6
I got it . I got it from the task_struct datastructure.


thanks,
sha.
Reply With Quote
Reply

Tags
data, kernel, structures

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
wireless iwl4965 kernel>=2.6.26 drops data jfloyd Servers & Networking 0 24th October 2008 04:31 AM
from kernel data structures ? sha_neb Programming & Packaging 0 6th June 2007 05:47 PM
How to get additional data from the kernel to monitor the priveleges dudebaba Programming & Packaging 0 3rd March 2005 12:39 AM
kernel: usbserial.c: too much data xme Using Fedora 2 24th March 2004 06:44 AM


Current GMT-time: 12:50 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat