Announcement

Collapse
No announcement yet.

Linux CPU usage > 100%

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Linux CPU usage > 100%

    From time to time my HS4 Linux install slows to a crawl when I try to access certain screens (logfile in particular). When it happens and I check the Linux TOP command it shows (System)_xx-ABC is using more than 100% of CPU usage. In the output below, run today, it shows (System)_06-Nov but today's date is 11/13. The only remedy is to restart the system.

    What could be causing the drain?

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    485 root 20 0 2562912 332436 36864 S 100.3 4.1 607:10.10 (System)_06-Nov
    946 root 20 0 1777872 168828 31084 S 1.0 2.1 102:09.31 mono
    862 root 20 0 1028348 84100 22372 S 0.3 1.0 22:08.47 mono

    #2
    Could be Mono related (type mono --version)
    What version do you have and if at all run any scripts...


    # htop


    Eman.
    TinkerLand : Life's Choices,"No One Size Fits All"

    Comment


      #3
      Not an answer to your question, but can offer some interpretation.

      Run this command
      Code:
      ps -fp 485
      replacing the 485 with the PID from the leftmost column of the top output.

      For me, the top output is
      Code:
      31823 root      20   0  263332 143276  42440 S   1.3   1.8   4250:44 (System)_23-Oct
      and the ps output is
      Code:
      UID        PID  PPID  C STIME TTY          TIME CMD
      root     31823     1 13 Oct23 ?        2-22:50:44 /usr/bin/mono HSConsole.exe --log
      Note the process start time (STIME) of Oct23 corresponds to the value in the top output process label.

      PS. you might find that the 'htop' command output is easier to read than that of 'top'.

      Comment


        #4
        This is what I got from #fp -pf 491

        UID PID PPID C STIME TTY TIME CMD
        root 491 1 98 17:59 ? 00:39:57 /usr/bin/mono HSConsole.exe --lo

        Mono version is:
        Mono JIT compiler version 6.12.0.122 (tarball Mon Feb 22 17:33:15 UTC 2021)
        Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS: __thread
        SIGSEGV: altstack
        Notifications: epoll
        Architecture: amd64
        Disabled: none
        Misc: softdebug
        Interpreter: yes
        LLVM: yes(610)
        Suspend: hybrid
        GC: sgen (concurrent by default)


        Any ideas would be greatly appreciated.
        HomeSeer V4.2.5.0
        Linux 4.9.0-16-amd64 #1 SMP Debian 4.9.272-2 (2021-07-19) x86_64 GNU/Linux

        Comment


          #5
          Hello,

          I as your Mono seems fine and was hoping zwolfpack was looking at this, please give a rundown of what if any scripts or running Node-RED (as with Node-RED and/or MQTT) may also cause this issue if disconnected from the server.
          There also may be a script gone rouge. Check your routines in the Event setup and also compare to what's happening in the log.

          Z-wave....???...hmm...


          Eman.
          TinkerLand : Life's Choices,"No One Size Fits All"

          Comment


            #6
            Are you still seeing the errors from HSPI_rnbWeather.exe in your logs?

            I have not seen any more errors since redoing the GPS coordinates here in rnb weather. I honestly do not know what it was causing the issue.

            Disable the rnbWeather plugin for a bit and see what happens.

            Same mono version as above listed here on Ubuntu 20.04.

            Top 4 mono hitters in top here are:

            Code:
            root@ICS-HS4:~# ps -fp 379564
            UID PID PPID C STIME TTY TIME CMD
            root 379564 377684 3 Nov12 ? 01:08:29 mono CumulusMX.exe
            root@ICS-HS4:~# ps -fp 10885
            UID PID PPID C STIME TTY TIME CMD
            root 10885 10874 1 Nov10 ? 00:57:58 mono /app/OmniLinkBridge.exe -i -c /app/OmniLinkBridge.ini
            root@ICS-HS4:~# ps -fp 15606
            UID PID PPID C STIME TTY TIME CMD
            root 15606 15550 0 Nov10 ? 00:15:17 /usr/bin/mono /opt/HomeSeer/HSPI_rnbWeather.exe
            root@ICS-HS4:~# ps -fp 15631
            UID PID PPID C STIME TTY TIME CMD
            root 15631 15550 0 Nov10 ? 00:15:26 /usr/bin/mono /opt/HomeSeer/HSPI_WEATHERXML.exe
            root@ICS-HS4:~# ps -fp 15615
            UID PID PPID C STIME TTY TIME CMD
            root 15615 15550 0 Nov10 ? 00:23:18 /usr/bin/mono /opt/HomeSeer/HSPI_MCSMQTT.exe
            Code:
            root@ICS-HS4:~# cat /proc/cpuinfo | grep 'model name' | uniq
            model name : Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
            Code:
            root@ICS-HS4:~# grep MemTotal /proc/meminfo
            MemTotal: 16314596 kB
            I did have weatherxml set to informational logging and saw it filling the logs so changed that setting to errors only.
            - Pete

            Auto mator
            Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
            Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
            HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

            HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
            HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

            X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

            Comment


              #7
              Knock on wood, I think this is fixed. I disabled and then re-enabled the Device History plugin and CPU load is back to normal. I picked that Plugin because I figured it might be constantly checking device statuses. If the CPU pegs again I'll leave the plugin disabled and key an eye on the CPU load.

              Comment


                #8
                I have seen something similar with the z-wave ui plugin.

                Comment


                  #9
                  Originally posted by pistacheL0 View Post
                  I have seen something similar with the z-wave ui plugin.
                  Thanks, but I don't use the Zwave UI plugin. I disabled it the first time I used it. Linux is still stable overnight - so far.

                  Comment


                    #10
                    Originally posted by avpman View Post
                    Knock on wood, I think this is fixed. I disabled and then re-enabled the Device History plugin and CPU load is back to normal. I picked that Plugin because I figured it might be constantly checking device statuses. If the CPU pegs again I'll leave the plugin disabled and key an eye on the CPU load.
                    FYI, I get the same thing with the Device History plugin. I ended up disabling it until I figure out exactly what I want to track...
                    HS4Pro on a Raspberry Pi4
                    54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
                    Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

                    HSTouch Clients: 1 Android

                    Comment


                      #11
                      Originally posted by rmasonjr View Post

                      FYI, I get the same thing with the Device History plugin. I ended up disabling it until I figure out exactly what I want to track...
                      Good to know I (we) pinned it down. Thanks, Rob!

                      Comment


                        #12
                        Linux CPU usage > 100% - it' back. Grrrrrrrr. I even regressed from .6 to .5 and disabled more plugins. How best to find the culprit? I'm stumped.

                        Comment


                          #13
                          Originally posted by avpman View Post
                          Linux CPU usage > 100% - it' back. Grrrrrrrr. I even regressed from .6 to .5 and disabled more plugins. How best to find the culprit? I'm stumped.
                          Do you have MQTT anywhere in your setup?

                          Plus can you update the system or you already done that...?



                          Eman.
                          TinkerLand : Life's Choices,"No One Size Fits All"

                          Comment


                            #14
                            Originally posted by Eman View Post

                            Do you have MQTT anywhere in your setup?

                            Plus can you update the system or you already done that...?



                            Eman.
                            No MQTT (yet). "...update the system?" Not sure what you mean. I updated to .6 and coincidently the issue resurfaced so I downgraded it back to .5. As of now, the CPU usage is normal. Chasing this down is like trying to nail Jello-O to the wall.

                            Comment


                              #15
                              Originally posted by avpman View Post

                              No MQTT (yet). "...update the system?" Not sure what you mean. I updated to .6 and coincidently the issue resurfaced so I downgraded it back to .5. As of now, the CPU usage is normal. Chasing this down is like trying to nail Jello-O to the wall.
                              I meant the OS but assumed you'd already done that... as pending updates may affect a system with MQTT and Node-RED which you have mentioned that you don't have.

                              A remote sensor which need battery replacement...?? But this would affect Z-wave and would should show in the logs

                              Or even some plug-in logging heavily to disk...??


                              Eman.
                              TinkerLand : Life's Choices,"No One Size Fits All"

                              Comment

                              Working...
                              X