Announcement

Collapse
No announcement yet.

Network Monitor

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

    Network Monitor

    Hey Hunter
    I cant seem to get this working. Wont get past the line for pingout.txt, I have Win Scripting Host Installed. Here is the log string.
    2/12/02 11:57:15 PM~!~Event Trigger~!~Trigger from menu (Net Monitor)
    2/12/02 11:57:17 PM~!~Info~!~ Script Error, File: network_monitor.txt: 53:File not found in line 157


    HS.RULES JG
    3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

    #2
    You might find it works better with hs.Ping instead of my ping function. Look on lines 115-116; you can just comment and uncomment out the one you prefer to use. Personally I've tried several times to switch to hs.Ping and never gotten it to work, so I keep using my own function, but if hs.Ping works it's probably better -- more OS-independent, for one thing.

    My ping is using the %comspec% variable, to try to be OS-independent, but I'm using it under W2K, in case that matters. The command itself is this, which again might not be OS-independent and might need to be adjusted:

    ping ipaddress -a -n 1 -w 1500

    If this command typed at a DOS prompt with an IP address of your choosing gives you a "syntax error" or something, I must be using some ping parameter your OS doesn't support. Changing the command line in line 154 should take care of it. I don't have any W9x machines left to test on, though.

    Finally, it's possible that for some reason the CreateObject("Wscript.Shell").Run command doesn't work at all on your system, but I don't know what the reason for that might be. All I know is this has worked on every machine I've tried it on. (I use the same syntax on my network at work in a logon script for our domain, and have not had a problem with it, so I thought it was available everywhere VBS is, but I really don't know for sure.)

    Nucleus Home Automation
    News, support, and updates for Rover, Network Monitor, TimeIcons, and more

    Comment


      #3
      This is probably not relevent to your probs, but some ping utilites don't work correctly if an address contains leading zeros, ie: 192.168.001.100 wouldn't work.
      This may crop up when addresses are generated by some programs, which may pad out unused digits with zeros.

      Comment


        #4
        I will play around with the syntax, I really like the fact that your script will save the last downtime. I cant get AJ's script to do that. HS.RULES JG

        C:\WINDOWS>ping /?

        Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
        [-r count] [-s count] [[-j host-list] | [-k host-list]]
        [-w timeout] destination-list

        Options:
        -t Ping the specified host until stopped.
        To see statistics and continue - type Control-Break;
        To stop - type Control-C.
        -a Resolve addresses to hostnames.
        -n count Number of echo requests to send.
        -l size Send buffer size.
        -f Set Don't Fragment flag in packet.
        -i TTL Time To Live.
        -v TOS Type Of Service.
        -r count Record route for count hops.
        -s count Timestamp for count hops.
        -j host-list Loose source route along host-list.
        -k host-list Strict source route along host-list.
        -w timeout Timeout in milliseconds to wait for each reply.


        C:\WINDOWS>
        3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

        Comment


          #5
          Well I have tried all the things my skills allow with this script, Probablty not the script. The closest I can get is where it creates pingout.txt
          Line 157. I have win script host, updated to win script 5.6. Here is what Bill$ has on THE SITE.


          Except for the WScript object, which is always running, the exposed objects must be created each time you need them. You can use familiar names to access the shell and network classes instead of memorizing ProgIDs:

          objShell = WScript.CreateObject( "WScript.Shell" )
          objNetwork = WScript.CreateObject( "WScript.Network" )

          The WScript object is contained in both wscript.exe and cscript.exe (which is why it's always running). All other WSH objects are implemented in a COM automation component, wshOM.ocx, in the Windows system directory.

          When creating a new object you have two choices. You can use WScript.CreateObject and rely on the WSH root object to create your object, or you can use the VBScript CreateObject function or the JScript built-in ActiveXObject. Which is the faster method? My tests suggest that the CreateObject/ActiveXObject method is slightly faster and requires less memory. This is to be expected; since the scripting engine is already running, asking it to create a new object shouldn't introduce any additional overhead.

          HS.RULES JG
          3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

          Comment


            #6
            If you can type the same ping command with the same parameters into a command prompt and get back actual ping results, then the problem is that the script isn't executing the command.

            If you get back an error message instead, the problem is that the ping command isn't right, and we need to figure out what the right ping command is.

            We need to know which one it is to proceed.

            Nucleus Home Automation
            News, support, and updates for Rover, Network Monitor, TimeIcons, and more

            Comment


              #7
              Ping works fine!

              Microsoft(R) Windows 98
              (C)Copyright Microsoft Corp 1981-1999.

              C:\WINDOWS>ping armada

              Pinging armada [192.168.0.10] with 32 bytes of data:

              Reply from 192.168.0.10: bytes=32 time=2ms TTL=128
              Reply from 192.168.0.10: bytes=32 time=1ms TTL=128
              Reply from 192.168.0.10: bytes=32 time=1ms TTL=128
              Reply from 192.168.0.10: bytes=32 time=1ms TTL=128

              Ping statistics for 192.168.0.10:
              Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
              Approximate round trip times in milli-seconds:
              Minimum = 1ms, Maximum = 2ms, Average = 1ms

              C:\WINDOWS>

              Its the create object wscript and the function FS
              I dont why but it cannot create the pingout.txt file. If you create it and put it in the homeseer directory the error changes to an end of file error. Does any one know why ????........HS.RULES JG [img]/infopop/emoticons/icon_confused.gif[/img]
              3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

              Comment


                #8
                I was able to fix this problem by specifying the location of the file as c:\pingout.txt.

                Here is my final ping function:

                Comment


                  #9
                  Just verifying that ping itself works is not what I've been asking, I need you to do it the same way as the script does, with the same parameters. That is, do this:

                  ping ipaddress -a -n 1 -w 1500

                  Or you can try what Per4merKC did, but I can't see any reason why you should be able to write to the C:\ directory but not to the HomeSeer directory, so I don't know why that would help. So please just do the command I've been asking you to do and report the results, so we can move ahead.

                  Nucleus Home Automation
                  News, support, and updates for Rover, Network Monitor, TimeIcons, and more

                  Comment


                    #10
                    Hey Hunter,
                    For Some Reason Your Script doesnt want to create the pingout.txt. I used the snippet referenced above. It works fine now. The only change is the Snippet. Ping works any way I send it. It is not the ping function.


                    Microsoft(R) Windows 98
                    (C)Copyright Microsoft Corp 1981-1999.

                    C:\WINDOWS>ping 192.168.0.10 -a -n 1 -w 1500

                    Pinging 192.168.0.10 with 32 bytes of data:

                    Reply from 192.168.0.10: bytes=32 time=1ms TTL=128

                    Ping statistics for 192.168.0.10:
                    Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
                    Approximate round trip times in milli-seconds:
                    Minimum = 1ms, Maximum = 1ms, Average = 1ms

                    C:\WINDOWS>
                    HS>RULES........................JG
                    3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

                    Comment


                      #11
                      Hunter
                      I do see that the name is not resolved this way.
                      I have a hosts file. Intranet works like a rocket.
                      I also have your DeviceSetString statements with NAMES not IP address, as I do not like IP addresses posted. Sorry for all the posts. This script is great now. The only SCRIPT so far that keeps last down time. The DIM is cool too. Thanks HS.RULES JG

                      [This message was edited by Jebus on Thursday, 14 February 2002 at 01:20 PM.]
                      3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

                      Comment


                        #12
                        I don't have quotes around the pathname of the file being produced, and most of you probably have it in a path with spaces in it, like C:\Program Files\HomeSeer\. I bet if you look you'll find a garbage file named "Program" in your C: drive. As my HomeSeer installation is on E:\HomeSeer\ I haven't had this problem.

                        Here's the fixed function; I'll update the one in the script library as well.

                        By the way, using C:\ hardcoded is also fine. I just prefer not to have temporary files being created in what I consider a system directory. I like to keep HomeSeer-related stuff in the HomeSeer directory.

                        Nucleus Home Automation

                        [This message was edited by Hunter Green on Thursday, 14 February 2002 at 01:35 PM.]
                        News, support, and updates for Rover, Network Monitor, TimeIcons, and more

                        Comment


                          #13
                          I'm forwarded and open. Can some one test my page Thanks JG

                          http://www.x10.crevier.org/ip/goip.cgi?user=jebusyoda
                          3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

                          Comment


                            #14
                            Hey Hunter was that you 159.105...84, (I wont post all of it). I think this is a great script!
                            I will try your snippet and post THANK YOU HS.RULES JG
                            3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

                            Comment


                              #15
                              This is great. You hit it Hunter! Your way does not blank out icons when script is running. SYNTAX!! A couple of silly quotes! Man!
                              HS.RULES [img]/infopop/emoticons/icon_cool.gif[/img] JG

                              P.S. I Dig the LOG entries now!!!!
                              3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

                              Comment

                              Working...
                              X