LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 09-13-2005, 01: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 process.so please if anyone knows help me out


Thanks in advance.
 
Old 09-14-2005, 10:19 PM   #2
lordofring
Member
 
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, 04:40 AM   #3
bigapple
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?
 
  


Reply


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 10:27 PM
How to write a system call to display the process information? balasquare@yahoo.com Programming 3 09-30-2005 02:05 AM
How to get the current process information balasquare@yahoo.com Programming 4 09-29-2005 05:39 AM
get information when a process run?????? hungnt Linux - Newbie 6 07-16-2005 11:57 AM
process information application? YBA^[x] Slackware 6 01-13-2005 11:04 AM


All times are GMT -5. The time now is 10:36 AM.

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