reading /proc/pid/stat file?
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.