LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   reading /proc/pid/stat file? (https://www.linuxquestions.org/questions/linux-enterprise-47/reading-proc-pid-stat-file-595156/)

sanjaykhuntia 10-28-2007 01:05 AM

reading /proc/pid/stat file?
 
hi ,

i want to read some of the fields from /proc/pid/stat file and get those information stored in some variables.so how can i scan the fileds from stat file where the fileds are not similar and i want certain fields like pid, process name, ppid, times,euid,egid(if there) form that file. can anyone guide me?

also tell me where can i find user name from /proc?

thanks in advance.
sanjay

elcody02 10-29-2007 02:45 AM

man proc will be your friend. Stat is nicely explained there.


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