<?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: Automatic checking servers to see if alive in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683144#M909126</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;Check out the Big Brother software.&lt;BR /&gt;&lt;A href="http://bb4.com/" target="_blank"&gt;http://bb4.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Its free for non comercial use.&lt;BR /&gt;&lt;BR /&gt;Andreas</description>
    <pubDate>Thu, 14 Mar 2002 14:14:53 GMT</pubDate>
    <dc:creator>Andreas D. Skjervold</dc:creator>
    <dc:date>2002-03-14T14:14:53Z</dc:date>
    <item>
      <title>Automatic checking servers to see if alive</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683143#M909125</link>
      <description>I want to writ a script in UNIX and Linux that will check my servers to see if they are alive and email/page me if not.&lt;BR /&gt;I use ping manaully. I know there must be another command that will do something like ping and return a message that I could grep the output to see if the box is alive.&lt;BR /&gt;I want to put this scrip on 2-3 boxes so if one goes down I'll be alerted of the problem.&lt;BR /&gt;So what or my options? What are the other commands that I could look into?&lt;BR /&gt;&lt;BR /&gt;Marty&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Mar 2002 14:10:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683143#M909125</guid>
      <dc:creator>Marty Metras</dc:creator>
      <dc:date>2002-03-14T14:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic checking servers to see if alive</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683144#M909126</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Check out the Big Brother software.&lt;BR /&gt;&lt;A href="http://bb4.com/" target="_blank"&gt;http://bb4.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Its free for non comercial use.&lt;BR /&gt;&lt;BR /&gt;Andreas</description>
      <pubDate>Thu, 14 Mar 2002 14:14:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683144#M909126</guid>
      <dc:creator>Andreas D. Skjervold</dc:creator>
      <dc:date>2002-03-14T14:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic checking servers to see if alive</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683145#M909127</link>
      <description>Hi Marty,&lt;BR /&gt;&lt;BR /&gt;You could still use ping within a script:&lt;BR /&gt;&lt;BR /&gt;for HOST in "list of hosts" ; do&lt;BR /&gt; /etc/ping $HOST 8 1 | grep -q 100%&lt;BR /&gt; if [ $? -eq 0 ]; then&lt;BR /&gt;  mailx -s "Host $HOST down" yourname&lt;BR /&gt; fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Thu, 14 Mar 2002 14:19:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683145#M909127</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-03-14T14:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic checking servers to see if alive</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683146#M909128</link>
      <description>Hi Marty,&lt;BR /&gt;&lt;BR /&gt;you have to redirect the output of your ping- command into a file, then grep into the file for error messages you want to be informed about. This should be simple. If a error message is found, grep has a return code of 0.&lt;BR /&gt;&lt;BR /&gt;check this:&lt;BR /&gt;&lt;BR /&gt;if test $? -eq 0&lt;BR /&gt;then&lt;BR /&gt;     mail root@computer &amp;lt;&amp;lt; EOF&lt;BR /&gt;Write_the_mail_notification_that_you_need&lt;BR /&gt;EOF&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Mar 2002 14:21:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683146#M909128</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-03-14T14:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic checking servers to see if alive</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683147#M909129</link>
      <description>Start with a ping &lt;BR /&gt;&lt;BR /&gt;kibo:root&amp;gt; ./script&lt;BR /&gt;PING rio: 64 byte packets&lt;BR /&gt;64 bytes from 15.128.171.132: icmp_seq=0. time=0. ms&lt;BR /&gt;&lt;BR /&gt;----rio PING Statistics----&lt;BR /&gt;1 packets transmitted, 1 packets received, 0% packet loss&lt;BR /&gt;round-trip (ms)  min/avg/max = 0/0/0&lt;BR /&gt;Pang rio : return 0&lt;BR /&gt;PING kibo: 64 byte packets&lt;BR /&gt;64 bytes from 15.128.171.159: icmp_seq=0. time=0. ms&lt;BR /&gt;&lt;BR /&gt;----kibo PING Statistics----&lt;BR /&gt;1 packets transmitted, 1 packets received, 0% packet loss&lt;BR /&gt;round-trip (ms)  min/avg/max = 0/0/0&lt;BR /&gt;Pang kibo : return 0&lt;BR /&gt;PING manaus.grenoble.hp.com: 64 byte packets&lt;BR /&gt;64 bytes from 15.128.171.118: icmp_seq=0. time=0. ms&lt;BR /&gt;&lt;BR /&gt;----manaus.grenoble.hp.com PING Statistics----&lt;BR /&gt;1 packets transmitted, 1 packets received, 0% packet loss&lt;BR /&gt;round-trip (ms)  min/avg/max = 0/0/0&lt;BR /&gt;Pang manaus : return 0&lt;BR /&gt;PING pereal: 64 byte packets&lt;BR /&gt;64 bytes from 15.128.171.145: icmp_seq=0. time=0. ms&lt;BR /&gt;&lt;BR /&gt;----pereal PING Statistics----&lt;BR /&gt;1 packets transmitted, 1 packets received, 0% packet loss&lt;BR /&gt;round-trip (ms)  min/avg/max = 0/0/0&lt;BR /&gt;Pang pereal : return 0&lt;BR /&gt;PING mickey.grenoble.hp.com: 64 byte packets&lt;BR /&gt;64 bytes from 15.128.132.22: icmp_seq=0. time=0. ms&lt;BR /&gt;&lt;BR /&gt;----mickey.grenoble.hp.com PING Statistics----&lt;BR /&gt;1 packets transmitted, 1 packets received, 0% packet loss&lt;BR /&gt;round-trip (ms)  min/avg/max = 0/0/0&lt;BR /&gt;Pang mickey : return 0&lt;BR /&gt;ping: unknown host lkfsdajf&lt;BR /&gt;Pang lkfsdajf : return 1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;---------------&lt;BR /&gt;/tmp/servers&lt;BR /&gt;&lt;BR /&gt;rio&lt;BR /&gt;kibo&lt;BR /&gt;manaus&lt;BR /&gt;pereal&lt;BR /&gt;mickey&lt;BR /&gt;lkfsdajf&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-----------------&lt;BR /&gt;script&lt;BR /&gt;&lt;BR /&gt;for i in $(cat /tmp/servers)&lt;BR /&gt;do&lt;BR /&gt; ping $i -n 1&lt;BR /&gt; rtn=$?&lt;BR /&gt; echo "Pang $i : return $rtn"&lt;BR /&gt;&lt;BR /&gt; if [[ rtn != "0" ]] ; then&lt;BR /&gt;  echo "$i : down at $(date)" &amp;gt; /tmp/mailmsg&lt;BR /&gt;  #insert mail command here&lt;BR /&gt; else&lt;BR /&gt;  echo "$i : up at $(date)"&lt;BR /&gt; fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Mar 2002 14:25:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683147#M909129</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2002-03-14T14:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic checking servers to see if alive</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683148#M909130</link>
      <description>The mail command:&lt;BR /&gt;&lt;BR /&gt;cat /tmp/message| mailx user&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Mar 2002 14:27:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683148#M909130</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2002-03-14T14:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic checking servers to see if alive</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683149#M909131</link>
      <description>The ping command will work but here is an idea where you wan't have to create a file.&lt;BR /&gt;&lt;BR /&gt;If you remsh setup between the boxes try this.&lt;BR /&gt;&lt;BR /&gt;remsh "remote_hostname" hostname | grep hostname &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;if [ $? = 1 ]&lt;BR /&gt;then&lt;BR /&gt;    echo "remote_hostname not responding" | sendmail or mailx command to deliver message&lt;BR /&gt;fi</description>
      <pubDate>Thu, 14 Mar 2002 14:44:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683149#M909131</guid>
      <dc:creator>Krishna Prasad</dc:creator>
      <dc:date>2002-03-14T14:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic checking servers to see if alive</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683150#M909132</link>
      <description>That | grep should be &lt;BR /&gt;&lt;BR /&gt;remsh "remote_hostname" hostname | grep "remote_hostname"&lt;BR /&gt;&lt;BR /&gt;sorry.</description>
      <pubDate>Thu, 14 Mar 2002 14:45:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683150#M909132</guid>
      <dc:creator>Krishna Prasad</dc:creator>
      <dc:date>2002-03-14T14:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic checking servers to see if alive</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683151#M909133</link>
      <description>Thanks for all your help.&lt;BR /&gt;From what I got from all of you I have already writen the script I need.&lt;BR /&gt;Marty&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Mar 2002 15:16:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automatic-checking-servers-to-see-if-alive/m-p/2683151#M909133</guid>
      <dc:creator>Marty Metras</dc:creator>
      <dc:date>2002-03-14T15:16:35Z</dc:date>
    </item>
  </channel>
</rss>

