LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to get details from task_struct (https://www.linuxquestions.org/questions/programming-9/how-to-get-details-from-task_struct-528684/)

imsandy_007 02-13-2007 10:47 AM

How to get details from task_struct
 
I am writing a program for displaying the details of task using the task_struct structure, but i have a problem regarding the initialization of the structure variable.

How would I get the pointer to a task structure of any process..
(I want to access it directly)
please help.........

wjevans_7d1@yahoo.co 02-13-2007 11:08 AM

I'm hoping that someone who's familiar with internals of the Linux kernel will come along, but in the meantime, have you considered using /proc?

For example, for process 1, use /proc/1

For details:

Code:

man proc
Hope this helps a little.


All times are GMT -5. The time now is 06:18 AM.