- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Filesystem monitoring with different threshold
Operating System - HP-UX
1753784
Members
7368
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО06-10-2010 11:09 AM
тАО06-10-2010 11:09 AM
Filesystem monitoring with different threshold
Hi Experts,
I have the below filesystem monitoring script(df_mon.sh) which monitors the filesystems specified in /tmp/df_mon.cfg. But this script will monitor all filesystems for same threshold (95%). But now i need to setup monitoring for different filesystems with different thresholds.
The input file will be having the filesystems with the desired thresholds in the below format pasted below. Can you advise on how to modify the below script so that it can monitor the specified filesystems with corresponding thresholds?
/tmp/df_mon.cfg:-
/var 90
/tmp 80
/opt 95
df_mon.sh:-
####Monitoring all FS except NFS mounted FS##########
OPCMSG=/usr/lpp/OV/OpC/opcmsg
OPCMON=/usr/lpp/OV/OpC/opcmon
for FILE_SYS in `cat /tmp/df_mon.cfg`
do
PERCENT=`df -k $FILE_SYS | awk '{print $4}' | grep -v Used | sed -e 's/%//g'`
echo $PERCENT
if [ "$PERCENT" -ge "95" ]
then
echo "Current utilization of $FILE_SYS is ($PERCENT%) which is >=95% threshold" | mailx -s "FS ALERT" abc@domain.com
fi
done
exit 0
Thanks,
Ramkumar A.
I have the below filesystem monitoring script(df_mon.sh) which monitors the filesystems specified in /tmp/df_mon.cfg. But this script will monitor all filesystems for same threshold (95%). But now i need to setup monitoring for different filesystems with different thresholds.
The input file will be having the filesystems with the desired thresholds in the below format pasted below. Can you advise on how to modify the below script so that it can monitor the specified filesystems with corresponding thresholds?
/tmp/df_mon.cfg:-
/var 90
/tmp 80
/opt 95
df_mon.sh:-
####Monitoring all FS except NFS mounted FS##########
OPCMSG=/usr/lpp/OV/OpC/opcmsg
OPCMON=/usr/lpp/OV/OpC/opcmon
for FILE_SYS in `cat /tmp/df_mon.cfg`
do
PERCENT=`df -k $FILE_SYS | awk '{print $4}' | grep -v Used | sed -e 's/%//g'`
echo $PERCENT
if [ "$PERCENT" -ge "95" ]
then
echo "Current utilization of $FILE_SYS is ($PERCENT%) which is >=95% threshold" | mailx -s "FS ALERT" abc@domain.com
fi
done
exit 0
Thanks,
Ramkumar A.
- Tags:
- bdf
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2010 11:19 AM
тАО06-10-2010 11:19 AM
Re: Filesystem monitoring with different threshold
Hi:
Bill Hassell offers a well-documented, highly-optioned script called 'diskspace.sh' in this thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1100009
His script will do what you want and more.
Regards!
...JRF...
Bill Hassell offers a well-documented, highly-optioned script called 'diskspace.sh' in this thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1100009
His script will do what you want and more.
Regards!
...JRF...
- Tags:
- broken URL link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2010 11:35 AM
тАО06-10-2010 11:35 AM
Re: Filesystem monitoring with different threshold
Shalom,
There are at least a half dozen variants in this thread:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=51050
Note also ITO/Openview have good monitors, as does hobbit.
SEP
There are at least a half dozen variants in this thread:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=51050
Note also ITO/Openview have good monitors, as does hobbit.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP