Announcement

Collapse
No announcement yet.

[exe]Guardian Angel Discussion

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

    #31
    Sorry Jeff, I missed your last post. I'll put something together for you to test with.

    The idea of running Homeseer scripts within GA is not a good one because of the incest that can occur. In particular, GA runs in real time and one does not want to let homeseer run at that high of a priority.

    What is reasonable is for GA to spawn off another process at a lower priority and from there execute a script.

    There is another package in the library that collects cpu and memory utilization. Puts it in a database, and graphs the results using XLGraph. I run it locally under the name Processor Performance. I suspect it was submitted to the library under this or similiar name. It was done in the same timeframe as GA. This will give you the data to look at to better characterize the system. GA parameters should be set so it is clearly looking for abnormal rather than 1 or 2 sigma performance characteristics.

    Comment


      #32
      thanks Michael. The reason I wanted to invoke a a script was to do some actions as a result of GA terminating a process.

      Tx

      Comment


        #33
        Here is an application that will send a Null message to another process and if no response is received it will log the event to a text file. If will log 10 no-responses then stop running.

        It is intended to be a test application for Jeff and webcam32. It could easily be modified to do other things than logging to a text file.

        The source is provided and a little sample invocation contained in it. Run it from the command line with quotes around the parameter string.

        Parameter 1 is Window Title Text that is used to identify the process being monitored. It will seach for the first window with the specified text somewhere within it.

        Parameter 2 is optional and is the file to which the log messages will be written. C:\NullTest.txt is the default if not included.

        Parameter 3 is optional and is the pinging interval in milliseconds. Default is 60000 and values in range 1000 to 60000 are accepted.

        Examples:

        NullMessage "outlook, c:\outlook.txt, 10000"
        NullMessage "Webcam32 - normal"
        Attached Files

        Comment


          #34
          I installed the application, setup webcam32 to fail (I am getting good at this now) and then ran the application. It responded with "Pinging Webcam32 - normal at 60000 Milliseconds".

          I ran the Windows Task Manager, watched Webcam32 go into it's "not responding" phase and ran the nullmessage application again. There was no change - same message.

          From this I assume that the program received a response from Webcam32. I do notice that Webcam32 toggles from "not responding" to "running" so maybe that is allowing it to respond. When it's having problems it seems to toggle every 5-10 seconds.

          UPDATE:

          I tried changing the ping interval to 1000 and waited until Webcam32 was "not responding" and ran the application. I watched for Webcam32 to come back to "running" - and it did - only after the nullmessage finished. So I believe that Webcam32 was "not responding" through the entire duration of the test.

          Does this offer any assistance?

          [This message was edited by JeffCharger on Mon, 03 November 2003 at 04:09 PM.]

          Comment


            #35
            What is means to me is that WebCam is healthy application that can respond to Windows message requests. It is running its video stream with some form of handshake with the video driver or whatever. This "handshake" has broken down so it continues to wait. There may be periods in it polling for the handshake response where it will not accept windows messages and that is likely what task manager is seeing.

            When all is going well the handshake probably occurs quickly and when not there is some small timeout that occurs before webcam32 is able to respond. This is probably why you only see task manager status show not responding when the video feed stops.

            You can run the NullMessage application at some high rate (1000) after starting WebCam32 and see if it is able to see any no-responses. It will log the first 10 it sees. All this will do, however, is confirm a hypothesis for which a recovery solution is not at hand.

            The overall impression, I'm getting is that the problem is at the webcam-driver interface and not the webcam/webcam-windows interface. Unless there is some way to monitor the problem interface then I think you are out of luck.

            I just reread your response. You seemed to indicate that NullMessage completed which means that it detected 10 no-responses. These should be seen in the log file. The only reason NullMessage should stop is if manually stopped or 10 no-responeses have been logged.

            Comment


              #36
              I might be misinterpreting the output of the nullmessage routine. Does it continue to run?

              The windows message box that appears when initiated was blank. I also saw only one line of entry in the log file. Is this what was expected? I assumed that the log entry meant that it had not recognized a problem.

              Am I getting this right? (I would love to be wrong!)

              Comment


                #37
                The first line was put there to acknowledge that the program started and what parameters it was using. There will be up to 10 more lines added with each line containing the timestamp and notification that a no-response was received to a message request. After 10 lines I thought it best to terminate rather than creating a large text file with no additional useful information.

                You should see NullMessage.exe in the Task Manager when it is running. I left the small form box there to make it easy to terminate rather than going to Task Manager. If the form disappears before 10 lines are recorded then it is a program bug. I tested it with outlook and saw it logged when I closed it and was silent when it was open. It was no more than a few minutes of testing.

                Comment


                  #38
                  thanks again for your help here.

                  It looks like I get one line only in the log regardless of whether the program is running fine or when it's "not responding". Does this sound right? When I cancel the webcam program I get a # of "no response" entries.

                  If so, then maybe I am out of luck.

                  A couple of things I have noticed,
                  1) in the windows title bar it shows "Webcam32 - normal(not responding)" when it toggles back and forth.
                  2) when I go to close the webcam32 application out, it gives me the good old windows "do you want to end now" question

                  [This message was edited by JeffCharger on Tue, 04 November 2003 at 08:19 AM.]

                  Comment


                    #39
                    We can approach it from a different angle. Attached is an application with the exact same syntax as nullmessage, but will log to the file when it sees that a title is present. Include enough of the title so it will be unique for when it is misbehaving.

                    It should log when it sees it. If this works then what would you like to do rather than logging? Should it inform homeseer? Should it kill/restart a process? I do not want to include this with GA since there is no reason to execute this monitoring process in real time.

                    Comment


                      #40
                      there was no attachment Michael.

                      If I can tell Homeseer that it's misbehaving then I can terminate and restart it.

                      Thanks much for the help on this one!

                      Comment


                        #41
                        Sorry I forgot to attach. I would put it all together now, but first let us see if some filtering is needed or if the first time it shows is the the trigger.

                        If your video streaming is otherwise independent of homeseer then I suggest that it be totally controled independent of homeseer. The fewer dependencies will make it more reliable. If the webcam is started here then it is possible to monitor its status with the Wscript.Exec, its window title as we are starting to do as well have direct termination and restart control.
                        Attached Files

                        Comment


                          #42
                          The new computer didn't like my 4 port serial card. What was strange is in the task manager, there are two CPUs shown. One of them was pegged (due to the card).

                          So, I made HomeSeer peg out, it pegs only 50% of the total CPU.

                          I wonder how this will affect Guardian Angel?

                          Thanks Michael!

                          HS 1.6.150 HSP 2.0.146
                          Pentium 4 2.6 GHz w/ HT
                          512 MB Dual Write RAM
                          3 Fujitsu 510 Touch Pads
                          Way2Call Hi-Phone USB
                          NeoSpeech Kate 16
                          Ocelot / SECU-16 / SECU-16I
                          mcs Temperature (Works great!)
                          mcs Guardian Angel Version 1.2 (Works great!)
                          NetCallerID Box


                          ~Bill

                          Comment


                            #43
                            I developed GA when I was running dual P3's and I think I had it accumulate the time from both processors, but I dont recall. What would make sense is to treat each cpu independently as if there were two computers with a total of 200% processing capability. I'll have to research the source to see what is actually implemented.

                            Comment


                              #44
                              I am using a CoolMon script to monitor things along with running GA. I guess I need to read the GA manual and set to trip after 300 seconds above 40%.

                              6:31:42 AM --- 4 %. High process hspi_ocelot
                              6:32:13 AM --- 3 %. High process CoolMon
                              6:32:44 AM --- 3 %. High process hspi_ocelot
                              6:33:15 AM --- 3 %. High process
                              6:33:46 AM --- 5 %. High process HomeSeer
                              6:34:17 AM --- 51 %. High process HomeSeer
                              6:34:48 AM --- 53 %. High process HomeSeer
                              6:35:19 AM --- 53 %. High process HomeSeer
                              6:35:50 AM --- 51 %. High process HomeSeer
                              6:36:22 AM --- 55 %. High process HomeSeer
                              6:36:52 AM --- 52 %. High process HomeSeer
                              6:37:23 AM --- 53 %. High process HomeSeer
                              6:37:54 AM --- 43 %. High process HomeSeer
                              6:38:25 AM --- 50 %. High process HomeSeer
                              6:38:56 AM --- 52 %. High process HomeSeer
                              6:39:27 AM --- 53 %. High process HomeSeer
                              6:39:58 AM --- 51 %. High process HomeSeer
                              6:40:29 AM --- 52 %. High process HomeSeer
                              6:41:00 AM --- 51 %. High process HomeSeer

                              HS 1.6.150 HSP 2.0.146
                              Pentium 4 2.6 GHz w/ HT
                              512 MB Dual Write RAM
                              3 Fujitsu 510 Touch Pads
                              Way2Call Hi-Phone USB
                              NeoSpeech Kate 16
                              Ocelot / SECU-16 / SECU-16I
                              mcs Temperature (Works great!)
                              mcs Guardian Angel Version 1.2 (Works great!)
                              NetCallerID Box


                              ~Bill

                              Comment


                                #45
                                How do I get GA to start automaticly when HS Starts?

                                I would imagine that I am supposed to put it in my HS startup script, but how do I format that?
                                Kirk

                                http://cleverhouseautomation.ca
                                http://southcoastwebsitedesign.ca

                                Comment

                                Working...
                                X