LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-10-2012, 03:41 PM   #16
Reuti
Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 970

Rep: Reputation: 184Reputation: 184

Quote:
Originally Posted by Cedrik View Post
I think top command needs a few seconds to compute CPU usage
I observed the same and the values one gets with:
Code:
$ top -n 2 -b -d 60
(and I found no way to skip the initial 0.5 sec output) are more reliable in the second output. CPU usage is an integral value (at a tiny point in time there is only one process per core), hence any command giving an instant answer would have to aggregate already the last seconds, minutes,... of usage per process beforehand.
 
  


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
LXer: Windows is Easier, Just Like Stabbing Your Own Eyeballs is Easier LXer Syndicated Linux News 1 03-06-2010 03:17 AM
LXer: Can You Top This? 15 Practical Linux Top Command Examples LXer Syndicated Linux News 0 01-09-2010 09:42 PM
Finding the top CPU-using processes? "top" command does not help... catalytical Linux - Server 1 04-06-2009 04:50 PM
top command Volcano Programming 18 10-15-2008 10:02 PM
Top command mtnpaul Linux - Software 2 04-17-2008 04:25 AM


All times are GMT -5. The time now is 05:36 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
Open Source Consulting | Domain Registration