<?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: Require inputs in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6522958#M496643</link>
    <description>&lt;P&gt;There is nothing to change in the script. Just run it one time. It will create the configuration file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You then edit the configuration file: &lt;STRONG&gt;/etc/adminalert.config&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You did not give any details about monitoring these filesystems so I will have to guess what you need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the new config file, change these lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EMAIL=somebody1@mycompany.com&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;EMAILFROM=somebody2@mycompany.com&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EMAIL&lt;/STRONG&gt; shoud be an email address to send notices when there is a problem. To specify multiple addresses, add additional addresses using commas:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EMAIL=somebody1@mycompany.com,somebody2@mycompany.com&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EMAILFROM&lt;/STRONG&gt; should be your email address, or any valid email address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then to monitor the filesystems you listed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DiskFull=1 &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; MOUNTS="/:90,/opt:85,/tmp:90,/var:90,/stand:90"&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;And that's it. Now test the program by running it like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;adminalert -t&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will send you a message that has the config file as the message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can then copy the script and the working config file to the other system and add it to cron.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jun 2014 13:53:20 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2014-06-27T13:53:20Z</dc:date>
    <item>
      <title>Require inputs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6520194#M496640</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had a script which was writen by Bill Hassell sir.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to test this on 2 of my servers .The host names are : eccdbciqv ,eccidbcibv.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to monitor the /,/usr/tmp,/var &amp;amp; /stand file system&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Request you to please guide me in this regard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;attach is the script ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;BR /&gt;Vishal&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2014 10:37:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6520194#M496640</guid>
      <dc:creator>Vishal_1980</dc:creator>
      <dc:date>2014-06-25T10:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Require inputs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6520434#M496641</link>
      <description>&lt;P&gt;&lt;STRONG&gt;diskspace&lt;/STRONG&gt; was an old script that would look at mountpoints and then send notices when occupied space is too high. In order to keep email storms from occurring, it would not send additional alerts uness the space grew another % value. However, if the space never changed, no more alerts would be sent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I abandoned that script and wrote a new one that monitors several system resources at the same time, and send one notice per hour per event. (the hour is configurable). That way, a missed email will be repeated every hour until the problem is resolved while the script runs every few minutes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script is called &lt;STRONG&gt;adminalert.sh&lt;/STRONG&gt; and selectively monors the following items:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- CPU load&lt;/P&gt;&lt;P&gt;- Disk space&lt;/P&gt;&lt;P&gt;- NFS problems&lt;/P&gt;&lt;P&gt;- ping testing&lt;/P&gt;&lt;P&gt;- Check if processes are running&lt;/P&gt;&lt;P&gt;- User login disable checks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you run it, it will automatically create a sample config file with all of the checks turned off but with sample values. Edit the &lt;STRONG&gt;/etc/adminalert.config&lt;/STRONG&gt; file to set the limits and tests you want to make. Edit the email address for the notifications and then add &lt;STRONG&gt;adminlert.sh&lt;/STRONG&gt; to &lt;STRONG&gt;cron&lt;/STRONG&gt;, running about once several times each hour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the usage:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; # &lt;STRONG&gt;adminalert -?&lt;/STRONG&gt;

   Usage: adminalert [-c] [-t]
   where -c = Just show the config file without comments
         -t = send test message to EMAIL from the config file

Requires /etc/adminalert.config to run.
The config file will have the name of the functions
  to invoke plus any variables for the functions.

This means that the conditions to check can be enabled
  or disabled in realtime by editing the config file.

To start, just run adminalert -c to see the default
  settings and to create the initial config file.
  Then edit the config file based on the comments.

&lt;/PRE&gt;&lt;P&gt;and here's what one of my systems has in the config file.&lt;/P&gt;&lt;P&gt;Notice that you can read the file with just the command &lt;STRONG&gt;adminalert -c&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# &lt;STRONG&gt;adminalert -c&lt;/STRONG&gt;

