Ask Experts Questions for FREE Help !
Ask
    Arunmathi's Avatar
    Arunmathi Posts: 1, Reputation: 1
    New Member
     
    #1

    Aug 16, 2009, 03:52 AM
    Ping detail
    Is it possible to ping all the branch routers and the area routers of the company simultaneously?
    If yes, in what language the program should be written for pinging?(all router's wan and lan ip are already known)
    :confused:
    chuckhole's Avatar
    chuckhole Posts: 850, Reputation: 45
    Senior Member
     
    #2

    Aug 18, 2009, 02:25 PM

    Is this for a basic network monitoring system? What kind of results do you want to see? Do you want to add any action items/notifications in case of a failure? How many devices are you monitoring?

    Check out SolarWinds or WhatUp Gold to name a few.

    If you are wanting to do this yourself, then check out VBScript or Windows PowerShell. You can use the Windows Management Instrumentation (WMI) ping command to perform a scripted single ping. I do this in our logon scripts before attempting to make drive connections to shares.

    Here is a VBScript version (paste the contents below to a text file and name it with a .VBS extension). Change the strServer = "ServerName" to your actual device name or IP address. Launch it a command prompt by typing the full name of the file.

    strServer = "ServerName"
    strWMIService = "ON"
    Err.Clear
    Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
    If Err.Number <> "0" then
    Err.Clear
    strWMIService = "OFF"
    End if

    if strWMIService = "ON" then
    Set colItems = objWMIService.ExecQuery("Select * from Win32_PingStatus Where Address = '" & strServer & "'")
    For Each objItem in colItems
    If objItem.StatusCode = 0 Then
    MachineStatus = True
    Else
    MachineStatus = False
    End if
    Next
    if MachineStatus = True then
    Wscript.Echo strServer & " is responding"
    else
    Wscript.Echo strServer & " is NOT responding"
    end if
    else
    Wscript.Echo "There was an error in the WMI Service on this computer."
    end if

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Can't see web pages but able to ping [ 1 Answers ]

Hello, Got a strange situation with my friend's PC, IE and Firefox will not show web pages, once type an address the only thing you will see is the "Done" in the status bar with a blank screen. It is connected to the internet by a router, other computer on the same router worked fine. I...

Cannot ping or access network PC [ 2 Answers ]

Model: HP Media Center PC m7680n Processor: Intel Core 2 6400 @ 2.13GHz Memory: 3.50 GB Drives: 2 250 GB Samsung SP2504C 1 DVD SuperMulti 1 DVD Rom Network Adapters: 1394 Net Adapter (On MB) Intel 82562 10/100 Network Adapter (on MB) Intel PRO/1000 GT Desktop Adapter (PCI)...

Ping issue [ 2 Answers ]

I have an issue with 2 PCs connected to a us robotics hub uplinked to Cayman modem router that connects to the bellsouth netwok via ppoe. I can surf from both machines and ping the router, yet I cannot ping either machine from each other. Obviously the two lost connectivity, I have link lights all...

Won't ping [ 14 Answers ]

I well it is probs a simple thing but I cannot ping my laptop but the laptop can ping the PC enyone know why. Advice yould be appreciated.


View more questions Search