Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
  • I am running a program foo
  • It has been running for close to 30 days now (even more)
  • Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the top of top sorted for CPU usage)
  • Now it is nowhere near the top of CPU usage (top shows 0%)
  • The Top 10 cpu intensive process (according to ps) are:

ps auxc | sort -r -k 3 | head -10

USER       PID %CPU  %MEM     VSZ    RSS TTY      STAT START   TIME      COMMAND  
bilbo    32734 15583  0.0   17816    960 pts/16   R+    2012 24322737:01 foo
bilbo    30916 10.1   0.5 1754340  22344 ?        Sl   Jan12      128:06 chrome
root      1119  9.8   0.8  241288  31704 tty7     Ss+   2012     6707:23 Xorg
bilbo    29177  9.3  15.5 1178348  10524 ?        Sl   01:11      106:47 opera
bilbo    30635  6.3   0.5  696972  23156 ?        Sl   01:12       72:13 opera:libflashp
bilbo    25415  1.4   3.2  805156 126352 ?        Sl   Jan12       18:28 chrome
bilbo    27576  1.0   0.2  373844  11060 ?        S     2012      220:13 compiz
root     12642  0.9   0.4  342848  17156 ?        Ssl  12:12        4:38 firestarter
bilbo     3197  0.7   0.4   84832  19436 ?        Ss    2012      508:10 screen
bilbo    29956  0.7   0.2  371612  10180 ?        Sl   12:02        3:34 plugin-containe
  • In the above table foo is at the top, but the %CPU it is being shown to use is 15583. This value seems nonsenical.
  • However I am still seeing one of the processors being utilised at near 100% capacity
  • Running ps gives me the following output

ps -eF | grep foo

UID     PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD

bilbo 32734 20655 99  4454  3380   0  2012 pts/16   1184016092-19:52:29 foo

ps aux | grep foo

USER    PID %CPU  %MEM   VSZ   RSS TTY      STAT START   TIME COMMAND
bilbo 32734 15602  0.0 17816  3380 pts/16   R+    2012 24322737:01 foo
  • The output of uptime is

up 46 days, 12:43, 19 users, load average: 1.58, 1.37, 1.82

  • It seems to me the TIME values returned by ps, 1184016092-19:52:29 (from ps -e) and 24322737:01 (from ps aux), are impossibly large
  • The utime and stime returned by /proc/32734/stat are: 85714817892 and 4611685975569777027 respectively.
  • I was anticipating a very large output, and I wanted to count the number of lines so I piped the output of foo to wc -l. In hindsight I should have done tail -f to see if the program was running.
  • Nice value of foo is 0

Question: Is foo still running?

Output of uname -a

Linux rivendell 2.6.32-44-generic #98-Ubuntu SMP Mon Sep 24 17:27:10 UTC 2012 x86_64 GNU/Linux

I am running Ubuntu 10.04.4 LTS

Happy to provide more details if required.

share|improve this question
    
Perhaps using 15000% of the CPU caused foo to enter a space-time anomaly, where it spent ~2700 years of processor time and has now returned. Question: did you just notice these weird stats now? What was up with foo 2 weeks ago? –  TAFKA 'goldilocks' Jan 14 '13 at 11:46
    
It was working fine, using 100% of any given processor at a time. I noticed these weird stats ~2 weeks ago. –  latexnewbie Jan 14 '13 at 17:40
    
@latexnewbie did you determine the cause for this? I'm seeing the same problem as well. –  Dana the Sane Aug 30 '13 at 16:54
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.