Operating System - HP-UX
1757756 Members
2177 Online
108863 Solutions
New Discussion юеВ

Ping command - error 1 and error 2

 
Manuales
Super Advisor

Ping command - error 1 and error 2

After running this script:
ls -lrt /var/spool/lp/request | awk '{ print $NF }' | sort > sidnsnoping.txt
rm printers_unreachables.txt >>/dev/null
rm printers_reachables.txt 2>>/dev/null
for PRN in $(cat sidnsnoping.txt)
do
echo $PRN
/usr/sbin/ping $PRN -n 2 -m 2
RTN=$?
if [[ $RTN -ne 0 ]]
then
echo "$PRN = error $RTN" >> printers_unreachables.txt
else
echo "$PRN = value $RTN" >> printers_reachables.txt
done


when i open the file of the printers unreachable there are these errors:

error 1
error 2

what does those errors means?
are there other errors which can appear?

please let me know.
2 REPLIES 2
Laurent Menase
Honored Contributor

Re: Ping command - error 1 and error 2

man ping:
0 On success.

1 On failure such as unknown host, illegal packet size, etc.

2 On a unreachable host or network.

1) probably it can't resolve the name
2) routing problem
Manuales
Super Advisor

Re: Ping command - error 1 and error 2

thanks a lot