[lug] Unsuccessful Ping
John Hernandez
John.Hernandez at noaa.gov
Fri Feb 9 11:42:29 MST 2001
SoloCDM wrote:
>
> John Hernandez stated the following:
> >
> > I don't get it, exactly. So you want to check if the circuit is up at
> > the physical and/or data link layer? Or you want to check if a host on
> > the other end is IP reachable? Or both? Ping will only accomplish the
> > latter. You would then need to do a second test (SNMP perhaps) to test
> > the line's physical/link status.
>
> I finally went with the following:
>
> ping -c 6 -i 10 mail.aculink.net > /dev/null 2>&1
> MOKAY=${?}
> if (( ${MOKAY} == 1 ))
>
> How would I go about testing the SNMP?
This depends on the vendor and capabilities of your hardware. There's a
nice program suite called NOCOL that can help you monitor this stuff and
generate alarms and reports.
http://www.netplex-tech.com/software/nocol/
>
> > By the way, the fping program is nice for scripting, and it may even
> > allow you to eliminate some of the egreps and gawks ;)
>
> Do you have a link for fping?
>
After several hours of rigorous searching (i.e. top of the google list),
I finally turned up:
http://www.fping.com
Also check rpmfind.net for binaries. ;)
> > SoloCDM wrote:
> > >
> > > I'm using the following to check for an unsuccessful ping, but if
> > > the line is open and bottlenecked enough to return a hundred percent
> > > loss, then the ping will return a false identity. Any suggestions?
> > >
> > > ping -c 4 -R mail.aculink.net > search-opening-data 2>&1;
> > > MOKAY=`egrep -ie packets search-opening-data | gawk -F " " '{print
> > > $7}'`; if [ "${MOKAY}" = "100%" ]
> > >
> > > Ignore the omittance of the remaining "if" statement.
>
> Note: When you reply to this message, please include the mailing
> list/newsgroup address in Cc: and my email address in To:.
>
> *********************************************************************
> Signed,
> SoloCDM
More information about the LUG
mailing list