LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-28-2007, 01:05 AM   #1
sanjaykhuntia
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Rep: Reputation: 0
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
 
Old 10-29-2007, 02:45 AM   #2
elcody02
Member
 
Registered: Jun 2007
Posts: 52

Rep: Reputation: 17
man proc will be your friend. Stat is nicely explained there.
 
  


Reply


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
/proc/stat file problem for cpu usage arunka Programming 3 04-23-2014 01:08 PM
/proc/<pid>/stat shows zero cpu usage simchac Linux - Kernel 0 07-25-2006 07:26 AM
Reading /proc/<pid>/mem magnus.therning Programming 2 07-16-2006 08:29 AM
Reading from a /proc file russelh Programming 2 12-02-2004 05:30 PM
about /proc/$pid/stat 's start time henryluo Programming 2 06-21-2004 09:15 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 03:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration