Well Jerry,
One good way is to read the information from /proc pseudo-filesystem.
You can see the help by "man proc"
The pseudo file /proc/cpuinfo will tell you about the
type/speed/stepping/cache size ... etc. about each processor.
And pseudo file /proc/stat will tell you about the user, nice, system, & idle
time for each cpu in teh system.
And function get_nprocs will tell you the no. of available processors.


Manish.


Jerry Hong <[EMAIL PROTECTED]> wrote:
> Hi, 
>   Does anybody know how to get process info such as
> (user time, system time, CPU usage, Page faults) in C
> programm? I know in general ioctl(fd, PRSINFO, &..)
> would work, but it doesn't work for Linux.
>   Any comments will be welcome.
>   Thanks.
> 
>   Jerry
> 
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail. 
> http://personal.mail.yahoo.com/
> 
> 
> 
> _______________________________________________
> Redhat-devel-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-devel-list


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to