[lug] Unsuccessful Ping

SoloCDM deedsmis+ackm at aculink.net
Thu Feb 8 21:29:59 MST 2001


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?

> 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?

> 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