<?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 for checking fs usage in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479716#M37914</link>
    <description>Sorry, I am not familiar with SMH &amp;amp; I dont know whetehr it is installed or not. How do I check that?</description>
    <pubDate>Fri, 14 Aug 2009 12:06:36 GMT</pubDate>
    <dc:creator>mjos</dc:creator>
    <dc:date>2009-08-14T12:06:36Z</dc:date>
    <item>
      <title>script for checking fs usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479714#M37912</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Need help in configuring a simple script for cheking the file-system usage which will send alerts to e-mails listed in the script whenever the file system usage reaches 80% as warning alerts &amp;amp; 90% as critical alerts. The script should have by default be scanning all the file-systems configured in the system along with the nfs file-systems.</description>
      <pubDate>Fri, 14 Aug 2009 11:08:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479714#M37912</guid>
      <dc:creator>mjos</dc:creator>
      <dc:date>2009-08-14T11:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: script for checking fs usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479715#M37913</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;if you have SMH installed you can go to the filesystem section there, and set you watermark for when you want SMH to send you alerts when filesys is n% full.&lt;BR /&gt;&lt;BR /&gt;Its under 'File System Space Used'. It can send you a warning based on the watermark you set and a 'critical' based on your second watermark choice.&lt;BR /&gt;&lt;BR /&gt;hope that helps&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;Matt&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Aug 2009 12:05:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479715#M37913</guid>
      <dc:creator>Matt Palmer_2</dc:creator>
      <dc:date>2009-08-14T12:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: script for checking fs usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479716#M37914</link>
      <description>Sorry, I am not familiar with SMH &amp;amp; I dont know whetehr it is installed or not. How do I check that?</description>
      <pubDate>Fri, 14 Aug 2009 12:06:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479716#M37914</guid>
      <dc:creator>mjos</dc:creator>
      <dc:date>2009-08-14T12:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: script for checking fs usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479717#M37915</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;the System Management Homepage comes as part of the Proliant Support Pack(PSP)/installed by default when you install the PSP. &lt;BR /&gt;&lt;BR /&gt;Assuming you are on HP kit? you can install that, and all the work is already done for you.&lt;BR /&gt;&lt;BR /&gt;Its a free download on the HP site.&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;Matt</description>
      <pubDate>Fri, 14 Aug 2009 12:10:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479717#M37915</guid>
      <dc:creator>Matt Palmer_2</dc:creator>
      <dc:date>2009-08-14T12:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: script for checking fs usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479718#M37916</link>
      <description>Well, I dont have that kit now &amp;amp; the server is hosted remotely. I would be fine if somebody could provide me a simple script.</description>
      <pubDate>Fri, 14 Aug 2009 12:14:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479718#M37916</guid>
      <dc:creator>mjos</dc:creator>
      <dc:date>2009-08-14T12:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: script for checking fs usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479719#M37917</link>
      <description>since I am not quite sure what you meant by "sending alerts" I am leaving that part to you by simply providing echo statements, in this script below. If you are just going to send an email, use mailx to send it with proper subject and text, or if you are going to send an alert to OV, use the opcmsg or whatever else it is today. Here is the simplest script I could come up with:&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;df | grep ^"/" &amp;gt; /tmp/filesystem_names&lt;BR /&gt;&lt;BR /&gt;for fs in `cat /tmp/filesystem_names`&lt;BR /&gt;do&lt;BR /&gt;df $fs &amp;gt; /tmp/currFS&lt;BR /&gt;ln=`cat /tmp/currFS |grep -v ^Filesystem| wc -l`&lt;BR /&gt;case $ln in&lt;BR /&gt;2) perctg=`tail -1 /tmp/currFS|awk {'print $4'}|cut -d"%" -f1` ;;&lt;BR /&gt;1) perctg=`tail -1 /tmp/currFS|awk {'print $5'}|cut -d"%" -f1` ;;&lt;BR /&gt;*) echo "There was an error with volume ${fs}. Check manually" ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;if [ $perctg -ge 80 ] &amp;amp;&amp;amp; [ $perctg -lt 90 ]&lt;BR /&gt;then &lt;BR /&gt;echo "replace this line with your WARNING action for volume $fs"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;if [ $perctg -ge 90 ]&lt;BR /&gt;then&lt;BR /&gt;echo "replace this line with your CRITICAL action for volume $fs"&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Last but not the least, please take a few minutes of your time and assign points to the answers you have received so far.</description>
      <pubDate>Fri, 14 Aug 2009 21:51:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479719#M37917</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2009-08-14T21:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: script for checking fs usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479720#M37918</link>
      <description>Thanks.</description>
      <pubDate>Mon, 17 Aug 2009 08:33:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-for-checking-fs-usage/m-p/4479720#M37918</guid>
      <dc:creator>mjos</dc:creator>
      <dc:date>2009-08-17T08:33:10Z</dc:date>
    </item>
  </channel>
</rss>

