Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-06-2013, 04:07 AM   #1
LQ Newbie
Registered: Nov 2012
Posts: 1

Rep: Reputation: Disabled
some problem of using the top command

i have wirte some script to monitor some process and record the data.
but when i run my script that i found the record of the CPU whitch is over 100% .For example:

the %CPU = 577.3 ,i don't know how to conver to the real value.

16280 wacos 20 0 10.7g 2.3g 12m S 577.3 7.3 42:00.41 java

PS: running in redhat6.2 (i have runned the same script in solaris ,which is normal)

Last edited by jeff.xue; 02-06-2013 at 04:08 AM.
Old 02-06-2013, 04:23 AM   #2
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,042

Rep: Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914
That implies you have multiple threads running on multiple cores.

RHEL comes with sysstat - you might be better served to make use of that. See "man sar".
1 members found this post helpful.
Old 02-06-2013, 04:28 AM   #3
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Out of the box top shows a cumulative value for the total of cpu's (if one has 2 core's/cpu's running each at 90 procent the value shown will be 180%).

Use 1 when running top to show value's for each separate cpu. If you want to make this the default behaviour press W enter to create a configuration file.

Top might not be the best choice to use when used in a script. sar comes to mind.
1 members found this post helpful.


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
LXer: Can You Top This? 15 Practical Linux Top Command Examples LXer Syndicated Linux News 0 01-09-2010 10:42 PM
Finding the top CPU-using processes? "top" command does not help... catalytical Linux - Server 1 04-06-2009 05:50 PM
top command maooah Solaris / OpenSolaris 17 08-17-2008 08:43 PM
problem with output of ' top -n 1 ' command NoopurTiwari Linux - Newbie 1 05-29-2007 03:45 AM
top command ram problem displaying negative value for process xekhz Linux - General 1 06-10-2006 04:01 AM

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration