- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: script for file system alert
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
02-25-2009 01:28 AM
02-25-2009 01:28 AM
script for file system alert
Do you have any script which I can use on RedHat Linux system to get the e-mail notification, once the file system reaches the threshhold limit (e.g. /opt is 97%).
Thanks in advance
Gab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 01:48 AM
02-25-2009 01:48 AM
Re: script for file system alert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 03:36 AM
02-25-2009 03:36 AM
Re: script for file system alert
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1317010
Its a HP-UX thread but the code will work for Linux.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 07:17 AM
02-25-2009 07:17 AM
Re: script for file system alert
http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?prodNameId=3716247〈=en&cc=us&prodTypeId=18964&prodSeriesId=3716246&taskId=135
Note: It by default sends the email to 'root' on the local system. I typically just setup an alias to my email address for root in /etc/aliases for sendmail.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2009 12:37 AM
02-26-2009 12:37 AM
Re: script for file system alert
#!/bin/bash
threshold="85"
used=$(df -h $1 | grep "\%" | awk '{print $5}' | sed -e "s/\%//)
[ $used -lt $threshold ] || mail -s blahblah and all the other things you want to do
Something like that would do (untested thou) I believe. This looks at the procentages the device supplied.
Usage is, ./script.sh /home
I would use some other program to handle this thou, should be alot of programs out there able to do this. Maybe Cacti or Nagios would be an idea depending on how big your environment is.
Best regards
Fredrik Eriksson