<?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: Script having problem for file system monitoring. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185393#M460621</link>
    <description>As Dennis alluded to above, I'd suspect that the output of bdf isn't what you think it is for the two filesystems in question (i.e. wrapped output / different format.)</description>
    <pubDate>Mon, 06 Jul 2009 12:46:22 GMT</pubDate>
    <dc:creator>OldSchool</dc:creator>
    <dc:date>2009-07-06T12:46:22Z</dc:date>
    <item>
      <title>Script having problem for file system monitoring.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185390#M460618</link>
      <description>Hi,&lt;BR /&gt;I am using this filesystem monitoring script, But the problem with this script is that it is not sending a mail when the mount point "/oracle/JKD/saparch" and "/oracle/JKD/102_64" exceeds the threshold it is working fine for all other mount points which are in the check.conf file.&lt;BR /&gt;Please find the diskspace.sh script as below,&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;# This script may be used to check for available disk space on any local server&lt;BR /&gt;# To change the configuration use /home/check.conf&lt;BR /&gt;&lt;BR /&gt;# Debugging purposes&lt;BR /&gt;#set -x&lt;BR /&gt;&lt;BR /&gt;PATH=/usr/bin:/usr/sbin&lt;BR /&gt;CONF_FILE=/home/check.conf&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;# echo max - $MAX_THRESH&lt;BR /&gt;# Check each Filesystem&lt;BR /&gt;while [ ${i} -gt 0 ]&lt;BR /&gt;do&lt;BR /&gt;PCT=`bdf ${FS[$i]} | grep -v Filesystem | cut -c 45-47`&lt;BR /&gt;if ((PCT&amp;gt;THRESH[$i]))&lt;BR /&gt;then&lt;BR /&gt;echo " ${THRESH[$i]} "&lt;BR /&gt;if (("${PCT}&amp;gt;${MAX_THRESH}"))&lt;BR /&gt;then&lt;BR /&gt;echo "Out of disk space for `bdf ${FS[$i]}` on `hostname`" |sendmail name@xxxxx.com&lt;BR /&gt;else&lt;BR /&gt;echo "Threshold exceeded for `bdf ${FS[$i]}` on `hostname`" |sendmail name@xxxxx.com&lt;BR /&gt;fi&lt;BR /&gt;fi&lt;BR /&gt;let i=i-1&lt;BR /&gt;done&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;And also check.conf script as below,&lt;BR /&gt;# MAX_THRESH is the max thresh before sending out a critical message&lt;BR /&gt;MAX_THRESH=91&lt;BR /&gt;&lt;BR /&gt;# THRESH for each FS is the THRESH before sending a message&lt;BR /&gt;FS[1]=/                         ;THRESH[1]=80&lt;BR /&gt;FS[2]=/stand                    ;THRESH[2]=70&lt;BR /&gt;FS[3]=/var                      ;THRESH[3]=80&lt;BR /&gt;FS[4]=/usr                      ;THRESH[4]=80&lt;BR /&gt;FS[5]=/tmp                      ;THRESH[5]=90&lt;BR /&gt;FS[6]=/opt                      ;THRESH[6]=97&lt;BR /&gt;FS[7]=/oracle/JKD/saparch       ;THRESH[7]=50&lt;BR /&gt;FS[8]=/usr/sap/JKD              ;THRESH[8]=70&lt;BR /&gt;FS[9]=/sapmnt/JKD               ;THRESH[9]=85&lt;BR /&gt;FS[10]=/oracle                  ;THRESH[10]=50&lt;BR /&gt;FS[11]=/oracle/JKD              ;THRESH[11]=90&lt;BR /&gt;FS[12]=/home                    ;THRESH[12]=50&lt;BR /&gt;FS[13]=/oracle/JKD/102_64       ;THRESH[13]=35&lt;BR /&gt;FS[14]=/opt/sapbc47             ;THRESH[14]=85&lt;BR /&gt;FS[15]=/tmp/sapwork             ;THRESH[15]=97&lt;BR /&gt;FS[16]=/share                   ;THRESH[16]=80&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Narendra</description>
      <pubDate>Mon, 06 Jul 2009 06:25:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185390#M460618</guid>
      <dc:creator>Narendra Uttekar</dc:creator>
      <dc:date>2009-07-06T06:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script having problem for file system monitoring.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185391#M460619</link>
      <description>What are the "set -x" results for i == 7 and 13?&lt;BR /&gt;What does bdf show for each?</description>
      <pubDate>Mon, 06 Jul 2009 06:39:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185391#M460619</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-07-06T06:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Script having problem for file system monitoring.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185392#M460620</link>
      <description>Shalom Narenda,&lt;BR /&gt;&lt;BR /&gt;I don't see anything wrong with the script. If it works for other file systems it should work for those. It could be Oracle isn't cutting an extent at a convenient time and when it does, it jumps the file system from  89% to 101% capacity.&lt;BR /&gt;&lt;BR /&gt;You might want to have the dba change the size of oracle extents to a smaller number. Its not possible for me to test your script in a realistic condition here.&lt;BR /&gt;&lt;BR /&gt;There are other scripts for this purpose that might work, but that won't help if what I suspect is happening is true.&lt;BR /&gt;&lt;BR /&gt;If I am right about oracle trying to cut a large extent, then perhaps simply setting the threshold lower will do the job.&lt;BR /&gt;&lt;BR /&gt;Also oracle database has a built in limit, maybe 100 extents after which it won't cut new extents. It gives an out of space message after that, when in fact it is not out of space, and a dba needs to modify the maximum number of extents permitted on the tablespace.&lt;BR /&gt;&lt;BR /&gt;For your convenience:&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=5827" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=5827&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;My answer in this thread links to hundreds of syadmin scripts you might find helpful.&lt;BR /&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;BR /&gt;SEP</description>
      <pubDate>Mon, 06 Jul 2009 06:40:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185392#M460620</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-07-06T06:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Script having problem for file system monitoring.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185393#M460621</link>
      <description>As Dennis alluded to above, I'd suspect that the output of bdf isn't what you think it is for the two filesystems in question (i.e. wrapped output / different format.)</description>
      <pubDate>Mon, 06 Jul 2009 12:46:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185393#M460621</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-07-06T12:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script having problem for file system monitoring.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185394#M460622</link>
      <description>Hi Narendra:&lt;BR /&gt;&lt;BR /&gt;The big red flag that I see in scanning your script is this:&lt;BR /&gt;&lt;BR /&gt;# PCT=`bdf ${FS[$i]} | grep -v Filesystem | cut -c 45-47`&lt;BR /&gt;&lt;BR /&gt;Do you believe that the percent used for every filesystem is always going to be in columns 45-47?  I don't.  You should use a shell 'read' or something like 'awk' to pluck the fields in the line as seperated by whitespace.  What you get with your 'cut' isn't probably what you think.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 06 Jul 2009 14:51:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185394#M460622</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-07-06T14:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Script having problem for file system monitoring.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185395#M460623</link>
      <description>I think it is bdf problem as it sometimes with two lines or sometimes with only one line output. Suggest using df -k to do the job as its output is consistent.</description>
      <pubDate>Mon, 06 Jul 2009 15:24:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185395#M460623</guid>
      <dc:creator>Tingli</dc:creator>
      <dc:date>2009-07-06T15:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Script having problem for file system monitoring.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185396#M460624</link>
      <description>You can use Bill Hassellâ   bdf script instead of bdf command.hope that will solve your issue&lt;BR /&gt;&lt;A href="https://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1048509&amp;amp;admit=109447626+1246933165093+28353475" target="_blank"&gt;https://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1048509&amp;amp;admit=109447626+1246933165093+28353475&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Jul 2009 01:22:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185396#M460624</guid>
      <dc:creator>Roopesh Francis_1</dc:creator>
      <dc:date>2009-07-07T01:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Script having problem for file system monitoring.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185397#M460625</link>
      <description>Thanks for the solution.</description>
      <pubDate>Wed, 19 Aug 2009 05:54:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-having-problem-for-file-system-monitoring/m-p/5185397#M460625</guid>
      <dc:creator>Narendra Uttekar</dc:creator>
      <dc:date>2009-08-19T05:54:07Z</dc:date>
    </item>
  </channel>
</rss>

