LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 08-04-2009, 12:23 AM   #1
aloktiagi
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Rep: Reputation: 0
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
 
Old 08-04-2009, 12:28 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,093

Rep: Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995
See http://linux.die.net/man/1/time, especially the GNU version further down the page.
 
Old 08-04-2009, 12:31 AM   #3
aloktiagi
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Original Poster
Rep: Reputation: 0
thanks

is there a system call to do all this
 
Old 08-04-2009, 06:55 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,093

Rep: Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995
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
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a process at boot time under a regular user account geek.ksa Linux - Newbie 3 07-06-2009 02:31 PM
Process System Time from ps? kmand Linux - Software 4 04-21-2009 09:53 AM
System time vs Hardware time and Daylight Savings Time Toadman Linux - General 6 03-17-2007 08:12 AM
System time vs Hardware time and Daylight Savings Time Toadman Linux - Networking 6 03-16-2007 07:14 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration