LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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
  Search this Thread
Old 03-06-2009, 02:36 AM   #1
m1n
Member
 
Registered: Feb 2009
Posts: 33

Rep: Reputation: 15
CPU time for process?


Hi guys, is it possible to get cpu time the proccess spend? i can do it using ps command but i want more accurate value , for example in miliseconds or even nanoseconds if such a thing possible?
 
Old 03-06-2009, 04:10 AM   #2
manick_20
LQ Newbie
 
Registered: Mar 2009
Location: Mysore
Posts: 5

Rep: Reputation: 0
You can try by using COMMAND top
 
Old 03-06-2009, 05:03 AM   #3
m1n
Member
 
Registered: Feb 2009
Posts: 33

Original Poster
Rep: Reputation: 15
thanks. Intresting from what place top gets it? I can't find this information in /proc/pid/...
 
Old 03-06-2009, 07:52 AM   #4
kutty_prasad
Member
 
Registered: Sep 2006
Location: Bangalore,India
Distribution: RHEL,Fedora, CentOS, Slackware 12 & wrestling with LFS
Posts: 86

Rep: Reputation: 16
You can also try using "time <some_command>" command.

For example: $ time ls -l

You will get something like below after the "ls -l" output.

real 0m0.010s
user 0m0.009s
sys 0m0.001s
 
  


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
How to set mximum allowed CPU time for a process ? terminatorul Linux - Newbie 3 02-05-2009 07:27 PM
Debian: top process under user root uses all CPU time jlinkels Linux - Software 7 01-22-2009 10:02 PM
how to get the accumulate cpu time of a process chrislam Programming 1 10-14-2007 05:02 PM
share cpu time and reduce process load sailu_mvn Linux - Software 3 03-09-2006 07:20 PM
kjournald process consumed all CPU time tttx Linux - General 1 05-11-2005 04:28 PM


All times are GMT -5. The time now is 10:40 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration