<?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 problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698248#M57263</link>
    <description>Thank you everyone for the response.  I did as per Ramesh's suggestion and found that sometime the ping status return a non zero value.  &lt;BR /&gt;&lt;BR /&gt;Thi</description>
    <pubDate>Mon, 08 Apr 2002 11:53:09 GMT</pubDate>
    <dc:creator>Thi Vu</dc:creator>
    <dc:date>2002-04-08T11:53:09Z</dc:date>
    <item>
      <title>ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698236#M57251</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have a little script that run every 30 min to see if the system is up or down.  So I used this command in my script :&lt;BR /&gt;&lt;BR /&gt;variable=ping hostname(s) -n 2 |grep 0% |awk '{print $7}' &lt;BR /&gt;and if the $variable != 0 then it'll send a message to said that system fail.  This had been running fine for the last couple of months but this month I keep getting emailx saying that system1 or system2 ... systemn fail and when I went to investigate (manually pinging the system or log into the system - it's OK).  I had this running on 5 systems and randomly each one send false report.  It even happens when I'm currently  working in system.  Any help is appreciated.  &lt;BR /&gt;&lt;BR /&gt;TIA&lt;BR /&gt;Thi</description>
      <pubDate>Fri, 05 Apr 2002 18:58:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698236#M57251</guid>
      <dc:creator>Thi Vu</dc:creator>
      <dc:date>2002-04-05T18:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698237#M57252</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt; ping hostname -n 2 | grep 0% | awk '{print $7}'  is producing the output 0% &lt;BR /&gt;&lt;BR /&gt;i.e  your variable is set to a value = 0%&lt;BR /&gt;&lt;BR /&gt;If your $variable != 0 ( here it is 0% ) it will e-mail you a failure message. Since 0 and o% are not equal you are getting a failure message.&lt;BR /&gt;&lt;BR /&gt;To avoid this the in the comaprison line use&lt;BR /&gt;&lt;BR /&gt;$variable != 0% then send an e-mail informing you of a failure.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;Ramesh</description>
      <pubDate>Fri, 05 Apr 2002 19:06:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698237#M57252</guid>
      <dc:creator>ramesh_6</dc:creator>
      <dc:date>2002-04-05T19:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698238#M57253</link>
      <description>Opps, typo it was $variable != 0%.  Sorry&lt;BR /&gt;&lt;BR /&gt;Thi</description>
      <pubDate>Fri, 05 Apr 2002 19:11:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698238#M57253</guid>
      <dc:creator>Thi Vu</dc:creator>
      <dc:date>2002-04-05T19:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698239#M57254</link>
      <description>You might want to increase the ping count to more than what you have, say "-n 5", so that it gives some time for slow responding system to respond to your ping request.</description>
      <pubDate>Fri, 05 Apr 2002 19:13:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698239#M57254</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-04-05T19:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698240#M57255</link>
      <description>I increased it to 7 but still got the same problem.&lt;BR /&gt;&lt;BR /&gt;Thi</description>
      <pubDate>Fri, 05 Apr 2002 19:20:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698240#M57255</guid>
      <dc:creator>Thi Vu</dc:creator>
      <dc:date>2002-04-05T19:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698241#M57256</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Do you have any network issues at all? because from what you are saying, if $variable != 0% , the script will send an email, what if you are losing some network packets?&lt;BR /&gt;&lt;BR /&gt;One way to check would be to send the $variable in the email.&lt;BR /&gt;&lt;BR /&gt;-HTH&lt;BR /&gt;Ramesh</description>
      <pubDate>Fri, 05 Apr 2002 19:23:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698241#M57256</guid>
      <dc:creator>linuxfan</dc:creator>
      <dc:date>2002-04-05T19:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698242#M57257</link>
      <description>Can you attach the script that you used ? Also are there any changes to the network infrastructure prior to the failure of yr script ?</description>
      <pubDate>Fri, 05 Apr 2002 19:29:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698242#M57257</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-04-05T19:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698243#M57258</link>
      <description>Hello Thi,&lt;BR /&gt;I use and it works great. You can makethe then and else statements do do whatever you want. And iphosts.file can is a file with the hostnames or ip address in one colum.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh &lt;BR /&gt;LANG=C &lt;BR /&gt;HOSTNAME_FILE=iphosts.file&lt;BR /&gt;for host in $(cat $HOSTNAME_FILE) &lt;BR /&gt;do &lt;BR /&gt;ping $host -n 1 | grep -q '1 packets received' &lt;BR /&gt;if [ $? = 0 ] &lt;BR /&gt;then &lt;BR /&gt;echo "$host: OK" &lt;BR /&gt;else &lt;BR /&gt;echo "$host: FAIL" &lt;BR /&gt;fi &lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Fri, 05 Apr 2002 20:36:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698243#M57258</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2002-04-05T20:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698244#M57259</link>
      <description>Hi Thi&lt;BR /&gt;&lt;BR /&gt;I think like this , if your script was working fine there should be nothing wrong with it except that there are changes in the ports where the servers are connected or there are really errors.You may want to try this&lt;BR /&gt;&lt;BR /&gt;export A=`ping $HOSTNAME -n 2 | grep 0% | awk '{print $7}'|cut -c 1 `&lt;BR /&gt;&lt;BR /&gt;though I know this is not right .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Apr 2002 21:15:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698244#M57259</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-04-05T21:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698245#M57260</link>
      <description>Agree with Ramesh -- sending $variable in the email would help to clarify whether the false reports were due to losing a few packets. &lt;BR /&gt;When you run the program in the foreground (sh -vx xyzutil) -- what is the output?&lt;BR /&gt;&lt;BR /&gt;I jotted down a test script and ran it like so&lt;BR /&gt;hostname=$1&lt;BR /&gt;&lt;BR /&gt;variable=`ping $hostname -n 10 |grep 0% |awk '{print $7}'`&lt;BR /&gt;if [ $variable != 0% ]&lt;BR /&gt;then&lt;BR /&gt;        echo "failure -- $hostname lost $variable of the packets"&lt;BR /&gt;else&lt;BR /&gt;        echo "success -- $hostname appears to be up"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;and it functions as I would expect.&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;Mark</description>
      <pubDate>Fri, 05 Apr 2002 21:40:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698245#M57260</guid>
      <dc:creator>Mark Fenton</dc:creator>
      <dc:date>2002-04-05T21:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698246#M57261</link>
      <description>ICMP is a low priority task for many devices so if they get a bit busy you might lose a ping or two.  Very common with switches.  I see this quite often.  &lt;BR /&gt;&lt;BR /&gt;You may also have some network congestion issues, noise on WAN links, duplex mismatches, queue drops in routers etc which would kill a ping but which get shrugged off by telnet since it uses TCP which simply resends a lost packet.&lt;BR /&gt;&lt;BR /&gt;You might want to check netstat -s and see if you see any problems. Do this several times and look for increases in retransmissions and errors.&lt;BR /&gt;&lt;BR /&gt; Also &lt;BR /&gt;lanadmin&lt;BR /&gt;lan&lt;BR /&gt;display&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;will show any Ethernet problems (especially not the second page).&lt;BR /&gt;&lt;BR /&gt;Do this at both ends of the circuit.&lt;BR /&gt;&lt;BR /&gt;Ron&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Apr 2002 03:39:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698246#M57261</guid>
      <dc:creator>Ron Kinner</dc:creator>
      <dc:date>2002-04-06T03:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698247#M57262</link>
      <description>Well, if it is just to check if the node is active, a good solution could be to another ping if first ping fails. I'd do, say, five pings before marking a node as faulty.&lt;BR /&gt;&lt;BR /&gt;Or maybe you can mark that node as 'posibly faulty' when the first ping fails, ping it again a minute or two before.&lt;BR /&gt;&lt;BR /&gt;Hope it'll work...&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Sun, 07 Apr 2002 01:20:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698247#M57262</guid>
      <dc:creator>F.J.Llorente Wayfarer</dc:creator>
      <dc:date>2002-04-07T01:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: ping problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698248#M57263</link>
      <description>Thank you everyone for the response.  I did as per Ramesh's suggestion and found that sometime the ping status return a non zero value.  &lt;BR /&gt;&lt;BR /&gt;Thi</description>
      <pubDate>Mon, 08 Apr 2002 11:53:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ping-problem/m-p/2698248#M57263</guid>
      <dc:creator>Thi Vu</dc:creator>
      <dc:date>2002-04-08T11:53:09Z</dc:date>
    </item>
  </channel>
</rss>

