LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-12-2005, 01:18 PM   #1
lofrbo
LQ Newbie
 
Registered: Nov 2005
Location: Boston, MA, USA
Distribution: Fedora Core 3
Posts: 5

Rep: Reputation: 0
Question CPU consumed time with millisecond resolution.


How I can get CPU consumed time by a particular process with at least millisecond resolution? I need this time while process still running on regular basis. PS gives only a second resolution.
 
Old 12-12-2005, 04:44 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,381

Rep: Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190
/proc/<pid>/stat will get you the jiffy count.
Might be the best you can do.
 
Old 12-13-2005, 09:29 AM   #3
lofrbo
LQ Newbie
 
Registered: Nov 2005
Location: Boston, MA, USA
Distribution: Fedora Core 3
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you for replay. According to the information in
wwwdotalphalinuxdotorg/archives/axp-list/January2001/0340.shtml
I am interesting in parameters 16 and 17 of the file. It seems that those values have only 1 second resolution as ps result. Is it true?
 
Old 12-13-2005, 09:44 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,381

Rep: Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190
Would appear so - you might have to process the data in /proc yourself.
 
Old 12-20-2005, 12:08 PM   #5
lofrbo
LQ Newbie
 
Registered: Nov 2005
Location: Boston, MA, USA
Distribution: Fedora Core 3
Posts: 5

Original Poster
Rep: Reputation: 0
It looks like top gives the time with 0.01 resolution.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kacpid eating cpu 99% cpu time! tjclancy Linux - Software 13 09-19-2011 03:08 PM
CPU consumed time with millisecond resolution. lofrbo Linux - Software 2 11-18-2005 10:46 AM
how can get the 'millisecond' bigapple Programming 3 08-08-2005 07:37 AM
kjournald process consumed all CPU time tttx Linux - General 1 05-11-2005 03:28 PM
millisecond pause oopicmaster Programming 1 10-10-2003 12:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:28 PM.

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
Open Source Consulting | Domain Registration