<?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: How to configure one script to send mail alerts if filesystem is reaching 90% in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246481#M677255</link>
    <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;I like the concept for detecting the file systems above 90%. Note that if you have openview ITO, you can get this functionality without a script.&lt;BR /&gt;&lt;BR /&gt;You might try putting your output to a file and using &lt;A href="http://hpux.ws/mailfile2" target="_blank"&gt;http://hpux.ws/mailfile2&lt;/A&gt; to email the output as an attachment.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Tue, 06 Jul 2010 16:41:34 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2010-07-06T16:41:34Z</dc:date>
    <item>
      <title>How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246472#M677246</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have written one script and configured that in crontab for sending mail alerts if filsystem is reaching thrushold of 90%.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;1)#vi /usr/local/bin/disk_full.sh&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;bdf | awk 'z[split($5,z,"%")-1]&amp;gt;90' | mailx -r senthil.kumar@emdiesels.com -s "$HOST Filesystems &amp;gt; 90%" abc@yahoo.co.in&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2)crontab -e&lt;BR /&gt; &lt;BR /&gt;########### Send mail alerts if any filesystem reaches thrushold 90%##########&lt;BR /&gt;1 * * * * /usr/local/bin/disk_full.sh&lt;BR /&gt;##########################################################&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have written above script to check if any of the filesystes is reaching thrush hold of 90% for every one hour and send mails if any of the filesystems is reached 90%.&lt;BR /&gt;&lt;BR /&gt;It is working fine.&lt;BR /&gt;&lt;BR /&gt;But I have following issues.&lt;BR /&gt;&lt;BR /&gt;My Issue:&lt;BR /&gt;&lt;BR /&gt;I am getting blank mail alerts even if any of filesystems is not reaching 90%. Therefore I am getting one mail from for ever one hour even if there is no filesystem is reached thrush hold of 90%.&lt;BR /&gt;&lt;BR /&gt;My Requirement:&lt;BR /&gt;&lt;BR /&gt;I would like to receive mail alerts only if any of the file system is reaching thrush hold of 90% but not for empty (If there is no filesystems reached 90%).&lt;BR /&gt;&lt;BR /&gt;How to resolve this.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Jul 2010 12:24:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246472#M677246</guid>
      <dc:creator>senthil_kumar_2</dc:creator>
      <dc:date>2010-07-06T12:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246473#M677247</link>
      <description>Hi Senthil:&lt;BR /&gt;&lt;BR /&gt;As written, regardless of any output, 'mailx' is spawned by the pipe.  Hence, you unconditionally get mail regardless of the utilization threshold.&lt;BR /&gt;&lt;BR /&gt;You could do:&lt;BR /&gt;&lt;BR /&gt;# [ -z "$(bdf|awk 'z[split($5,z,"%")-1]&amp;gt;90')" ] || mailx ...&lt;BR /&gt;&lt;BR /&gt;...or capture the output; test the output for emptiness and email the non-empty result.&lt;BR /&gt;&lt;BR /&gt;# RESULTS=$(bdf|awk 'z[split($5,z,"%")-1]&amp;gt;90')&lt;BR /&gt;# [ -z "${RESULTS}" ] || mailx ...&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 06 Jul 2010 12:46:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246473#M677247</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-07-06T12:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246474#M677248</link>
      <description>Hi (again) Senthil:&lt;BR /&gt;&lt;BR /&gt;By the way, you have a recently growing number of questions you have asked without any point assignment whatsoever:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/pageList.do?userId=WW220552&amp;amp;listType=unassigned&amp;amp;forumId=1" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/pageList.do?userId=WW220552&amp;amp;listType=unassigned&amp;amp;forumId=1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Jul 2010 12:55:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246474#M677248</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-07-06T12:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246475#M677249</link>
      <description>Hi,&lt;BR /&gt;Got so many thread see the below&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1278423920446+28353475&amp;amp;threadId=1130400" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1278423920446+28353475&amp;amp;threadId=1130400&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1336882" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1336882&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1100009" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1100009&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1064880" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1064880&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=800551" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=800551&lt;/A&gt;&lt;BR /&gt;here is the script i am using.&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;PATH=/usr/bin:/usr/sbin&lt;BR /&gt;CONF_FILE=fs_check.conf.txt&lt;BR /&gt;&lt;BR /&gt;# Source default env vars&lt;BR /&gt;. ${CONF_FILE}&lt;BR /&gt;&lt;BR /&gt;# Count number of FS to check&lt;BR /&gt;i=${#FS[*]}&lt;BR /&gt;&lt;BR /&gt;# Check each Filesystem&lt;BR /&gt;while [ "$(($i-1))" -ge "0" ]&lt;BR /&gt;do&lt;BR /&gt;        let i=i-1&lt;BR /&gt;        PCT=$(bdf ${FS[$i]} | awk '/\// {print $5}' | tr -d '%')&lt;BR /&gt;        if [ ${PCT} -gt ${TRESH[$i]} ]&lt;BR /&gt;        then&lt;BR /&gt;                if [ "90" -le ${PCT} ]&lt;BR /&gt;                then&lt;BR /&gt;                        echo "FATAL: Out of disk space for ${FS[$i]}!" | mailx -s FS_FATAL me@company.com&lt;BR /&gt;                else&lt;BR /&gt;                        echo "WARNING: Threshold exceeded for ${FS[$i]}, it is now ${PCT}." | mailx -s FS_WARNING  me@company.com&lt;BR /&gt;                fi&lt;BR /&gt;        fi&lt;BR /&gt;done&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Tue, 06 Jul 2010 13:01:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246475#M677249</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2010-07-06T13:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246476#M677250</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;I have modified the file "/usr/local/bin/disk_full.sh" as following&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# more /usr/local/bin/disk_full.sh&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;RESULTS=$(bdf | awk 'z[split($5,z,"%")-1]&amp;gt;90')&lt;BR /&gt;[ -z "${RESULTS}" ] | mailx -r senthil.kumar@emdiesels.com -s "$HOST Filesystems &amp;gt; 90%" senthil.kumar@emdiesels.com&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Still I am getting alerts with empty message.&lt;BR /&gt;&lt;BR /&gt;How to resolve.</description>
      <pubDate>Tue, 06 Jul 2010 13:56:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246476#M677250</guid>
      <dc:creator>senthil_kumar_2</dc:creator>
      <dc:date>2010-07-06T13:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246477#M677251</link>
      <description>Hi (again) Senthil:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [ -z "${RESULTS}" ] | mailx ...&lt;BR /&gt;&lt;BR /&gt;You didn't copy what I wrote and made the same mistake as you originally had.  You don't want a pipe ('|') you want the logical relation ('||') as:&lt;BR /&gt;&lt;BR /&gt;# [ -z "${RESULTS}" ] || mailx ...&lt;BR /&gt;&lt;BR /&gt;...which says if the variable called RESULTS is not empty, run the command 'mailx'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 06 Jul 2010 14:04:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246477#M677251</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-07-06T14:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246478#M677252</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;Still the issue is not resolved.&lt;BR /&gt;&lt;BR /&gt;1)# more disk.sh&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;RESULTS=$(bdf | awk 'z[split($5,z,"%")-1]&amp;gt;90')&lt;BR /&gt;[ -z "${RESULTS}" ] || mailx -r abc@company.com -s "$HOST Filesystems &amp;gt; 90%" abc@company.com&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2)# ll disk.sh&lt;BR /&gt;&lt;BR /&gt;-rwxr-xr-x  1 root root 145 Jul  6 09:51 disk.sh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;3)#./disk.sh&lt;BR /&gt;&lt;BR /&gt;Now it is hanging , I have waited for about 10 mins. however the above script is not exectued.&lt;BR /&gt;&lt;BR /&gt;So pressed "ctrl + c" , now I got follwoing output.&lt;BR /&gt;&lt;BR /&gt;(Interrupt -- one more to kill letter)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then again I pressed "ctrl + c" , now I got the prompt.&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How to resolve.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Jul 2010 14:14:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246478#M677252</guid>
      <dc:creator>senthil_kumar_2</dc:creator>
      <dc:date>2010-07-06T14:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246479#M677253</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Now it is hanging , I have waited for about 10 mins. however the above script is not exectued.&lt;BR /&gt;&lt;BR /&gt;You need to provide an some input (even if this input is "empty".&lt;BR /&gt;&lt;BR /&gt;You could do:&lt;BR /&gt;&lt;BR /&gt;# [ -z "${RESULTS}" ] || mailx -r abc@company.com -s "$HOST Filesystems &amp;gt; 90%" abc@company.com &amp;lt; /dev/null&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 06 Jul 2010 14:21:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246479#M677253</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-07-06T14:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246480#M677254</link>
      <description>&amp;gt;JRF: You need to provide an some input (even if this input is "empty".&lt;BR /&gt;&lt;BR /&gt;Right.  You can also echo $RESULT or read from some file:&lt;BR /&gt; [ -z "${RESULTS}" ] || echo "$RESULT" | mailx -r abc@company.com -s "$HOST Filesystems &amp;gt; 90%" abc@company.com</description>
      <pubDate>Tue, 06 Jul 2010 15:47:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246480#M677254</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-07-06T15:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246481#M677255</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;I like the concept for detecting the file systems above 90%. Note that if you have openview ITO, you can get this functionality without a script.&lt;BR /&gt;&lt;BR /&gt;You might try putting your output to a file and using &lt;A href="http://hpux.ws/mailfile2" target="_blank"&gt;http://hpux.ws/mailfile2&lt;/A&gt; to email the output as an attachment.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 06 Jul 2010 16:41:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246481#M677255</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-07-06T16:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246482#M677256</link>
      <description>..Didn't Measureware have something in a simple file that one could set these limits on../var/opt/perf/alarmdef&lt;BR /&gt;&lt;BR /&gt;If memory serves me, you could set to notify for CPU,swap,disk I/O, and Filesystem utilization.  Maybe, you could just add a line (under red alert) that sends an email when it hits red.&lt;BR /&gt;&lt;BR /&gt;Just a thought,&lt;BR /&gt;Rita</description>
      <pubDate>Tue, 06 Jul 2010 17:56:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246482#M677256</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2010-07-06T17:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246483#M677257</link>
      <description>This script will check for all the filesystem with Size more then 90% and mail to the Person.&lt;BR /&gt;&lt;BR /&gt;#-----------Variables&lt;BR /&gt;RD1=/tmp/script/check.log&lt;BR /&gt;&lt;BR /&gt;#-----------Truncate&lt;BR /&gt;cat /dev/null &amp;gt; $RD1&lt;BR /&gt;&lt;BR /&gt;#------------Logic&lt;BR /&gt;df -h | grep dev | awk '{if($5 &amp;gt; 90)print $5, "    ", $6}' &amp;gt; $RD1&lt;BR /&gt;&lt;BR /&gt;exec &amp;lt; $RD1&lt;BR /&gt;i=0&lt;BR /&gt;while read line&lt;BR /&gt;do&lt;BR /&gt;        x=`cat check.log | awk '{print $1}'`&lt;BR /&gt;        if [ "$x" &amp;gt; 90 ]&lt;BR /&gt;        then&lt;BR /&gt;                mailx # Email ID of the Person and File name $RD1&lt;BR /&gt;        fi&lt;BR /&gt;        i=`expr $i + 1`&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Ishwar</description>
      <pubDate>Tue, 06 Jul 2010 18:19:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246483#M677257</guid>
      <dc:creator>Ishwar_1</dc:creator>
      <dc:date>2010-07-06T18:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246484#M677258</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Bill Hassell offers a nice filesystem monitoring script with notifications here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1130400" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1130400&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;See his commentary and attachment in the thread above.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 06 Jul 2010 18:23:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246484#M677258</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-07-06T18:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246485#M677259</link>
      <description>&lt;BR /&gt;Hi Senthil,&lt;BR /&gt;&lt;BR /&gt;  Below is a part of my script that monitor filesystem. Hope it helps.&lt;BR /&gt;&lt;BR /&gt;df -l |awk '{print $1}' &amp;gt; /tmp/mountlist&lt;BR /&gt;&lt;BR /&gt;cat /tmp/mountlist | while read LINE&lt;BR /&gt;do&lt;BR /&gt;PERC=`df -k ${LINE} | grep allocation| awk '{print $1}'`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if [ $PERC -gt 95 ]; then&lt;BR /&gt;&lt;BR /&gt;   if [ $PERC -gt 98 ]; then&lt;BR /&gt;   echo "CRITICAL ${PERC}%" | mailx -s "CRITICAL: ${LINE} on `hostname` is almost full ${PERC}%" ${SYSADM2}&lt;BR /&gt;   else&lt;BR /&gt;   echo "WARNING ${PERC}%" | mailx -s "WARNING: ${LINE} on `hostname` is almost full ${PERC}%" ${SYSADM2}&lt;BR /&gt;   fi&lt;BR /&gt;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Mohan</description>
      <pubDate>Wed, 07 Jul 2010 05:34:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246485#M677259</guid>
      <dc:creator>Mohandass</dc:creator>
      <dc:date>2010-07-07T05:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246486#M677260</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have changed my script as follows.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;RESULTS=$(bdf | awk 'z[split($5,z,"%")-1]&amp;gt;90' | grep -v Filesystem)&lt;BR /&gt;[ -z "${RESULTS}" ] || echo "$RESULTS" | mailx -r abc@company.com -s "$HOST Filesystems &amp;gt; 90%" abc@company.com&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now it working fine.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for all.</description>
      <pubDate>Wed, 07 Jul 2010 10:26:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246486#M677260</guid>
      <dc:creator>senthil_kumar_2</dc:creator>
      <dc:date>2010-07-07T10:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure one script to send mail alerts if filesystem is reaching 90%</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246487#M677261</link>
      <description>Please see my reply in above</description>
      <pubDate>Wed, 07 Jul 2010 10:28:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-configure-one-script-to-send-mail-alerts-if-filesystem-is/m-p/5246487#M677261</guid>
      <dc:creator>senthil_kumar_2</dc:creator>
      <dc:date>2010-07-07T10:28:13Z</dc:date>
    </item>
  </channel>
</rss>

