LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do i get the values for the user time and system time for a process. (http://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-get-the-values-for-the-user-time-and-system-time-for-a-process-744921/)

aloktiagi 08-04-2009 12:23 AM

how do i get the values for the user time and system time for a process.
 
how do i get the values for the user time and system time for a process.

i have tried getrusage to get values of ru_utime and ru_stime

but these don't seem to be correct

chrism01 08-04-2009 12:28 AM

See http://linux.die.net/man/1/time, especially the GNU version further down the page.

aloktiagi 08-04-2009 12:31 AM

thanks

is there a system call to do all this

chrism01 08-04-2009 06:55 PM

If you read further down the page, you'd have noticed the 'See also' section, which is std in the man pages:
http://linux.die.net/man/2/times
http://linux.die.net/man/2/wait3


All times are GMT -5. The time now is 05:51 PM.