Results 1 to 3 of 3
i just wanted to know, how find out number of currently running process in a terminal using
c code, number of process are running and sleeping...
- 08-07-2008 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 27
how to find out number of currently running process in a terminal
i just wanted to know, how find out number of currently running process in a terminal using
c code, number of process are running and sleeping
- 08-07-2008 #2
I'm not sure whether we have built-in functions for this.
For below procedure you will need to write a C program to open files and exact the string....
But /proc will have process id as well as process name.
/proc/pid/stat
See the process name with '(' and ')'
check
[code]
man proc
[\code]- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 08-08-2008 #3Just Joined!
- Join Date
- Aug 2008
- Posts
- 7
there are files with the extension .pid created in the /var/run/ folder. this may give you a clue for the running process & process id. you can write program to read those files.


Reply With Quote