There's a proc api I believe, but I've never used it.
Otherwise use getrusage(2) .
IMHO Get getrusage() is a better approach if your program is to be
cross-platform
-kervin
John Summerfield 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.
> man clock
> man times
>
> Dunno 'bout paging stats.
> --
> Cheers
> John Summerfield
> http://www2.ami.com.au/ for OS/2 & linux information.
> Configuration, networking, combined IBM ftpsites index.
>
> Microsoft's most solid OS: http://www.geocities.com/rcwoolley/
>
> Note: mail delivered to me is deemed to be intended for me, for my disposition.
>
> _______________________________________________
> Redhat-devel-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-devel-list
_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list