- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- bdf is not reflecting properly.
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
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
тАО08-31-2009 07:01 AM
тАО08-31-2009 07:01 AM
i am trying to capture bdf o/p into some text file.
since below mountpoint is showing in double line (as shown below).
/dev/sample/samplelvm
32768 1117 29680 4% /test
my script is picking only mountpoint name and percentage, but in this case my scripting picking worng data.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2009 07:14 AM
тАО08-31-2009 07:14 AM
Re: bdf is not reflecting properly.
This is a property of 'bdf' output for large filesystems. You might want to look at Bill Hassell's script which handles this and much, much more:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1326767
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2009 07:20 AM
тАО08-31-2009 07:20 AM
Re: bdf is not reflecting properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2009 07:26 AM
тАО08-31-2009 07:26 AM
Re: bdf is not reflecting properly.
Then use awk to printout either field $4 or $5 to get the percentage.
If you need the device file for your mountpoint use the /etc/mnttab file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2009 07:33 AM
тАО08-31-2009 07:33 AM
Re: bdf is not reflecting properly.
Its very diffult to get output for double line mountpoints?
Any scripting? :(
mu bdf o/p is like this
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 589824 383784 204480 65% /
/dev/vg00/lvol1 314736 58376 224880 21% /stand
/dev/vg00/lvol8 4718592 2795120 1908552 59% /var
/dev/vg00/lvol7 3801088 1711496 2073296 45% /usr
/dev/vg00/lvol4 229376 77440 150776 34% /tmp
/dev/vg00/test12 1048576 16725 967368 2% /sample
/dev/vg00/lvol6 4128768 2482416 1633528 60% /opt
/dev/vg00/lvol5 32768 8520 24064 26% /home
/dev/sample/samplelvm
32768 1117 29680 4% /test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2009 07:35 AM
тАО08-31-2009 07:35 AM
Re: bdf is not reflecting properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2009 07:42 AM
тАО08-31-2009 07:42 AM
Re: bdf is not reflecting properly.
I am trying to do scripting for geting an alert for mountpoint.
wen i try to store the list of mountpoint name and used details to file as below
bdf | tail -$cnt | awk '{print $5"#"$6}' > /tmp/mountpoint.txt
cnt variable is to avoid the title of bdf o/p
But since bdf o/p in double line for few mountpoint, i am not bale to get the exact o/p which i want :(
65%#/
21%#/stand
59%#/var
45%#/usr
34%#/tmp
2%#/sample
60%#/opt
26%#/home
#
/test#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2009 07:45 AM
тАО08-31-2009 07:45 AM
Re: bdf is not reflecting properly.
Hope this helps... Script follows:
#!/bin/bash
df | grep ^"/" > /tmp/filesystem_names
for fs in `cat /tmp/filesystem_names`
do
df $fs > /tmp/currFS
ln=`cat /tmp/currFS |grep -v ^Filesystem| wc -l`
case $ln in
2) perctg=`tail -1 /tmp/currFS|awk {'print $4'}|cut -d"%" -f1` ;;
1) perctg=`tail -1 /tmp/currFS|awk {'print $5'}|cut -d"%" -f1` ;;
*) echo "There was an error with volume ${fs}. Check manually" ;;
esac
if [ $perctg -ge 80 ] && [ $perctg -lt 90 ]
then
echo "replace this line with your WARNING action for volume $fs"
fi
if [ $perctg -ge 90 ]
then
echo "replace this line with your CRITICAL action for volume $fs"
fi
done
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2009 07:59 AM
тАО08-31-2009 07:59 AM
Re: bdf is not reflecting properly.
Just i am facing problem only in bdf o/p
If some one help me to get the o/p of bdf wothout double line it would be gr8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2009 08:15 AM