Pinging for dummies

  • Thread starter Thread starter dsmcd
  • Start date Start date
D

dsmcd

Hello...

I have a store where their dsl line and their wifi router etc are having
trouble and periodically need to be reset. Until we resolve the trouble I'd
like the manager onsite to ping a few things a few times a day.

Instead of giving this computer illiterate manager a ping script where he'd
have to decipher the replies, I'd rather find a little application that can
tell him very simply "Yup...that IP is there" or "Nope...that IP is not
replying" and can handle mulitple IPs simultaneously.

Windows 98 (sorry :-/ )

Pinging for Dummies. Any suggestions?

Thx,
D.
 
dsmcd said:
Hello...

I have a store where their dsl line and their wifi router etc are having
trouble and periodically need to be reset. Until we resolve the trouble I'd
like the manager onsite to ping a few things a few times a day.

Instead of giving this computer illiterate manager a ping script where he'd
have to decipher the replies, I'd rather find a little application that can
tell him very simply "Yup...that IP is there" or "Nope...that IP is not
replying" and can handle mulitple IPs simultaneously.

Windows 98 (sorry :-/ )

Pinging for Dummies. Any suggestions?

A batch file:


@echo off
ping a.b.c.d
on error goto badstuff
goto endit
badstuff:
echo Ping failed
endit:
 
Pinging for Dummies. Any suggestions?

Put this in a batch file called something like PingO.bat:

@echo off

rem =======================
rem Execute with something like: PingO domainname
rem where domainname is something like www.ebay.com or 124.34.67.8
rem Requires approx 1.5 sec per domain check at 48k bps.

ping -n 1 %1 > nul:

if %errorlevel gt 0 goto BadDomain
echo %1 is good
goto endit

:BadDomain
echo %1 is bad

:endit
quit
rem ========================
 
dsmcd said:
Hello...

I have a store where their dsl line and their wifi router etc
are having
trouble and periodically need to be reset. Until we resolve the
trouble I'd
like the manager onsite to ping a few things a few times a day.

Instead of giving this computer illiterate manager a ping
script where he'd
have to decipher the replies, I'd rather find a little
application that can
tell him very simply "Yup...that IP is there" or "Nope...that
IP is not
replying" and can handle mulitple IPs simultaneously.

Windows 98 (sorry :-/ )

Pinging for Dummies. Any suggestions?

Thx,
D.

Thanks for both of the script suggestions. I'll give them a try.

My script skills are practically nil. Really have to learn more.

Thanks again,
D.
 
dsmcd said:
Thanks for both of the script suggestions. I'll give them a try.

My script skills are practically nil. Really have to learn more.

Mine could be better. Labels should be :name rather than name: as I had.
 
Hello...

I have a store where their dsl line and their wifi router etc are
having trouble and periodically need to be reset. Until we resolve
the trouble I'd like the manager onsite to ping a few things a few
times a day.

Instead of giving this computer illiterate manager a ping script
where he'd have to decipher the replies, I'd rather find a little
application that can tell him very simply "Yup...that IP is there" or
"Nope...that IP is not replying" and can handle mulitple IPs
simultaneously.

Windows 98 (sorry :-/ )

Pinging for Dummies. Any suggestions?

Thx,
D.

MultiPing
http://www.pablosoftwaresolutions.com/html/multi_ping.html
 
dsmcd wrote:

....
I'd rather find a little application that can
tell him very simply "Yup...that IP is there" or "Nope...that IP is not
replying" and can handle mulitple IPs simultaneously.

There have been suggestions that you should check the ErrorLevel
returned by ping. I haven't made many tests myself, but
http://www.ss64.com/nt/ping.html
says "A successful PING does NOT always return an errorlevel of 0"
so use of PING.EXE probably won't do the job reliably.

There is a version of PING which will return different ErrorLevels for
different outcomes, with 0 if successful:
http://wettberg.home.texas.net/alive.htm

As far as I can tell the program is freeware, no requirement to pay, no
copyleft licence which you must respect, no time limitation, no missing
features. While I haven't used it myself, assuming that the program uses
the same parameters as Winows's PING, you'd use a batch file like this:

file name, for example: NILDRAM.BAT
It must be a text file, not a word-processor format.
Replace "ping" by the name of the enhanced PING program.

echo off
echo Result of PING test > C:\LOG.TXT
ping -n 1 -w 200 www.nildram.co.uk
if errorlevel 1 goto :bad1
echo www.nildram.co.uk good >> C:\LOG.TXT
goto test2
:bad1
echo www.nildram.co.uk BAD >> C:\LOG.TXT
:test2
ping -n 1 -w 200 195.149.20.145
if errorlevel 1 goto :bad2
echo 195.149.20.145 good >>C:\ LOG.TXT
goto test3
:bad2
echo 195.149.20.145 BAD >> C:\LOG.TXT
:test3
etc.
echo C:\LOG.TXT
ECHO Press Enter to continue
PAUSE
EXIT


You could even add a line which would automatically email file LOG.TXT
to you, or print it. But we start to get into complex batch file
writing. The simple batch file here will PING test a number of
addresses, write the the results to a file called C:\LOG.TXT, and
display the file until a key is pressed. I expect the example above
contains the usual stupid errors always present in untested programs...
Note that the first line has a single ">", all the others ">>".

The awkward structure with with all the goto's is the way batch files
have been written since the year dot.

One way to send a file automatically: install Pegasus Mail for Windows
(free).

Then add to your batch file the following, on a single line

c:\PMAIL32\winpm-32.exe -T (e-mail address removed) -F C:\LOG.TXT
-"Subject line here"

With your own parameters, of course.

HTH,
 
dsmcd said:
Instead of giving this computer illiterate manager a ping script where he'd
have to decipher the replies, I'd rather find a little application that can
tell him very simply "Yup...that IP is there" or "Nope...that IP is not
replying" and can handle mulitple IPs simultaneously.

What about freeping? You can tell your manager to look at the pretty
colors, where green is good and red is bad. He might even learn
something in the process.

http://www.tools4ever.com/products/free/freeping/
 
Back
Top