Find the answer to your Linux question:
Results 1 to 6 of 6
I have recently moved a J2ee aplication from Solaris to Red Hat. I am finding that the Linux box is running at 100% but I can not find any processes ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2006
    Posts
    2

    CPU at 100% but unable to find process using CPU


    I have recently moved a J2ee aplication from Solaris to Red Hat. I am finding that the Linux box is running at 100% but I can not find any processes that is consuming more that 1% of the CPU

    The load average of the new production Linux box is 10 – top shows that it is 3% idle.

    If I check this with vmstat and sar I can see that the box is indeed very busy. Busy with CPU usage not on disk I/O – and USR cpu rather that SYS cpu

    The problem is I want to identify what is using all the CPU.
    When I use top or some of the different options with the ps command I can not see any process that is using more than 1% of the CPU.

    This just doesn’t make sense to me? Any ideas ? Many thanks.


    top - 12:02:32 up 34 days, 56 min, 1 user, load average: 10.68, 10.90, 10.75
    Tasks: 180 total, 2 running, 171 sleeping, 0 stopped, 7 zombie
    Cpu(s): 97.6% us, 0.1% sy, 0.0% ni, 2.4% id, 0.0% wa, 0.0% hi, 0.0% si
    Mem: 8304564k total, 5093332k used, 3211232k free, 89616k buffers
    Swap: 8385888k total, 160k used, 8385728k free, 3164284k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    8357 stephenh 16 0 2616 1016 748 R 0.6 0.0 0:01.26 top
    1 root 16 0 2996 512 436 S 0.0 0.0 0:05.11 init
    2 root RT 0 0 0 0 S 0.0 0.0 0:37.08 migration/0
    3 root 34 19 0 0 0 S 0.0 0.0 0:00.68 ksoftirqd/0
    4 root RT 0 0 0 0 S 0.0 0.0 0:01.98 migration/1
    5 root 34 19 0 0 0 S 0.0 0.0 0:00.42 ksoftirqd/1
    6 root RT 0 0 0 0 S 0.0 0.0 0:26.92 migration/2
    7 root 34 19 0 0 0 S 0.0 0.0 0:00.44 ksoftirqd/2
    8 root RT 0 0 0 0 S 0.0 0.0 0:02.02 migration/3
    9 root 34 19 0 0 0 S 0.0 0.0 0:00.41 ksoftirqd/3
    10 root 5 -10 0 0 0 S 0.0 0.0 0:00.02 events/0
    11 root 5 -10 0 0 0 S 0.0 0.0 0:00.01 events/1
    12 root 5 -10 0 0 0 S 0.0 0.0 0:00.01 events/2
    13 root 5 -10 0 0 0 S 0.0 0.0 0:00.02 events/3
    14 root 11 -10 0 0 0 S 0.0 0.0 0:00.01 khelper
    15 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid
    108 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
    109 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/1
    110 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/2
    111 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/3
    112 root 15 0 0 0 0 S 0.0 0.0 0:00.12 khubd
    121 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
    122 root 15 0 0 0 0 S 0.0 0.0 0:19.06 pdflush
    124 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 aio/0
    125 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 aio/1
    126 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 aio/2
    127 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 aio/3
    123 root 15 0 0 0 0 S 0.0 0.0 1:01.54 kswapd0
    200 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
    275 root 22 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
    293 root 15 0 0 0 0 S 0.0 0.0 0:11.19 kjournald
    1288 root 6 -10 2648 460 376 S 0.0 0.0 0:00.01 udevd
    1871 root 15 0 0 0 0 S 0.0 0.0 0:00.00 kjournald
    1872 root 15 0 0 0 0 S 0.0 0.0 0:00.00 kjournald
    1873 root 16 0 0 0 0 S 0.0 0.0 0:44.45 kjournald
    1874 root 15 0 0 0 0 S 0.0 0.0 0:00.51 kjournald
    1875 root 15 0 0 0 0 S 0.0 0.0 0:02.96 kjournald
    2415 root 16 0 3284 588 500 S 0.0 0.0 0:02.66 syslogd
    2419 root 16 0 1876 472 404 S 0.0 0.0 0:00.00 klogd
    2430 root 16 0 2684 472 400 S 0.0 0.0 0:31.93 irqbalance
    2441 rpc 20 0 2696 592 496 S 0.0 0.0 0:00.00 portmap
    2461 rpcuser 17 0 3008 768 668 S 0.0 0.0 0:00.00 rpc.statd
    2494 root 16 0 4484 1008 844 S 0.0 0.0 0:03.57 rpc.idmapd
    2575 root 24 0 3224 556 480 S 0.0 0.0 0:00.00 acpid
    2613 root 16 0 4220 1656 1368 S 0.0 0.0 0:01.21 sshd
    2628 root 21 0 3172 852 720 S 0.0 0.0 0:00.00 xinetd


    [stephenh@prdas01 bin]$ vmstat 1 20
    procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
    r b swpd free buff cache si so bi bo in cs us sy id wa
    13 0 160 3240776 89736 3164424 0 0 3 0 2 1 17 0 83 0
    12 0 160 3240720 89736 3164424 0 0 0 36 1102 528 92 1 7 0
    15 0 160 3240720 89736 3164424 0 0 0 0 1132 688 100 0 0 0
    16 0 160 3240720 89736 3164424 0 0 0 88 1439 865 93 0 7 0
    15 0 160 3240208 89736 3164424 0 0 0 0 1300 829 100 0 0 0
    2 0 160 3238920 89744 3164416 0 0 0 112 1222 982 93 4 3 0
    14 0 160 3240264 89744 3164416 0 0 0 0 1065 613 96 1 3 0


    08:50:02 AM CPU %user %nice %system %iowait %idle
    09:00:02 AM all 89.77 0.00 0.23 0.13 9.87
    09:10:02 AM all 89.76 0.00 0.23 0.05 9.97
    09:20:03 AM all 88.66 0.00 0.22 0.01 11.10
    09:30:03 AM all 89.70 0.00 0.24 0.10 9.96
    09:40:04 AM all 88.77 0.00 0.24 0.05 10.93
    09:50:03 AM all 87.67 0.00 0.32 0.03 11.97
    10:00:03 AM all 89.76 0.00 0.26 0.07 9.92
    10:10:03 AM all 88.70 0.00 0.29 0.01 11.01
    10:20:03 AM all 89.74 0.00 0.25 0.00 10.01
    10:30:03 AM all 88.70 0.00 0.29 0.02 10.99
    10:40:02 AM all 89.68 0.00 0.23 0.00 10.09
    10:50:04 AM all 89.86 0.00 0.28 0.00 9.85
    11:00:02 AM all 88.57 0.00 0.27 0.04 11.13
    11:10:01 AM all 89.70 0.00 0.26 0.01 10.03
    11:20:03 AM all 88.73 0.00 0.27 0.00 11.00
    11:30:03 AM all 87.69 0.00 0.29 0.02 12.01
    11:40:01 AM all 88.62 0.00 0.29 0.01 11.08
    11:50:02 AM all 87.64 0.00 0.36 0.01 11.98
    12:00:02 PM all 87.66 0.00 0.29 0.03 12.01
    Average: all 89.48 0.00 0.35 0.09 10.08

  2. #2
    Just Joined!
    Join Date
    May 2006
    Location
    Wales, UK
    Posts
    4
    In top (uppercase) P sorts by CPU. IIRC, top should show all processes even when run as an unprivileged user.

    I wonder, is this a multiprocessor machine?

  3. #3
    Just Joined!
    Join Date
    Aug 2006
    Posts
    2
    Quote Originally Posted by ellis
    In top (uppercase) P sorts by CPU. IIRC, top should show all processes even when run as an unprivileged user.

    I wonder, is this a multiprocessor machine?
    /-------------------------------

    yes this is a 2 cpu machine.

    I used mpstat and could see one line for each cpu - both cpu's where very busy - 5% idle.

    I made sure to run all the commands as root as well as the underpriviliged user - all are identical.

    thanks, stephen

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    May 2006
    Location
    Wales, UK
    Posts
    4
    OK. My gut instinct was that it was a multi-processor machine, and that you are seeing issues somehow related to that.

    A lot of code is written on unicore systems, and not really tested or optimised for SMP. If possible I'd try the same configuration on a single processor machine and see what it does.

  6. #5
    Linux User DThor's Avatar
    Join Date
    Jan 2006
    Location
    Ca..na...daaa....
    Posts
    319
    I agree. I think the problem is with the programs you're running to check the sys activity, not the system. It's black magic mojo anyway, measuring system activity. I trust top, within reason. If it says you're quiet, you're quiet.

    DT

  7. #6
    Just Joined!
    Join Date
    Feb 2009
    Posts
    1
    Try to disable acpi.
    I don't know why, but sometimes this is the problem (in the kernel line, on grub, put acpi=off)
    If it worked, a better situation is: acpi=ht (that does not disable hyperthreading)

    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •