Help answer threads with 0 replies.
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 09-13-2005, 12:21 PM   #1
Pratik H Pandya
LQ Newbie
Registered: Jun 2005
Location: India
Distribution: RedHat 9.0,Fedora core 3
Posts: 22

Rep: Reputation: 15
How to use task_struct to get process information??

Hello Friends

I'm little bit confused here i want to get whole process information (including PCB) so i got one structure task_struct from "sched.h" but i'm confused here that how to use this structure to get information of a please if anyone knows help me out

Thanks in advance.
Old 09-14-2005, 09:19 PM   #2
Registered: Feb 2005
Posts: 91

Rep: Reputation: 15
The struct is for kernel space. For example, your kernel module knows the macro "current" which is defined as task_struct.
Old 09-15-2005, 03:40 AM   #3
LQ Newbie
Registered: Oct 2004
Location: Hangzhou.China
Distribution: Suse 9.3 | redhat 9.0 | Solaris 10
Posts: 29

Rep: Reputation: 15
hi ,this is also a problem for me.
I want to wirte a program that can get the certain process's information. such as the CUP time and the process status
mostly like the ps shell command.
how can I get these information use the task struct?


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
accessing task_struct of process shukla_chanchal Linux - General 1 11-04-2005 09:27 PM
How to write a system call to display the process information? Programming 3 09-30-2005 01:05 AM
How to get the current process information Programming 4 09-29-2005 04:39 AM
get information when a process run?????? hungnt Linux - Newbie 6 07-16-2005 10:57 AM
process information application? YBA^[x] Slackware 6 01-13-2005 10:04 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:47 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
Open Source Consulting | Domain Registration