LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
Search this Thread
Old 09-18-2006, 12:57 PM   #1
arg3t3k.senvx
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
time yielding CPU% > 100


Has anyone experienced this before?
 
Old 09-18-2006, 01:02 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
yes

Yes.......
 
Old 09-18-2006, 01:30 PM   #3
arg3t3k.senvx
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
=)

Thanks for replying...

Would you have any ideas as to why / how this is happening?
 
Old 09-18-2006, 02:04 PM   #4
soggycornflake
Member
 
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249

Rep: Reputation: 31
Is this an smp/dual-core box?

The cpu % is reported in terms of clock ticks (see man 2 times), obviously multiple cpus can do more work in a given amount of time...

e.g. if a process takes 5 seconds, consisting of 2 cpus which each use 3 seconds of cpu time (simultaneously of course), the other 2 seconds presumably being i/o, then you have (3+3)/5 = 120% cpu. Or something like that.
 
Old 09-18-2006, 02:32 PM   #5
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi, arg3t3k.senvx

1. Your original post really didn't have enough information to even begin to guess where
"the problem" might be, or what you could possibly do about it.

Please check out this link - I think it'll help:
"How To Ask Questions The Smart Way" by Eric Steven Raymond and Rick Moen.
http://www.catb.org/~esr/faqs/smart-questions.html

2. As far as "getting more information", I'd start out with the program "top:

a) Start a command line session
<= DO THIS FIRST
b) Try to reproduce the problem (do whatever "makes the CPU go to 100%")
<= THE SYSTEM WILL PROBABLY SLOW TO A CRAWL
c) Type "top"
<= THIS WILL GIVE YOU A SUMMARY OF ALL PROCESSES RUNNING ON YOUR SYSTEM
d) Type "F" (to sort by column number), then select "%CPU"
e) Whatever process at the top might be showing "99% CPU" and, if so, is probably "the bad guy"

3. Post whatever additional information you find back to us here on LQ. We might be able to help.

Good luck .. PSM
 
Old 09-21-2006, 08:11 AM   #6
arg3t3k.senvx
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Spot-on, soggycornflake. Yes it's dual core indeed. Thanks!

Summary of how CPU% is calculated by GNU time:

CPU% = ( noOfCPUSecsInUsrMode + noOfCPUSecsInSysMode ) /
ElapasedRealTime

As I understand,

The noOfCPUSecsInXXXMode includes CPU seconds for all
processors that this process and / or its ( waited for )
children got allocated to.


Hi PSM,

Another great read from Eric Raymmond, and surely worth it.

I knew "the bad guy", but was looking for a rather general
*howIsItPossible* answer. Soggycornflake has providied a
perspective adjustment that I much needed, for my past
experience has solely been on 1-way, single-core machines.

Thank you for your time!


~ argetek
 
Old 09-21-2006, 10:55 AM   #7
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi, arg3t3k.senvx -

If you're going to ask a question, you should really include all pertinant information. It's the courteous thing to do ;-)

Otherwise, we're just "shooting in the dark", taking guesses.

And, IMHO, "shooting in the dark" is Bad. Sometimes necessary. But it never, ever "feels right".

So in the future, please give a few specifics about what you tried (for example, did you run "top" or "ps -eaf" to identify the process?) and what you're trying to figure out (why the process CPU time seems so excessively high, yet that process doesn't *seem* to be misbehaving, and the system doesn't *seem* to be under any stress). You might also want to cut/paste a few lines from your "top" or "ps" output.

Anyway - glad you figured out the problem.

Your .. PSM
 
Old 09-21-2006, 02:25 PM   #8
arg3t3k.senvx
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Cool it, dude.

All of this:

So in the future, please give a few specifics about what you tried (for example, did you run "top" or "ps -eaf" to identify the process?) and what you're trying to figure out (why the process CPU time seems so excessively high, yet that process doesn't *seem* to be misbehaving, and the system doesn't *seem* to be under any stress). You might also want to cut/paste a few lines from your "top" or "ps" output.

was totally unnecessary, since anybody smart enough to be on this thread
can figure out:

When someone writes something like "time yielding CPU% > 100" MEANS he is
running the SAME process EXPLICITLY passed to time!

So why the heck did I need to run "top" or "ps -eaf"???

I agree with some of your thinking but it simply doesn't make
sense in all cases; convince 'em on logic and they'll be all
1's under your boolean influence.

Had you been saying something about the machine specs, that would
have made sense in retrospect. AND I would have agreed to that
because that's something admittedly my past experience obfuscated.
But even after seeing my post, I am not very thrilled about
this insistence on something that doesn't make sense.

I am a contributor elsewhere, so I respect your efforts here...
but beating around the bush on a generalization can tend to be
offensive.
 
  


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
100% cpu use 100% of the time serafean Linux - Newbie 4 05-04-2006 04:36 PM
cpu usage stuck to 100% all the time mohama Linux - Software 0 03-05-2006 02:12 PM
ubuntu smp: why is kswapd0 taking 100% CPU time? eantoranz Linux - Software 0 10-18-2005 03:38 PM
XMMS skipping and stopping under 100% cpu time (*not load) guardian653 Linux - Software 3 10-26-2004 08:16 PM
Grip - rips are very slow and take 100% cpu time Mad Merlin Linux - Software 3 05-02-2004 01:16 PM


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