- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: "How to create a script to check filesystem re...
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
06-26-2001 09:21 AM
06-26-2001 09:21 AM
#!/bin/sh
# This is to check /u112 mount point from oracle archives
HOST=`hostname`
DATE=`date`
echo ""$HOST" ======================================== "$DATE"" > /tmp/bdf.doc
#
/usr/bin/bdf | grep u112 | /usr/bin/awk '{if ($5>=60){print $1" "$5" "$6}}' >> /tmp/bdf.doc
echo "=================================================" >> /tmp/bdf.doc
/usr/local/bin/mpack -s "Checking mount point u112" /tmp/bdf.doc torresr@hydroaire.com
Thank you so much,
Reynaldo Torres
torresr@hydroaire.com
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2001 09:32 AM
06-26-2001 09:32 AM
Re: "How to create a script to check filesystem reaching full capacity"
I think this script will get you started. I'll attach it as two replies. The first part is the script itself. I've commented where your mail command should go.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2001 09:33 AM
06-26-2001 09:33 AM
Re: "How to create a script to check filesystem reaching full capacity"
THe second attachment is the 'conf' file in which you specify the filesystems you wish to monitor and the threshhold at which you wish to issue a warning. You should probably put the script in cron and run it every so often.
Hope this gets you close, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2001 09:46 AM
06-26-2001 09:46 AM
Re: "How to create a script to check filesystem reaching full capacity"
Try thisDo the following
bdf | awk '{if ($5 > "90") print $NF,$5 }' > /tmp/test
This will create a file test in /tmp with the files sytems and the values of the usage. You can be creative in using this file as a form of mail , message etc . Run this as a part of script .
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2001 09:49 AM
06-26-2001 09:49 AM
Re: "How to create a script to check filesystem reaching full capacity"
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2001 09:58 AM
06-26-2001 09:58 AM
Re: "How to create a script to check filesystem reaching full capacity"
Thank you so much,
Reynaldo Torres.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 05:33 AM
06-27-2001 05:33 AM
Re: "How to create a script to check filesystem reaching full capacity"
Have you ever tried EMS ? EMS = Event Monitor Services. It's free, it's superb. Is part of the Online Diagnostics, on HP-UX 11 you just install Online Diagnostics in minutes, no need to reboot. Then use SAM, (thru X-Windows or you'll hate it) to configure and add/remove the available space monitor. This monitor may send messages to console, syslog, text log, or send e-mail, etc. For example: console messages if availMB is less than xx MB, email if less than yy MB. If the e-mail address is that of your pager... In summary: you don't need to invest your calories checking your system. Just relax and wait for the event to call you. You may find many meesages regarding EMS and filesystem in "forums > hp-ux > system administration ".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 06:10 AM
06-27-2001 06:10 AM
Re: "How to create a script to check filesystem reaching full capacity"
Reynaldo Torres
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 07:38 AM
06-27-2001 07:38 AM
Re: "How to create a script to check filesystem reaching full capacity"
The bad news (or not) is that is written in Spanish...
My e-mail is: guillermo_rodriguez@hp.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 07:53 AM
06-27-2001 07:53 AM
Solutionyou may crete the following script:
limit=80
v0=`mount ? awk ?{print $1}?`
for mPoint in $v0
do
v1=`df -k /usr | awk '{ print $1 }'`
v2=`echo $v1 | awk '{ print $4 }'`
echo $v2
if [[ $v2 > $limit ]]
then
echo " File system $mPoint is $v2 \% used ."
fi
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 07:55 AM
06-27-2001 07:55 AM
Re: "How to create a script to check filesystem reaching full capacity"
I'm sorry, the line :
v1=`df -k /usr | awk '{ print $1 }'`
must be replaced by
v1=`df -k $mPoint| awk '{ print $1 }'`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 09:33 AM
06-27-2001 09:33 AM
Re: "How to create a script to check filesystem reaching full capacity"
Thanks again.
Reynaldo Torres.