Re: Remote pinging dilemma
From: gabor salai (gabor.salai_at_euroherc.hr)
Date: 02/28/05
- Next message: Datagrid Life: "DataGrid - Outlook Form"
- Previous message: Christian Winter: "Re: ADsSecUtil's getSecurityDescriptor causes script to boil out"
- Next in thread: country_73: "Re: Remote pinging dilemma"
- Reply: country_73: "Re: Remote pinging dilemma"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 28 Feb 2005 09:15:46 +0100
"D.P. Roberts" <dproberts@pbride.com> wrote in message
news:#N8BgkEHFHA.904@tk2msftngp13.phx.gbl...
> I have a lab of 50 xp pro machines, and sometimes I need a quick way to
ping
> all 50 to find out which ones (if any) aren't reachable. So the script
would
> need to ping each client one time, and then return the computername or IP
> address of any that didn't reply. Anyone know if this is possible?
>
> Thanks!
not to be the best possible solution, but works, i use .bat files
for pinging and logging. there are two files, one [ping1.bat] with ip
addresses, and other [ping2.bat] with working loop
"cr.dat" is simple file consisting of cr/lf to simulate "enter" user input
it appears that the easiest way is to specifay all addresses to ping in
editor in outer procedure [ping1.bat]
ping1.bat is entry point for task schedular, so i have scanned
complete network every often, 24/24
just to mention, that sometimes [doue to overload, or router inercy]
single ping is not enough to check activity, so i have additional check
if first single ping fails. this is fully working example, just adjust
paths.
---------ping1.bat
@echo off
set LOG=d:\schedule\ping1.log
set BAT=c:\batl\schedule
echo ----------->>%LOG%
date <cr.dat | find "Current" >>%LOG%
time <cr.dat | find "Current" >>%LOG%
echo ws name1 ...
call %BAT%\ping2 10.82.0.11 %LOG%
echo ws name2 ...
call %BAT%\ping2 212.39.98.162 %LOG%
echo ws name3 ...
call %BAT%\ping2 10.31.0.203 %LOG%
rem here goes the rest of the list ...
rem ...
echo finished
echo.>>%LOG%
---------------
---------ping2.bat
rem %1 address to check
rem %2 log file
set WRK=d:\schedule\ping2.tmp
ping -n 1 %1 > %WRK%
find "Reply" %WRK% > nul
if not errorlevel 1 goto lab1
echo extended...
ping %1 >> %WRK%
find "Reply" %WRK% > nul
if not errorlevel 1 goto lab1
echo failed!
:lab1
type %WRK% >> %2
-----------
- Next message: Datagrid Life: "DataGrid - Outlook Form"
- Previous message: Christian Winter: "Re: ADsSecUtil's getSecurityDescriptor causes script to boil out"
- Next in thread: country_73: "Re: Remote pinging dilemma"
- Reply: country_73: "Re: Remote pinging dilemma"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|