Announcement

Collapse
No announcement yet.

Jon00's PerMon package

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

    Jon00's PerMon package

    Jon, I get this error and no devices are created. I am on HS 2.1.104.
    Thanx
    Tim

    8/24/2007 7:01:01 AM ~!~Error~!~Script compile error: 'HSMemoryUsed' is not a member of 'Scheduler.hsapplication'.on line 170
    8/24/2007
    FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

    HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

    #2
    Tim,

    It really is about time you upgraded to V2.2!

    I'm sorry to say that HS Memory Used, Threads and Modules are derived from new additions in Homeseer 2.2. You have 2 choices...disable these 3 readings within the ini file or upgrade to 2 2.
    Jon

    Comment


      #3
      Jon,

      Great work!

      I'd like to replace what I currently do with DooCPU Monitor with your script, as it has more metrics it keeps track of and stuff.

      Right now, I use some of the plugins public methods to get measurements, and I log that to an Access database. I have a web page that I can plot the items over whatever period of time is in the database.

      I thought I could just use DeviceValue to get the status your script measures, but those seem to be just Integers as far as I can tell. For example, my System Committed Memory shows as 12.05, ranging over time from 11.93 to 12.06. When I print what DeviceValue returns, it is simply 12. Oviously without the extra digits of resolution it is a pretty worthless thing to track.

      Am I doing something wrong? Does DeviceValue not work with Single Precision? Do you have any public routines that I could call from my script?

      Thanks for a great script!

      Steve

      Comment


        #4
        Update - I figured out how to parse the full values from the device string. Not the cleanest way, but it will work. If there is an easy way I'm missing, let me know. However, don't bust your tail trying to help me, since this seems to be OK.

        Thanks again.

        Steve

        Comment


          #5
          Steve,

          hs.devicevalue only works with Integers. I could easily add the last value to the ini file if that is easier than parsing the devicestring.
          Jon

          Comment


            #6
            Jon,
            Don't change anything for this silly exercise. I'm the only one, so leave it alone. The parsing seems to be working, so I'll use that. Thanks anyway.
            Steve

            Comment


              #7
              So now that I'm plotting this, it begs the question...

              So what are "threads" and "modules" as reported by this package and by Homeseers HSThreads and HSModules methods?

              Jon's docs don't really say, the release post says see the documentation (help file I would assume), and the help file says these functions provide "diagnostic information and services no other purpose" (sic). Besides the typo, is there something useful here?

              I feel silly asking after Jon's gone to trouble of collecting the data and I've gone throug the trouble of logging it to a database and plotting it on a web page. How silly.

              Anyway, I think I have the idea of a thread. Does someone know what modules are?

              Steve

              Comment


                #8
                Jon,
                Great job! Thanks.

                I had a strange occurrence today and am hoping you can explain what happened. I restarted HS (manually) and sometime later noticed that there were a LOT of devices on my status page. All of them were device code z1, and they appeared to be named the same as the PerfMon devices (that are z50-z57). On closer inspection I noticed that the devices from z50-z57 had not been updated since the restart.

                I deleted the extra devices (took a while, did I say there were a lot of them?) but they came back. Each time the script ran it created a new set!

                When I looked in the ini file I discovered that the HN entry was set to 100. Resetting it to 50 put everything back to normal.

                I know I didn't change it. Any ideas of what could have caused it?
                Mike____________________________________________________________ __________________
                HS3 Pro Edition 3.0.0.548, NUC i3

                HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

                Comment


                  #9
                  Mike,

                  For some reason, your house number must have been deleted or entered incorrectly in the ini file. I have some code to monitor this ini file parameter to make sure that it is numeric. If it finds that this is incorrect, it automatically changes this to 100. I choose this value as I thought it would not affect/overwrite any existing devices. As 99 is the highest value, it looks like Homeseer is rolling back to 1 (something I did not think about). The script automatically detects to see if the virtual device z100 has been created and if not create it. Unfortunately in reality it creates z1. As z100 can never be created, it will continually create new z1 devices every time the script runs.

                  Sometimes being too cleaver with code can cause problems. Looks like I may need to modify this at some time.
                  Jon

                  Comment


                    #10
                    Error being logged when running PerMon package.

                    I have been getting a repeating message in the log file from PerMon script.

                    Error encountered within Sub CreateVD on line 0 (Conversion from string "9/8/2007 2:59:04 PM" to type 'Double' is not valid.)

                    I checked the html directory and found the exact date/time listed in Memory usage, Process Working Set, and Virtual Address Space. All of the lines found don't look much different then any of the others.

                    Comment


                      #11
                      Please download the latest from my site which should clear that error.
                      Jon

                      Comment


                        #12
                        Thanks. All fixed up now.

                        Comment

                        Working...
                        X