Announcement

Collapse
No announcement yet.

Running Linux, How to find what each HSPI_ZWare.exe is controlling

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

    Running Linux, How to find what each HSPI_ZWare.exe is controlling

    My system is basically running very well however I do see a few of the PIDs which are running HSPI_ZWave.exe as being the most active. One seem to always use over 10% and sometimes it can peak out near 80%. The vast majority of them use very little CPU. It's just a few that seem to hog.

    I'd like to figure out why they seem to use more of the processor than all of the other PIDs running HSPI_ZWave.exe.

    Is there any way to find out what device address each PID running HSPI_ZWave.exe is controlling? I'm hoping there is a file that correlates PIDs to device nodes.

    If there isn't I think there needs to be one. It only has to be created or updated whenever a device node is started. Something as simple as a text file listing something like this.

    PID Address
    774 F9B53A15-028

    This way we'd know that the module running on PID 774 is controlling the device at address F9B53A15-028 which would then point you to the node. Now we'd be able to tell what nodes are hogging the system resources. The same could be done for all the fixed modules that HS3 spawns off.


    BTW, I'm using htop to monitor processor usage.
    HomeSeer Version: HS3 Standard Edition 3.0.0.548
    Linux version: Linux auto 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    Number of Devices: 484 | Number of Events: 776

    Enabled Plug-Ins: 3.0.0.13: AirplaySpeak | 2.0.61.0: BLBackup
    3.0.0.70: EasyTrigger | 1.3.7006.42100: LiftMaster MyQ
    4.2.3.0: mcsMQTT | 3.0.0.53: PHLocation2 | 0.0.0.47: Pushover 3P
    3.0.0.16: RaspberryIO | 3.0.1.262: Z-Wave

    Z-Net version: 1.0.23 for Inclusion Nodes
    SmartStick+: 6.04 (ZDK 6.81.3) on Server

    #2
    I am not sure you can relate a specific PID under the Mono ZWave service to a specific node.

    Right now the way I use HTOP is to look at the specific mono processes running.

    IE: right now my ZWave PID / processes are higher than the Homeseer Console (core) processes.

    Relating the getting granular I think you would have to log all of the mono processes.

    That is where I start HS3 via the terminal command of ./go.

    This shows the before and after HS3 stuff runs and gets very granular.

    BTW there is also another command for mono services called mono-services.

    If you type mono-services hs3 command it turns it in to a mono service which is different than a linux service a bit.
    - 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


      #3
      Originally posted by Pete View Post
      I am not sure you can relate a specific PID under the Mono ZWave service to a specific node.

      Right now the way I use HTOP is to look at the specific mono processes running.

      IE: right now my ZWave PID / processes are higher than the Homeseer Console (core) processes.

      Relating the getting granular I think you would have to log all of the mono processes.

      That is where I start HS3 via the terminal command of ./go.

      This shows the before and after HS3 stuff runs and gets very granular.

      BTW there is also another command for mono services called mono-services.

      If you type mono-services hs3 command it turns it in to a mono service which is different than a linux service a bit.
      I've looked around and figured HS3 didn't log what the PID was when they started each device. Would be nice to do, and I believe it would be quite easy to program in, so one could find out what node was connected to what PID. The same thing could even be done in windows although the format would be different.

      So when you're testing you just manually start HS3 from the /usr/local/HomeSeer directory rather than have it auto start.

      I assume that I'll need to run two ssh sessions so I could run top on one while HS3 is running on the other but that's easy.

      I wish I understood better the relationship between the processor but what I think is going on is that HSConsole it all of the basic stuff and the HSPI are all of the various add ons. I guess I just need to sit down and read the developer docs to better understand this.

      You said, "mono-services..." that's a new one for me but then I don't completely understand mono. What the difference between starting HS3 under mono services rather then under Linux services and why would one want to?

      As a side note, I'm getting really close to swapping out the RPi 2 in my ZeeS2 to a RPi 3. I really think that the extra processing power will help. It's not that the Pi is running slow in general but when you go to edit events it does take a while to open up an event group. However before I do that I need to be able to do a complete ground up install on another card and I'm not quite there yet.
      HomeSeer Version: HS3 Standard Edition 3.0.0.548
      Linux version: Linux auto 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
      Number of Devices: 484 | Number of Events: 776

      Enabled Plug-Ins: 3.0.0.13: AirplaySpeak | 2.0.61.0: BLBackup
      3.0.0.70: EasyTrigger | 1.3.7006.42100: LiftMaster MyQ
      4.2.3.0: mcsMQTT | 3.0.0.53: PHLocation2 | 0.0.0.47: Pushover 3P
      3.0.0.16: RaspberryIO | 3.0.1.262: Z-Wave

      Z-Net version: 1.0.23 for Inclusion Nodes
      SmartStick+: 6.04 (ZDK 6.81.3) on Server

      Comment


        #4
        So when you're testing you just manually start HS3 from the /usr/local/HomeSeer directory rather than have it auto start.

        I assume that I'll need to run two ssh sessions so I could run top on one while HS3 is running on the other but that's easy.


        No just one terminal session and you type ./go and leave the terminal window going.

        You will see stuff before the web gui starts and after. Shut down HS via the web gui and continue to watch the terminal session. IE: if a plugin keeps running you will see a bunch of mono errors.

        Personally I did not know what mono-service was until I tested a mono program running concurrently on the HS3 box. It is my OmniPro to Samsung Smarthings program.

        Here have initially run my HS3 Zee2 on a RPi2 with Wheezy and never had any issues with 5 plugins.

        Over the last few months (now over a year) put the HS3 Lite on a Pine64 2Gb computer and went to using Ubuntu 16.04 64 bit. I do not have issues with this computer. I also ran it on the XiS Xi5A dual core mini Cube PC with no issues.

        I think maybe some of the issues here are maybe related to running never ending circular scripts or events. IE: an event that checks status and creates variables 10 deep...many years ago here would constantly monitor HS to make sure it was working...then also would have it message me on events or use TTS with every event running. To be honest I honestly can only guess what is happening with some.
        - 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


          #5
          I'll give that a try. I was wondering, what order are the HSPI plugins loaded? That would allow me to figure out which Z-Wave device it is. Every time I boot the plugins seem to be loaded in the same order as I would expect.

          Anyway the one consuming the most cpu cycles is actually the first ZWave device loaded. I can count through them and find the others that are the mosts active. If they happen to be loaded in node order, a reasonable way to load them, then that would mean the first one is node 1 which is the host controller its self. That makes sense as it's the most busy.
          HomeSeer Version: HS3 Standard Edition 3.0.0.548
          Linux version: Linux auto 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
          Number of Devices: 484 | Number of Events: 776

          Enabled Plug-Ins: 3.0.0.13: AirplaySpeak | 2.0.61.0: BLBackup
          3.0.0.70: EasyTrigger | 1.3.7006.42100: LiftMaster MyQ
          4.2.3.0: mcsMQTT | 3.0.0.53: PHLocation2 | 0.0.0.47: Pushover 3P
          3.0.0.16: RaspberryIO | 3.0.1.262: Z-Wave

          Z-Net version: 1.0.23 for Inclusion Nodes
          SmartStick+: 6.04 (ZDK 6.81.3) on Server

          Comment

          Working...
          X