Announcement

Collapse
No announcement yet.

system uptime script

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

  • system uptime script

    Does anyone have a script around which I could run from HS which provides the system (not HS) uptime? I'd like to monitor how long my server has been up and populate a status device. I'm currently monitoring HS uptime , but I will be stopping/restarting HS once a week and would like to know how long my server has been running.

    Rob
    HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

  • #2
    Looks like it's going to be me again

    Try the attached.

    Open up the script in a text editor and set the Housecode to a free virtual device. Save and run the script!

    It will automatically create the virtual device for you.
    Attached Files
    Jon

    Comment


    • #3
      Thats a handy script.. would be better if it created another device for Record Uptime

      TrOjAn

      Comment


      • #4
        Originally posted by langenet View Post
        ................. I'm currently monitoring HS uptime , but I will be stopping/restarting HS once a week and would like to know how long my server has been running.

        Rob
        Out of curiosity why are you stopping/restarting HS once a week?
        sigpic
        A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
        HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
        BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
        BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

        Comment


        • #5
          Well... I haven't yet decided on the interval - perhaps every 14 days or so. Basically because my HS memory foot print was getting large and a shutdown/restart would clear things up. I observed 200 MB average working set size after 33 days. After I performed a restart, I noticed some improvement on web page loading as well.

          This is still up for further review.

          Rob
          HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

          Comment


          • #6
            Thank you very much Jon. Exactly what I was looking for!!!
            HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

            Comment


            • #7
              If it is memory based I'd load DooCPU and you can trigger off of various performance / usage levels.

              Personally I'd have it check used memory at 11:45 PM and set it to reboot then if you are getting up there.

              If it is strictly a memory issue you may want to google BLGarbage.


              Originally posted by langenet View Post
              Well... I haven't yet decided on the interval - perhaps every 14 days or so. Basically because my HS memory foot print was getting large and a shutdown/restart would clear things up. I observed 200 MB average working set size after 33 days. After I performed a restart, I noticed some improvement on web page loading as well.

              This is still up for further review.

              Rob


              ~Bill

              Comment


              • #8
                Well... I donno, I wanted to see how HS would run after a long perioid of time with respect to resource usage. When I ran HS 1.7.44, the server got to a spot as far as memory usage was concerned and lived there forever. Mind you, I am doing more with HS 2 and concluded the upgrade as a positive thing. (Actually, I didn't upgrade - but rather rebuilt from scratch)

                With having HS 2.3.019 up since Februrary (finally after purchasing the upgrade license way back in 2005), I wanted to see if this was also the case. Though perhaps not my best analysis, I did notice after 32 + days memory creaped up despite me running BLGarbadge each morning at 1:00. Also noticed threads going up too.
                I was happy with it running around 150 MB, but then it started to creap to and above 200 MB, I figure why not issue a net stop/start once in a while. I'm leaning more on every 2 weeks and not each week as I mentioned earlier.

                So in the end, is it a serious issue? No, not really. More so just to keep the house clean (sort of).

                I'm still interested on how long folks are keeping their HS systems up for without a shutdown/restart. Of course, there is the 'tinkering factor' which is probably the biggist culpret of restarts.

                Rob
                HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

                Comment


                • #9
                  Ya that .NET can be misleading as far as actual usage compared to it just keeping info in memory.

                  I have HS2 restart itself in the middle of the week and I have the box reboot itself at the end of the week and I don't have (too many) weird issues.


                  ~Bill

                  Comment

                  Working...
                  X