OPNsense Forum

Archive => 15.7 Legacy Series => Topic started by: 8191 on January 05, 2016, 09:51:43 am

Title: 100% CPU load
Post by: 8191 on January 05, 2016, 09:51:43 am
Hi,

one of my OPNsense boxes has almost constant 100% CPU load since a few days. Interestingly the top command of FreeBSD does not work as expected by me, i.e. the sum of the CPU column does not match the total CPU load (see also e.g. this thread on unix.SE (http://unix.stackexchange.com/questions/166081/total-cpu-usage-and-cpu-usage-under-processes-list-is-different-in-freebsd-top-i)).

How can I find out what's causing the high CPU load?

Here some command output:

Code: [Select]
root@detroid:~ # vmstat 5
 procs      memory      page                    disks     faults         cpu
 r b w     avm    fre   flt  re  pi  po    fr  sr ad0 da0   in   sy   cs us sy id
 2 0 0   1876M  3094M   108   0   0   0   185  10   0   0  781  868  875 70 19 11
 2 0 0   1866M  3102M 22626   0   0   0 24790  21   7   0 2445 12832  909 78 22  0
 2 0 0   1822M  3105M 22811   0   0   0 24790  21   7   0 2359 12778  697 79 21  0
 2 0 0   1690M  3100M 22781   0   0   0 24228  21   7   0 2374 12581  736 78 22  0
 2 0 0   1880M  3090M 22707   0   0   0 23975  21   9   0 2372 24626  759 79 21  0
 3 0 0   1876M  3092M 22881   0   0   0 24790  21   7   0 2423 12801  823 76 24  0
 2 0 0   1872M  3096M 22802   0   0   0 24817  20  14   0 2450 12769  908 79 21  0
 2 0 0   1760M  3101M 22705   0   0   0 24739  22   7   0 2430 12682  846 78 22  0
 2 0 0   1884M  3091M 22942   0   0   0 24172  21   7   0 2406 12734  805 80 20  0
 2 0 0   1879M  3092M 22943   0   0   0 24790  20   7   0 2376 12788  737 78 22  0
 2 0 0   1872M  3097M 23947   0   0   0 26480  21   7   0 2367 14015  799 76 24  0

Code: [Select]
last pid: 96282;  load averages:  2.10,  2.15,  2.11                                                       up 32+22:38:05  09:47:15
81 processes:  4 running, 76 sleeping, 1 waiting
CPU: 62.5% user,  0.0% nice, 37.5% system,  0.0% interrupt,  0.0% idle
Mem: 47M Active, 270M Inact, 499M Wired, 412M Buf, 3100M Free
Swap:
 Not displaying idle processes.
  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
   11 root          2 155 ki31     0K    32K RUN     1 177.9H   1.07% idle
   12 root         16 -72    -     0K   256K WAIT    1 568:38   0.39% intr
14978 root          1  52    0 16972K  2456K wait    1 184:12   0.20% sh
65062 root          1  52    0 16972K  2456K wait    0 207:45   0.10% sh
59697 root          1  20    0 21824K  2964K CPU0    0   0:00   0.10% top
95634 root          1  72    0   113M 22216K RUN     0   0:00   0.00% php
96282 root          1  72    0   109M 20504K CPU1    1   0:00   0.00% php

The system has a AMD G-T40E processor with 2 cores.

Thanks,
Manuel
Title: Re: 100% CPU load
Post by: fraenki on January 05, 2016, 03:57:00 pm
Can you please post the output of this command?

Code: [Select]
top -HS
Title: Re: 100% CPU load
Post by: 8191 on January 05, 2016, 05:46:51 pm
Thanks for the fast reply. I'll post the output once the problem occurs again. Unfortunately I've rebooted the box, since I was afraid of overheating (it already hat 77°C)...
Title: Re: 100% CPU load
Post by: 8191 on January 11, 2016, 09:16:32 am
top -HS does not show anything else :(

Code: [Select]
last pid: 40302;  load averages:  3.40,  3.19,  3.10                                                                        up 4+15:39:58  09:16:43
147 processes: 7 running, 124 sleeping, 16 waiting
CPU: 79.8% user,  0.0% nice, 20.0% system,  0.2% interrupt,  0.0% idle
Mem: 29M Active, 134M Inact, 251M Wired, 364K Cache, 360M Buf, 3501M Free
Swap:

  PID USERNAME   PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
92849 root        52    0   121M 30056K ppwait  1   1:03   3.17% php-cgi
   11 root       155 ki31     0K    32K RUN     1  36.3H   0.49% idle{idle: cpu1}
   12 root       -92    -     0K   256K WAIT    1  31:05   0.10% intr{irq261: re2}
47459 root        52    0 16972K  2452K wait    0   4:39   0.10% sh
33817 mf          20    0 21824K  3172K CPU1    1   0:00   0.10% top

CPU is utilized 80%, but no processes with high load are shown...

This time I have the CPU load on a different OPNsense box than the last time.