LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-19-2005, 02:54 AM   #1
Anup Kumar
LQ Newbie
 
Registered: Feb 2004
Posts: 9

Rep: Reputation: 0
Information on Processes in linux using System calls


Hello friends,
I'm working on redhat 8. The main job is to list all the processes (may be running) on the linux system using system calls and get informations of their cpu usages, registers, u area, regions ...etc.
 
Old 04-19-2005, 04:08 AM   #2
mehuljv
Member
 
Registered: Nov 2004
Posts: 72

Rep: Reputation: 15
hi,
why you want to use system call for this thing?? from the command line you can use "ps aux > test" which will copy list of all the currently running process as well as all other things which you want. and from your c program
you can run this command using "system(<cmd>)" and then read "test" file ..

Regards
Mehul
 
Old 04-19-2005, 04:09 AM   #3
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
for a list 'ps aux'

for realtime 'top'
 
Old 05-06-2005, 11:51 AM   #4
Anup Kumar
LQ Newbie
 
Registered: Feb 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Process Information

Last time i asked a question regarding the processes running o the linux os.


This time i have two ways to do this.


1. Reading the proc directory .
Using this method is standard way which is used by ps, top and free.

2. Using task_struct.
For more information on this visit to /usr/src/linux(some version)/fs/proc/....
lots of program are there. These program is being used by kernel for the easy access to the processes.
 
  


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
How Can I Find My System Architecture Information On Windows And Also On Linux pak_abdul Linux - Hardware 2 05-21-2005 12:57 PM
Gathering computer system (linux )information in C minil Programming 2 03-09-2005 05:47 AM
How to get information about processes and terminals eshwar_ind Programming 1 04-27-2004 01:16 PM
accessing system calls information netwizio Programming 4 02-18-2004 12:53 AM
System Information software for Linux caesius_01 Linux - General 2 10-24-2003 08:13 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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