- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: File System Monitor Script
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
Discussions
Discussions
Discussions
Forums
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
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-03-2004 02:15 AM
тАО02-03-2004 02:15 AM
Im looking for a nice clean way to monitor file systems and if the file system exceeds a threshold of, lets say, 90% full, an email is sent out notifying me of the problem.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 02:19 AM
тАО02-03-2004 02:19 AM
Re: File System Monitor Script
You might need to tweak it a bit for your environment.
A configuration file looks like the following
default
warning=94
critical=95
rearm=59
actioned=unix
*/arch
actioned=database
# Follwing entry is to match datbase filesystems and not /usr
/u[0-9]*
warning=99
critical=99
actioned=database
/cdrom
warning=101
critical=101
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 02:24 AM
тАО02-03-2004 02:24 AM
Re: File System Monitor Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 02:26 AM
тАО02-03-2004 02:26 AM
SolutionThis is a very simple script that can notify you if the filesystem reaches a certain threshold.
#!/usr/bin/ksh
LIMIT=90
STAMP=0
EMAIL=your_id@yourdomain.com
cleanup()
{
rm -f /tmp/fs$$ /tmp/fsreport$$
}
trap cleanup 0 1 2
for FS in $(df -l|awk '{print $1}')
do
USED=$(df -k $FS|awk '/allocation used/ {print $1}')
if [ $USED -ge $LIMIT ]
then
echo "$FS: $USED" >> /tmp/fs$$
STAMP=1
fi
done
if [ $STAMP = 1 ]
then
echo "Below are the Filesystems that exceeded the capacity\n\n" > /tmp/fsreport$$
cat /tmp/fs$$ >> /tmp/fsreport$$
mailx -s "Filesystem Warnings" $EMAIL < /tmp/fsreport$$
fi
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 02:27 AM
тАО02-03-2004 02:27 AM
Re: File System Monitor Script
BTW: Are you still with PCS? Or are you the same Sridhar?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 02:28 AM
тАО02-03-2004 02:28 AM
Re: File System Monitor Script
The OVO thing is an option. If you don't do "-opc" then it alerts to your screen. You can then do whatever you like. However, I do appreciate that it's a bit old and craggy loooking now :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 02:30 AM
тАО02-03-2004 02:30 AM
Re: File System Monitor Script
Is that you?. Yeah I am the same Sridhar at the same place. How are you?.
Cheers,
Sri
PS: Please don't make me feel guilty by giving points to this message. :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 02:35 AM
тАО02-03-2004 02:35 AM
Re: File System Monitor Script
late, but possibly useful
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-03-2004 02:39 AM
тАО02-03-2004 02:39 AM
Re: File System Monitor Script
Doing good, yourself?
Brain still there? If so, tell him I said Hi.
Yates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 02:42 AM
тАО02-03-2004 02:42 AM
Re: File System Monitor Script
Here's one I wrote that will check remote hosts from your local host. Just create a text file of the hosts you want to check and provide that file path to the script. You can modify it to send you email only if the filesystems are over 90%, or as I do, have it email me every day. Works with HP and Sun.
Regards,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 04:04 AM
тАО02-03-2004 04:04 AM
Re: File System Monitor Script
http://bb4.com/
The disk monitoring is very customizable - you can set different thresholds for different filesystems.
Rgds...Geoff