- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need suggestions on formatting of BDF to get P...
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
тАО11-02-2004 04:09 AM
тАО11-02-2004 04:09 AM
Attached you will find an output example for a bdf:
In my next thread I'll attach the script I used (a little modified and at this moment incomplete) in the past. However, it worked fine before because the filesystem names and rest of the bdf information only used 1 line per. In this case it is different, and when I get to the end of the script, sometimes the 2nd field ends up being the kbytes, while in other cases it may be the "kbytes used".
Please provide suggestions so that the script may work based on parameter provided. There are other things I must play with, such as the value for percentage, which a this moment is taking with the % sign and would not qualify the statement provided, but I can work with that once I have some help with the other problem presented. Any help would be appreciated!
Solved! Go to Solution.
- Tags:
- bdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 04:12 AM
тАО11-02-2004 04:12 AM
Re: Need suggestions on formatting of BDF to get Percentage use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 04:13 AM
тАО11-02-2004 04:13 AM
Re: Need suggestions on formatting of BDF to get Percentage use
I don't use 'bdf'. I use 'df' FOr ex.,
df -k /stand
/stand (/dev/vg00/lvol1 ) : 269241 total allocated Kb
197458 free allocated Kb
71783 used allocated Kb
26 % allocation used
df -k /stand |awk '/allocation used/ {print $1}'
26
This way I don't run into 'number of lines' issue.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 04:15 AM
тАО11-02-2004 04:15 AM
Solutionftp://contrib:9unsupp8@hprc.external.hp.com/
Then go to the sysadmin directory and then the cronscripts directory.
(A direct path: ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/cronscripts
In that directory is a script called 'diskspace.sh' that will monitor your space and take into consideration the splitting of lines in the bdf output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 04:16 AM
тАО11-02-2004 04:16 AM
Re: Need suggestions on formatting of BDF to get Percentage use
Do you have a script incorporated that checks all of the filesystems and cheks the space used by means of df -k? Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 04:18 AM
тАО11-02-2004 04:18 AM
Re: Need suggestions on formatting of BDF to get Percentage use
Maybe this script can help. change the values as you see fit.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 04:23 AM
тАО11-02-2004 04:23 AM
Re: Need suggestions on formatting of BDF to get Percentage use
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 04:29 AM
тАО11-02-2004 04:29 AM
Re: Need suggestions on formatting of BDF to get Percentage use
A little script that I just
wrote. It cheks to see if the percent used is greater than or equal to 80% and sends a mail to yourid@yourdomain.com. Change the first two lines to your needs.
-Sri
#!/usr/bin/ksh
LIMIT=80
EMAIL=yourid@yourdomain.com
cleanup()
{
rm -f /tmp/fsreport$$
}
trap cleanup 0 1 2
for FS in $(df -l|awk '{print $1}')
do
AVAIL=$(df -k $FS|awk '/allocation used/ {print $1}')
if [ $AVAIL -ge $LIMIT ]
then
bdf $FS |sed '1d' >> /tmp/fsreport$$
fi
done
mailx -s "Disk space report on $(hostname)" $EMAIL < /tmp/fsreport$$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 04:39 AM
тАО11-02-2004 04:39 AM
Re: Need suggestions on formatting of BDF to get Percentage use
Thanks everyone for your prompt assistance, look for your points shortly!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2004 05:01 AM
тАО11-02-2004 05:01 AM
Re: Need suggestions on formatting of BDF to get Percentage use
I think I will end up using Sanjay's script, it provides an output that I really like. Of course, everyone's help is appreciated.
Sri, as simple as your script is, it does the job perfectly.
Steven, something happened to the file you attached, it's either incomplete or the file was sent binary and it messed up the format. Sorry, but I was unable to read/use, I'll reassign points if you decide to re-attached in ascii.
Patrick, I will keep yours for when I go back to doing sys admin stuff.
Thanks everyone for providing a very quick solution.
Adam