- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- script for checking fs usage
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2009 04:08 AM
08-14-2009 04:08 AM
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 & 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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2009 05:05 AM
08-14-2009 05:05 AM
Re: script for checking fs usage
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.
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.
hope that helps
regards
Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2009 05:06 AM
08-14-2009 05:06 AM
Re: script for checking fs usage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2009 05:10 AM
08-14-2009 05:10 AM
Re: script for checking fs usage
the System Management Homepage comes as part of the Proliant Support Pack(PSP)/installed by default when you install the PSP.
Assuming you are on HP kit? you can install that, and all the work is already done for you.
Its a free download on the HP site.
regards
Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2009 05:14 AM
08-14-2009 05:14 AM
Re: script for checking fs usage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2009 02:51 PM
08-14-2009 02:51 PM
Solution#!/bin/bash
df | grep ^"/" > /tmp/filesystem_names
for fs in `cat /tmp/filesystem_names`
do
df $fs > /tmp/currFS
ln=`cat /tmp/currFS |grep -v ^Filesystem| wc -l`
case $ln in
2) perctg=`tail -1 /tmp/currFS|awk {'print $4'}|cut -d"%" -f1` ;;
1) perctg=`tail -1 /tmp/currFS|awk {'print $5'}|cut -d"%" -f1` ;;
*) echo "There was an error with volume ${fs}. Check manually" ;;
esac
if [ $perctg -ge 80 ] && [ $perctg -lt 90 ]
then
echo "replace this line with your WARNING action for volume $fs"
fi
if [ $perctg -ge 90 ]
then
echo "replace this line with your CRITICAL action for volume $fs"
fi
done
Last but not the least, please take a few minutes of your time and assign points to the answers you have received so far.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2009 01:33 AM
08-17-2009 01:33 AM