What's using all my CPU cycles


  • Netgate Administrator

    So here is where my basic BSD knowledege is badly letting me down.  :(

    Today I logged into my box to check the logs and find that the CPU is running almost 100% all the time. This is up from 5% at most before 5.30pm today. I have only upgraded to 2.0.1 4 days ago and have been having some trouble with a package but anyway I fired up top -SH and:

    
    [2.0.1-RELEASE][root@pfsense.fire.box]/root(4): top -SH
    last pid: 28083;  load averages:  2.99,  2.83,  1.40                                                 up 0+00:05:22  23:30:31
    116 processes: 5 running, 95 sleeping, 16 waiting
    CPU: 40.4% user,  0.0% nice, 59.6% system,  0.0% interrupt,  0.0% idle
    Mem: 86M Active, 18M Inact, 50M Wired, 1060K Cache, 46M Buf, 330M Free
    Swap:
    
      PID USERNAME PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
     3686 root      76    0 43356K 16348K piperd   0:08  4.98% php
     4445 root      76    0 44380K 19496K ppwait   0:08  3.96% php
     4146 root      76    0 44380K 20300K lockf    0:08  2.98% php
     3510 root      76    0 44380K 17980K piperd   0:08  1.95% php
        0 root     -16    0     0K    88K sched    1:59  0.00% {swapper}
       10 root     171 ki31     0K     8K RUN      0:24  0.00% idle
       11 root     -64    -     0K   128K WAIT     0:07  0.00% {irq14: ata0}
        4 root      -8    -     0K     8K -        0:02  0.00% g_down
     1571 root      44    0  6588K  4400K kqread   0:01  0.00% lighttpd
       11 root     -32    -     0K   128K WAIT     0:01  0.00% {swi4: clock}
       11 root     -24    -     0K   128K WAIT     0:00  0.00% {swi6: task queue}
       11 root     -68    -     0K   128K WAIT     0:00  0.00% {irq18: em0 ath0+}
    23243 root      64   20 47452K 17184K nanslp   0:00  0.00% php
    22313 root      64   20 47452K 17220K nanslp   0:00  0.00% php
    32258 root      64   20 47452K 17220K nanslp   0:00  0.00% php
    59818 root      64   20 47452K 17220K nanslp   0:00  0.00% php
     5983 root      64   20 47452K 17220K nanslp   0:00  0.00% php
    
    

    ps aux doesn't show anything either. How do I find out what's using my CPU cycles?

    Steve



  • check to make sure this isnt checked:


  • Netgate Administrator

    Thanks for the reply, that was my first thought also.
    Checked it, polling is not enabled and never has been. Would be odd that it spontaneously started anyway.

    Steve



  • Is it constant right now?

    From a console-  Restart webconfigurator.


  • Netgate Administrator

    Ah, good suggestion but I have sorted it now.
    I'm not sure it would have worked though since I twice restarted to whole box (you can see the gaps in the RRD graph) and that just made it worse!
    It turns out I had left another computer on with multiple copies of the dashboard open that I had forgotten about. Interesting that the connection survived a reboot.
    However would you not expect to be able to see the system load using top -SH?  :-
    Is there some other tool I could use in future to diagnose something like this?

    Steve


Locked