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 04-19-2005, 03: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, 05:08 AM   #2
Registered: Nov 2004
Posts: 72

Rep: Reputation: 15
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 ..

Old 04-19-2005, 05:09 AM   #3
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, 12:51 PM   #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.


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 01:57 PM
Gathering computer system (linux )information in C minil Programming 2 03-09-2005 06:47 AM
How to get information about processes and terminals eshwar_ind Programming 1 04-27-2004 02:16 PM
accessing system calls information netwizio Programming 4 02-18-2004 01:53 AM
System Information software for Linux caesius_01 Linux - General 2 10-24-2003 09:13 PM > Forums > Non-*NIX Forums > Programming

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration