<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ping return code in HP-UX 11.0 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467496#M597640</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i've found a C source for ping that will return 0 for success and 1 for failure, see attachment.&lt;BR /&gt;Compile: cc ping.c -o /usr/contrib/bin/myping&lt;BR /&gt;chown root /usr/contrib/bin/myping&lt;BR /&gt;chmod 4111 /usr/contrib/bin/myping &lt;BR /&gt;&lt;BR /&gt;Regards</description>
    <pubDate>Tue, 28 Nov 2000 11:59:25 GMT</pubDate>
    <dc:creator>Andreas Voss</dc:creator>
    <dc:date>2000-11-28T11:59:25Z</dc:date>
    <item>
      <title>ping return code in HP-UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467493#M597637</link>
      <description>Does anyone know of a version of ping on HP-UX 11.0 that will return a non-zero return code if the pinged node is unreachable?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Mon, 27 Nov 2000 15:22:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467493#M597637</guid>
      <dc:creator>Erik Jagel</dc:creator>
      <dc:date>2000-11-27T15:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: ping return code in HP-UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467494#M597638</link>
      <description>No I have never heard of one.&lt;BR /&gt;&lt;BR /&gt;The only known use is to do something like this:&lt;BR /&gt;&lt;BR /&gt;if ping &lt;HOST&gt; -n 1 | grep '100% packet loss'&lt;BR /&gt;then&lt;BR /&gt;  echo "host not responding"&lt;BR /&gt;else&lt;BR /&gt;  echo "host is up"&lt;BR /&gt;fi&lt;/HOST&gt;</description>
      <pubDate>Tue, 28 Nov 2000 10:02:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467494#M597638</guid>
      <dc:creator>Lasse Knudsen</dc:creator>
      <dc:date>2000-11-28T10:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: ping return code in HP-UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467495#M597639</link>
      <description>I agree with Allan,&lt;BR /&gt;Write your own script using Allan's example:&lt;BR /&gt;#myping return a code&lt;BR /&gt;if /usr/sbin/ping $1 -n 1 | grep '100% packet loss'&lt;BR /&gt;then&lt;BR /&gt;#echo "host not responding"&lt;BR /&gt;exit 1&lt;BR /&gt;else&lt;BR /&gt;echo "host is up"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Demo:&lt;BR /&gt;alnitak # myping draco&lt;BR /&gt;host is up&lt;BR /&gt;alnitak # echo $?&lt;BR /&gt;0&lt;BR /&gt;alnitak # myping triton&lt;BR /&gt;1 packets transmitted, 0 packets received, 100% packet loss&lt;BR /&gt;alnitak # echo $?&lt;BR /&gt;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Victor</description>
      <pubDate>Tue, 28 Nov 2000 10:35:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467495#M597639</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2000-11-28T10:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: ping return code in HP-UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467496#M597640</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i've found a C source for ping that will return 0 for success and 1 for failure, see attachment.&lt;BR /&gt;Compile: cc ping.c -o /usr/contrib/bin/myping&lt;BR /&gt;chown root /usr/contrib/bin/myping&lt;BR /&gt;chmod 4111 /usr/contrib/bin/myping &lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 28 Nov 2000 11:59:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467496#M597640</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2000-11-28T11:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: ping return code in HP-UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467497#M597641</link>
      <description>Thank you Allen and Victor for the scripts.  I had already written a script, but was looking for some source to create a binary.  We're porting our Solaris scripts to HP-UX and needed a version of ping that acts like Solaris's.&lt;BR /&gt;&lt;BR /&gt;Thanks Andreas - it turns out we located the source for ping yesterday and had it compiled and working.  But I do appreciate your help!!!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2000 15:39:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-return-code-in-hp-ux-11-0/m-p/2467497#M597641</guid>
      <dc:creator>Erik Jagel</dc:creator>
      <dc:date>2000-11-28T15:39:06Z</dc:date>
    </item>
  </channel>
</rss>

