Announcement

Collapse
No announcement yet.

CPU at High 97 -100 %

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

    CPU at High 97 -100 %

    w2k
    HS1.7.30


    I have a "not responding HS" with the following data just before the
    "hang".

    This has occured about every 3 -7 days in the last 3 weeks.

    Any suggestions, I know the new version is coming out so if you have any "in the mean time suggestions" please ?

    (is it the cnn script or weather.xml script... how could I debug or set HS to get "past" this issue. any others with same type issue?)


    2/14/2005 6:34:23 AM~!~Event Trigger~!~Recurring Trigger (Weather XML this drives weather updates)

    2/14/2005 6:34:53 AM~!~Error~!~Script error in file: weathercom_xml.txt: -

    2147467259:The script was aborted because execution exceeded the specified timeout period. in line 745

    2/14/2005 6:34:54 AM~!~Info~!~Scripts running: cnn_alert2.txt


    (restart manual)

    2/14/2005 7:00:26 AM~!~Info~!~HomeSeer version is: 1.7.30
    2/14/2005 7:00:27 AM~!~startup~!~Loading configuration XML file
    2/14/2005 7:00:38 AM~!~startup~!~Restoring device status
    2/14/2005 7:00:38 AM~!~startup~!~Initializing text to speech
    2/14/2005 7:00:43 AM~!~startup~!~Initializing X10 Interface
    2/14/2005 7:00:47 AM~!~startup~!~Initializing Infrared Interface
    2/14/2005 7:00:47 AM~!~startup~!~Initializing Z-Wave Interface
    2/14/2005 7:00:47 AM~!~startup~!~Initializing scripting
    2/14/2005 7:00:47 AM~!~startup~!~Initializing I/O
    2/14/2005 7:00:47 AM~!~Web Agent Plugin~!~Register callback completed

    END
    Attached Files
    Last edited by Richard; February 14, 2005, 09:59 AM. Reason: update
    HS3 Standard Edition 3.0.0.258

    #2
    I was having similiar problems not too long ago where HS would lock up for no apparent reason. While checking my log file I notice how large it was as well how long it took to open. Everything that had happened on my system for the past year and a half was in there. I deleted that file and had HS recreate it. Once I did that my system has only had problems when I do something wrong with configuration issues which is to be expected from time to time and is easy to correct.

    Comment


      #3
      Richard,
      This is not unusual for HS to go unresponsive during the execution of a script. HS is a single threaded (currently) model that only allows a single execution at a time. This is normally not a problem and the fact that it goes to 100% CPU is also not a problem. What is a problem is if it does this for long periods of time. The problem arises when one of your scripts is having a problem finishing a task. Both of the scripts you mentioned are trying to access some data on the web and apparently either the site is down that it is accessing or your connection is down.

      Both of these scripts need the inclusion of the SetRemoteTimeout method added to them and this would alleviate a lot of your problems.
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #4
        CPU high

        Thanks ,

        I will look into the SetRemoteTimeout method also.

        'Example
        ' set the remote timeout to 30 seconds

        hs.SetRemoteTimeout 30

        I will try out...

        Richard G
        HS3 Standard Edition 3.0.0.258

        Comment


          #5
          Even though some people have HS uptimes surpassing a year, I reboot my HA computer every night to get rid mysterious little problems.


          ~Bill

          Comment


            #6
            Running a script as a seperate process

            If you have a particular script that can take a long time, or is fired quite frequently, it is possible to run it as a seperate process from HomeSeer.

            John00 has a great tutorial on his website explaining how it is done. It is actually quite simple and a matter of changing one line in your current HS script. Go to his website, and at the top choose the "Information" pulldown, and select "Tips & Script snippits". It is the 5th tip down in the list.

            This will run it as a seperate windows process, and will not effect HS, and can be end tasked if a problem arises, leaving HS running without a problem.

            You can check his site out (Link Removed) See the code posted below in another message)
            Last edited by johnwpb; February 15, 2005, 12:11 PM.
            Visit My Home Seer Site at:
            www.JohnWPB.com
            Created with LCARS

            Comment


              #7
              Running a script as a seperate process

              I too have used John00's trick on several scripts and it works great. I have freed up two bottlenecks I had using this technique. Give it a try.
              Dick
              HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

              Comment


                #8
                I have converted most of my scripts from .txt to .vbs and this works very well. However, I do still get CPU stuck at 100% when I leave the GUI on the "Devices" tab. If I leave it on the "Events" or "Log" tab I have very few problems.

                Phill

                Comment


                  #9
                  I knew there was a way to run scripts in a separate thread but never got around to doing it. Now I am motivated again but I guess I will wait for HS 2.0 (don't start on the where is HS 2.0 and no I do not know when either) since I will have to do slight modification of my scripts at that time as well.
                  Jim Doolittle

                  My Twitter
                  My Hardware & Software

                  Comment


                    #10
                    What is the tip. The tips pages never returns here. I just get a timeout.
                    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                    Comment


                      #11
                      How to run a script as a seperate process by Jon00

                      I hope Jon00 Dosent mind my posting the info here. This information was written by him, and taken dirrectly from his home page:

                      -------------------------------------------------------------------
                      Jon00 Writes:
                      You may have noticed that Homeseer sometimes goes to a crawl when running multiple scripts at the same time. This is especially true when obtaining information from the web. It is possible to make Homeseer much more responsive by converting scripts to run using Windows script rather than Homeseer.

                      Here's how to do it:

                      1) Open up the homeseer script in a text editor such as notepad.
                      2) Delete sub main() from the top of the script and replace it with Set hs = CreateObject("HomeSeer.Application")
                      3) Delete end sub from the bottom of the script.
                      4) Save & rename your script with the extension .vbs . For example a script called weather.txt now becomes weather.vbs
                      5) Modify the event that runs the script by replacing the script name in the scripting box with the following:

                      weather.txt would be replaced by:

                      &run=hs.launch ("C:\WINNT\system32\wscript.exe","scripts\weather.vbs")

                      when using Windows 2000 or

                      &run=hs.launch ("C:\windows\system32\wscript.exe","c:\progra~1\homeseer\scr ipts\weather.vbs")

                      when using Win9X & XP

                      Thats it! Because Windows script runs as a separate process (thread), Homeseer can get on to do others things.
                      Visit My Home Seer Site at:
                      www.JohnWPB.com
                      Created with LCARS

                      Comment


                        #12
                        No not a problem.

                        Well it is actually....as soon as you posted my site with these details John, I had about 15 people visit my web server all at once. It looks like HS did not like it as it white screened with high CPU for 2 hours before I noticed something was wrong. (Hence you could not get access Rupp!)

                        Since 1.7 - there has always been something flaky about multiple guest access and Homeseer stability.

                        Talk about ironic: high CPU & Homeseer is what this thread is all about!
                        Jon

                        Comment


                          #13
                          Sorry!

                          Jon, My sincere appolagies! Woah... Your site is listed in your signature, any your new email script in the script library links dirrectly to your site for download, so I didnt think it would be a problem from that aspect anyways. I didnt factor in the traffic that could come of it! Anyhow I removed the link from my previous posting, and now the code is in this thread, and hopefully that will be the end of that.

                          Sorry for the traffic influx, it certainly was not intentional.

                          And yes, what a twisted web we weave! I link to your site to share your info on how people can keep HS from pegging ther processors. In turn it pegs your computer, the one that wrote the information to help others not peg theirs!!! Not sure if that is so easy to follow! Shew!
                          Visit My Home Seer Site at:
                          www.JohnWPB.com
                          Created with LCARS

                          Comment


                            #14
                            When you have simple scripts then conversion by editing the file and making a .vbs works well. When you have includes in your script then you will want to package it as a .wsh. mcsMovement does this overhead and will take the raw .txt file and run it in its own process. It will also provide a virtual device that can be used to monitor or terminate the script.

                            Comment


                              #15
                              John,

                              Sorry, my post was not meant to be an attack on you - it was a tounge in cheek remark. I just re-read my post and it does sound bad

                              There is no problem you posting my site and as you say, I do actively promote it! Take it as British humo(u)r gone wrong!

                              My point was really that Homeseer seems to crumble with lots of guest access since V1.7

                              The worst time I had for guest access was when my site was published on the UK Home automation listings on a Saturday morning last year. I had over 250 visits that day and Homeseer (V1.6) did not even bat an eye lid. Now, it regularly crashes with several people visiting at the same time.
                              Jon

                              Comment

                              Working...
                              X