<?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: Shell script for checking filesystems in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528431#M24693</link>
    <description>try this &lt;BR /&gt;&lt;BR /&gt;    if [[ $(print $MOUNT | awk ' { print substr($1,1,1) } ') != '#' &amp;amp;&amp;amp; $(print $&lt;BR /&gt;MOUNT | awk ' { print substr($1,1,1) } ') != '' ]] then&lt;BR /&gt;      if bdf | egrep -v egrep | egrep $MOUNT 1&amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;      then PERUSED=$(bdf $MOUNT | egrep -v [Uu]sed | awk {'print $5'})&lt;BR /&gt;        PERUSED=${PERUSED%'%'}&lt;BR /&gt;        if [[ $PERUSED -gt $PERCENTFLAG ]] then&lt;BR /&gt;          print "${0##*/}: $MOUNT file system is $PERUSED% full"&lt;BR /&gt;          echo "${0##*/}": $HOSTNAME $MOUNT file system is $PERUSED% full | mail&lt;BR /&gt;x -s "file system full" root&lt;BR /&gt;        else&lt;BR /&gt;          print "$MOUNT $PERCENTFLAG% OK..."&lt;BR /&gt;        fi&lt;BR /&gt;      else&lt;BR /&gt;        print "file system $MOUNT does not exist"&lt;BR /&gt;      fi&lt;BR /&gt;&lt;BR /&gt;---------&lt;BR /&gt;config file like this&lt;BR /&gt;&lt;BR /&gt;/home 80&lt;BR /&gt;/u101 90&lt;BR /&gt;/u102 90&lt;BR /&gt;/u103 90&lt;BR /&gt;/u104 90&lt;BR /&gt;&lt;BR /&gt;---------&lt;BR /&gt;#fscheck config_file&lt;BR /&gt;it will checking with bdf , if exceed as specify in config file , it will mail to root.&lt;BR /&gt;&lt;BR /&gt;---------&lt;BR /&gt;I cut from a part of a script , may be you need to modify&lt;BR /&gt;</description>
    <pubDate>Tue, 15 May 2001 08:18:02 GMT</pubDate>
    <dc:creator>Printaporn_1</dc:creator>
    <dc:date>2001-05-15T08:18:02Z</dc:date>
    <item>
      <title>Shell script for checking filesystems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528427#M24689</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would like to check available space of each filesystem on my box with the shell script. This script I will run from the cron. When the available space decrease under the limit I would like to get the message in my mail box.&lt;BR /&gt;Could you help me and tell me where can I get a script with my requirements.   &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Matjaz</description>
      <pubDate>Tue, 15 May 2001 07:18:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528427#M24689</guid>
      <dc:creator>Matjaz Obstetar</dc:creator>
      <dc:date>2001-05-15T07:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for checking filesystems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528428#M24690</link>
      <description>Hi,&lt;BR /&gt;How about using Big Brother, it does what you want  plus much more...&lt;BR /&gt;&lt;A href="http://bb4.com/" target="_blank"&gt;http://bb4.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;Victor</description>
      <pubDate>Tue, 15 May 2001 07:47:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528428#M24690</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2001-05-15T07:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for checking filesystems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528429#M24691</link>
      <description>#!/usr/bin/ksh&lt;BR /&gt;if [ $# -le 0 ] ;&lt;BR /&gt;then TRESHOLD=90 ;&lt;BR /&gt;else TRESHOLD=$1 ;&lt;BR /&gt;fi&lt;BR /&gt;# echo "Using Treshold = $TRESHOLD"&lt;BR /&gt;AAA_HOSTS='host1 host2 host3'&lt;BR /&gt;#&amp;gt; /tmp/report.log&lt;BR /&gt;#echo "Server\t\tFile System\t\tOccupation (&amp;gt;$TRESHOLD%)"&lt;BR /&gt;for h in $AAA_HOSTS ;&lt;BR /&gt;do&lt;BR /&gt;        remsh $h -l root -n bdf | awk -v m=$h '{ if (NF==5) { d=substr($4,1,leng&lt;BR /&gt;th($4)-1) ; print m"@"$5"@"d } } { if (NF==6) { d=substr($5,1,length($5)-1) ; pr&lt;BR /&gt;int m"@"$6"@"d }}' | awk -F "@" -v t=$TRESHOLD '{ ORS="" ; if ($3&amp;gt;t) { print $1 &lt;BR /&gt;; for (i=0;i&amp;lt;17-length($1);i++) print " " ; print $2 ; for (i=0;i&amp;lt;25-length($2);&lt;BR /&gt;i++) print " " ; print $3"%\n" } }' &lt;BR /&gt;done</description>
      <pubDate>Tue, 15 May 2001 07:59:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528429#M24691</guid>
      <dc:creator>Vincenzo Restuccia</dc:creator>
      <dc:date>2001-05-15T07:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for checking filesystems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528430#M24692</link>
      <description>Hi,&lt;BR /&gt;This script will run on Virtual Vault, so 3-rd party software is irrelevant. The system is without Perl too.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Matjaz</description>
      <pubDate>Tue, 15 May 2001 08:06:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528430#M24692</guid>
      <dc:creator>Matjaz Obstetar</dc:creator>
      <dc:date>2001-05-15T08:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for checking filesystems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528431#M24693</link>
      <description>try this &lt;BR /&gt;&lt;BR /&gt;    if [[ $(print $MOUNT | awk ' { print substr($1,1,1) } ') != '#' &amp;amp;&amp;amp; $(print $&lt;BR /&gt;MOUNT | awk ' { print substr($1,1,1) } ') != '' ]] then&lt;BR /&gt;      if bdf | egrep -v egrep | egrep $MOUNT 1&amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;      then PERUSED=$(bdf $MOUNT | egrep -v [Uu]sed | awk {'print $5'})&lt;BR /&gt;        PERUSED=${PERUSED%'%'}&lt;BR /&gt;        if [[ $PERUSED -gt $PERCENTFLAG ]] then&lt;BR /&gt;          print "${0##*/}: $MOUNT file system is $PERUSED% full"&lt;BR /&gt;          echo "${0##*/}": $HOSTNAME $MOUNT file system is $PERUSED% full | mail&lt;BR /&gt;x -s "file system full" root&lt;BR /&gt;        else&lt;BR /&gt;          print "$MOUNT $PERCENTFLAG% OK..."&lt;BR /&gt;        fi&lt;BR /&gt;      else&lt;BR /&gt;        print "file system $MOUNT does not exist"&lt;BR /&gt;      fi&lt;BR /&gt;&lt;BR /&gt;---------&lt;BR /&gt;config file like this&lt;BR /&gt;&lt;BR /&gt;/home 80&lt;BR /&gt;/u101 90&lt;BR /&gt;/u102 90&lt;BR /&gt;/u103 90&lt;BR /&gt;/u104 90&lt;BR /&gt;&lt;BR /&gt;---------&lt;BR /&gt;#fscheck config_file&lt;BR /&gt;it will checking with bdf , if exceed as specify in config file , it will mail to root.&lt;BR /&gt;&lt;BR /&gt;---------&lt;BR /&gt;I cut from a part of a script , may be you need to modify&lt;BR /&gt;</description>
      <pubDate>Tue, 15 May 2001 08:18:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528431#M24693</guid>
      <dc:creator>Printaporn_1</dc:creator>
      <dc:date>2001-05-15T08:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for checking filesystems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528432#M24694</link>
      <description>try this &lt;BR /&gt;&lt;BR /&gt;In ./scfs.dat, I put my static file systems, one fspath in each line, I don't want check them.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;######################&lt;BR /&gt;#         SCRIPT&lt;BR /&gt;######################&lt;BR /&gt;&lt;BR /&gt;cd /usr/scripts&lt;BR /&gt;echo ""&lt;BR /&gt;echo " Sistemas de Archivo con Espacio Disponible &amp;lt; 25 MB o el 90% Ocupado"&lt;BR /&gt;echo "\n Muestra del: \c"&lt;BR /&gt;date +%d/%m/%y%t%X&lt;BR /&gt;bdf -l | grep -vf scfs.dat | sort -n +3 | awk -F " " '{ if ( NR==1 ) print " Espacio de Disco en MBytes\n\n    Total   Ocupado Disponible %usado Montado    Dispositivo \n"; else if ( $4&amp;lt;25000 || $5&amp;gt;90 ) printf "%9.2f %9.2f %9.2f   %3s   %-10s %-26s\n", $2/1024, $3/1024, $4/1024, $5*1, $6, $1 }'&lt;BR /&gt;echo ""&lt;BR /&gt;&lt;BR /&gt;##################&lt;BR /&gt;#        FIN&lt;BR /&gt;##################&lt;BR /&gt;</description>
      <pubDate>Tue, 15 May 2001 19:04:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528432#M24694</guid>
      <dc:creator>Juan José Muñoz</dc:creator>
      <dc:date>2001-05-15T19:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for checking filesystems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528433#M24695</link>
      <description>Try diskspace.ksh from:&lt;BR /&gt;&lt;BR /&gt;ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/cronjobs/&lt;BR /&gt;&lt;BR /&gt;You can customize the script to set different limits for each filesystem.</description>
      <pubDate>Wed, 16 May 2001 00:22:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528433#M24695</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2001-05-16T00:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script for checking filesystems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528434#M24696</link>
      <description>I just posted this today in another message thread.  See the message "What is the best way to configure performance alert", there's an attachment there that is a script file that I use.&lt;BR /&gt;</description>
      <pubDate>Wed, 16 May 2001 11:27:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-for-checking-filesystems/m-p/2528434#M24696</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2001-05-16T11:27:53Z</dc:date>
    </item>
  </channel>
</rss>

