- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find a simply way to monitor the fs size
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
03-31-2005 06:31 PM
03-31-2005 06:31 PM
I would like to monitor one fs size every day so that once it beyond 90%, it can send a notification to the person. Do you have any good simple way? Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2005 06:42 PM
03-31-2005 06:42 PM
Re: find a simply way to monitor the fs size
I can just line out the script for you:
var1=`bdf|grep lvol3|cut -d " " -f 11|cut -c 1,2`
while true
do
if [ $var -gt 90 ]
then
echo " File System is getting full "
==> Use sendmail command to send notification <===
fi
That's it.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2005 06:43 PM
03-31-2005 06:43 PM
Re: find a simply way to monitor the fs size
also in if statment read var as var1 .. typo
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2005 06:59 PM
03-31-2005 06:59 PM
Re: find a simply way to monitor the fs size
Here's a script that we use to notify us if any filesystems have exceeded 90% usage.
It runs every 15 minutes, but the script is setup to only e-mail you once per hour.
Gooluck
Regard,
HoangChiCong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2005 07:28 PM
03-31-2005 07:28 PM
SolutionI have some slightly modify Bharat Katkar's scipt.
Like this:
=========================================
while true
do
var=`bdf|grep lvol3|awk '{print $5}'|cut -f 1 -d "%"`
if [ $var -gt 50 ]
then
echo " File System is getting full "
#==> Use sendmail command to send notification <===
fi
done
=========================================
PAY ATTENTION ON
var=`bdf|grep lvol3|awk '{print $5}'|cut -f
MUST BE PUT IN WHILE LOOP.
HTH
tienna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2005 09:12 PM
03-31-2005 09:12 PM
Re: find a simply way to monitor the fs size
Thanks for correcting.... It was all in hurry
Also "done" was missed out.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2005 06:52 AM
04-04-2005 06:52 AM
Re: find a simply way to monitor the fs size
For example, /var can be defined as a critical system that will warn you if it goes over 75%, but /test could be non-critical and warn you if it goes over 95%
All is defined in variables at the top, the limits and systems are up to you.
It also can ignore some file systems (CD_ROM for example).
The script can send email and/or an email page as well, and continues to do so until the issue is fixed.
I run this script every 15 mins in root cron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2005 09:23 AM
04-04-2005 09:23 AM
Re: find a simply way to monitor the fs size
This is the key to preventing a pager meltdown. The growth value, say 3%, means that a filesystem can be at 90% (which is over the selected limit) and you'll get no additional pager messages until it grows to 93%, then nothing until it hits 96%. So worst case, 90% limit, 3% growth means that you'll only get 4 messages max if the filesystem grows to 100%. Also, the script won't send anything if the filesystem shrinks a bit even though it's well over the base limit.
But before you implement this, verify that you can mail a simple message to your pager or email address:
mailx -s "test msg" me@mycompany.com < /etc/issue
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2005 12:24 AM
04-05-2005 12:24 AM
Re: find a simply way to monitor the fs size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2005 12:57 AM
04-05-2005 12:57 AM
Re: find a simply way to monitor the fs size
#!/usr/bin/sh
if [ $# -lt 1 ]
then
echo "Usage : $0
exit 8
fi
MESG=`bdf |grep $1|awk '{if ( $5 >= 90 ) print "FSFULL" }'`
if [ $MESG = "FSFULL" ] 2>/dev/null
then
echo "Filesystem full"
echo "Filesystem full" |mail -s PANIC kaps@kaps.com
fi
Regds,
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2005 01:06 AM
04-05-2005 01:06 AM
Re: find a simply way to monitor the fs size
http://www.bb4.org/
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2005 10:00 PM
04-10-2005 10:00 PM
Re: find a simply way to monitor the fs size
EMS can monitor for the event
of a file systems available MB falling below
a threshhold value. The notifications go
to email, or logs. It is often useful to set up an "emswarn" email alias.
David.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2005 01:15 AM
04-11-2005 01:15 AM