- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Single command to retrieve bdf
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
10-25-2001 04:48 PM
10-25-2001 04:48 PM
Single command to retrieve bdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2001 04:58 PM
10-25-2001 04:58 PM
Re: Single command to retrieve bdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2001 05:15 PM
10-25-2001 05:15 PM
Re: Single command to retrieve bdf
I would be inclinded to write a script
to do this. The attached should do the
job. It will e-mail the results.
df -kP | grep "%" | grep -v cdrom | grep 100% | cut -c49-80 > /tmp/chkfsu.txt
grep 100% /tmp/chkfsu.txt
if [ $? = 0 ]; then
mailx -s "`cat /tmp/chkfsu.txt` in `hostname`" sysadmin,dbadmin < /dev/null
else
echo Nothing is 100%
fi
df -kP | grep "%" | grep -v cdrom | grep 99% | cut -c49-80 > /tmp/chkfsu.txt
grep 99% /tmp/chkfsu.txt
if [ $? = 0 ]; then
mailx -s "`cat /tmp/chkfsu.txt` in `hostname`" sysadmin,dbadmin < /dev/null
else
echo Nothing is 99%
fi
This should help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2001 11:29 PM
10-25-2001 11:29 PM
Re: Single command to retrieve bdf
The following caters for those filesystems that span two lines, if necessary:
bdf | sed 's/^ */ /' | awk 'NF==1{f=$0;getline;$0=f$0}{print}' | grep -e "9[0-9]%" -e "100%"
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 06:52 AM
10-26-2001 06:52 AM
Re: Single command to retrieve bdf
try this one
bdf |while read diski
do
dper=`echo $diski | awk -F" " '{printf "%d\n", $5}'`
if [ $dper -gt 80 ]
then
dmount="`echo $diski |awk '{printf "%s\n", $6}'`"
echo $dmount
fi
done
Regards
Joe.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 09:00 AM
10-26-2001 09:00 AM
Re: Single command to retrieve bdf
I wrote this to monitor a specific mount point for >= 93% full condition, but you can adapt it to examine the results of a bdf, and even assign different values for each mount point in the control file:
#!/bin/csh
# Test /ora4 for % full of archlog files
# archlog_pct.dat contains % range considered to be full
# If current % falls in range, launch ARCHLOG_TAR, unless it
# is already running
# Run frequency: daily, hourly
cd /oracle/ora_scripts/7.3.4
df -k /ora4 >archlog_curr_df.dat
grep '% ' archlog_curr_df.dat >archlog_curr_pct.dat
ps -ef >archlog_curr_ps
foreach k ("`fgrep -farchlog_pct.dat archlog_curr_pct.dat`")
if (`grep -c 'ARCHLOG_MOVE' archlog_curr_ps`) = 0 then
/oracle/ora_scripts/7.3.4/ARCHLOG_MOVE
endif
end
#
Regards,
Randy