/etc/adminalert.config contents:

    EMAILFREQ=60
    EMAIL=bhassell@sourcedirect.com
    EMAILFROM=billh@bilhassell.com
    LogFile=true
    LoadAlert=0
       LOADLIMIT=2.
    DiskFull=1
      MOUNTS=/:95,/opt:85,/tmp:95,/var:95
    NFSalert=1
      NFSWAITSECS=3
      NFSMOUNTS=/mnt2
    PingTest=1
      PINGHOSTS=ftp:8:3:20:true,atl3:5,atl6:8:3:20,atl10:8:3:20,atl5par
    ProcMon=1
      PROCS=swapper,nfsd:16,httpd:1:4
    UserLockCheck=1
      LOCKED=root,blh,sduser&lt;/PRE&gt;&lt;P&gt;The config file is consulted every time the script runs, so just edit the file to change monitoring.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2014 17:53:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6520434#M496641</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2014-06-25T17:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Require inputs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6520956#M496642</link>
      <description>Dear Sir,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for the inputs provided by you.&lt;BR /&gt;However i am going through the script &amp;amp; unable to understand where to edit it. I have to monitor my 2 production servers namely :eccdvcib &amp;amp; eccidvcibd.&lt;BR /&gt;&lt;BR /&gt;Request you to please suggest....&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; regards,&lt;BR /&gt;Vishal</description>
      <pubDate>Thu, 26 Jun 2014 04:14:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6520956#M496642</guid>
      <dc:creator>Vishal_1980</dc:creator>
      <dc:date>2014-06-26T04:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Require inputs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6522958#M496643</link>
      <description>&lt;P&gt;There is nothing to change in the script. Just run it one time. It will create the configuration file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You then edit the configuration file: &lt;STRONG&gt;/etc/adminalert.config&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You did not give any details about monitoring these filesystems so I will have to guess what you need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the new config file, change these lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EMAIL=somebody1@mycompany.com&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;EMAILFROM=somebody2@mycompany.com&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EMAIL&lt;/STRONG&gt; shoud be an email address to send notices when there is a problem. To specify multiple addresses, add additional addresses using commas:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EMAIL=somebody1@mycompany.com,somebody2@mycompany.com&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EMAILFROM&lt;/STRONG&gt; should be your email address, or any valid email address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then to monitor the filesystems you listed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DiskFull=1 &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; MOUNTS="/:90,/opt:85,/tmp:90,/var:90,/stand:90"&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;And that's it. Now test the program by running it like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;adminalert -t&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will send you a message that has the config file as the message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can then copy the script and the working config file to the other system and add it to cron.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2014 13:53:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6522958#M496643</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2014-06-27T13:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Require inputs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6523632#M496644</link>
      <description>Thanks a lot Bill sir...&amp;amp; how many time i have to say that ....you are just fabolus ......Sir i need to learn scripting ( please suggest some basic book ) &amp;amp; i have 1 wish that when shall i meet you face to face.........&lt;BR /&gt;&lt;BR /&gt;Waiting for your reply ....&lt;BR /&gt;&lt;BR /&gt;Many thanks &amp;amp; regards,&lt;BR /&gt;Vishal</description>
      <pubDate>Sat, 28 Jun 2014 08:09:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6523632#M496644</guid>
      <dc:creator>Vishal_1980</dc:creator>
      <dc:date>2014-06-28T08:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Require inputs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6524006#M496645</link>
      <description>&lt;P&gt;Here are some free tutorials from the net:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://www.ibm.com/developerworks/aix/library/au-kornshellscripting/"&gt;http://www.ibm.com/developerworks/aix/library/au-kornshellscripting/&lt;/A&gt;&lt;BR /&gt;&lt;A target="_blank" href="http://www.bolthole.com/solaris/ksh.html"&gt;http://www.bolthole.com/solaris/ksh.html&lt;/A&gt;&lt;BR /&gt;&lt;A target="_blank" href="http://www.qnx.com/developers/docs/6.4.1/neutrino/user_guide/scripts.htmltraining"&gt;http://www.qnx.com/developers/docs/6.4.1/neutrino/user_guide/scripts.htmltraining&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And a couple of books. The books are references rather than how-to guides. They are similar to dictionaries where you can find specific words but they are not training books.&lt;BR /&gt;&lt;BR /&gt;&lt;A target="_blank" href="http://www.amazon.com/Learning-Korn-Shell-Arnold-Robbins/dp/0596001959/"&gt;http://www.amazon.com/Learning-Korn-Shell-Arnold-Robbins/dp/0596001959/&lt;/A&gt;&lt;BR /&gt;&lt;A target="_blank" href="http://www.amazon.com/New-KornShell-Command-Programming-Language/dp/0131827006/"&gt;http://www.amazon.com/New-KornShell-Command-Programming-Language/dp/0131827006/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last reference above (New Korn Shell) is by David Korn (yes, he wrote ksh) and is my primary reference guide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: There will be references to the Bourne shell which is called sh on Unix systems. However, on HP-UX, there are two sh programs, one is found in /usr/bin/sh (symlink = /bin/sh) and the other is located in /usr/old/bin/sh -- which is the old (and not recommended) Bourne shell.The /usr/bin/sh shell is called the POSIX shell by HP and is the one I use. However,&lt;/P&gt;&lt;P&gt;more than 95% of my scripts will run using ksh as they are very similar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HP-UX is the only OS that confuses these two, but you can safely use either ksh or sh in HP-UX. If you are learning multiple OS platforms such as Solaris, AIX or Linux, ksh is the most portable. You will find bash (the born-again shell) on virtually all Linux systems but not on HP-UX unless you add it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The two best ways to learn shell programming is to write simple scripts and embellish them as you learn new techniques and the other is to read scripts written by others.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jun 2014 13:27:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6524006#M496645</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2014-06-29T13:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Require inputs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6524364#M496646</link>
      <description>Good morning sir,&lt;BR /&gt;&lt;BR /&gt;And thanks a lot for the information.I am going through the links provided by you.&lt;BR /&gt;&lt;BR /&gt;With Regards,&lt;BR /&gt;Vishal</description>
      <pubDate>Mon, 30 Jun 2014 03:53:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/require-inputs/m-p/6524364#M496646</guid>
      <dc:creator>Vishal_1980</dc:creator>
      <dc:date>2014-06-30T03:53:31Z</dc:date>
    </item>
  </channel>
</rss>

