Quote:
Originally posted by balasquare@yahoo.com
I am trying to develop a C program to print the current process information.
Where can I find some sample C programs to do this? Does any one has a sample C program which prints the current process information.
|
The subdirectories of /proc that have numbers for a name, contain files and subdirectories that contain information about processes. The numbers are the PID's of the processes. /proc/self is a symlink to /proc/<pid>, so to find info on the process running your program, you can read the files and sub-dirs in/proc/self.
The meaning of the files/subdirs in /proc/<pid> (and a such /proc/self as well) can be found in "man 5 proc".