- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Fixing bdf result display layout (not hot)!
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
03-30-2002 12:01 PM
03-30-2002 12:01 PM
This is what it looks like... Notice that since one of the filesystem is larger (/data2), all the statistical information gets shuffled to the right. How can I get it all aligned again?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 12:11 PM
03-30-2002 12:11 PM
Re: Fixing bdf result display layout (not hot)!
To do this you need to write a small script which reads each line of the bdf , extracting the column infomation then using the printf command to reformat the output to increase the column sizes.
I have had to do this in the past and I also used the expr command to divide the values of each column by 1024 thus turning the output into MB instead of blocks which made it more sensible.
If you can wait until Monday I can post the script on the forum. Unfortunatly I have no access to it until then.
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 12:14 PM
03-30-2002 12:14 PM
Re: Fixing bdf result display layout (not hot)!
Thanks, I'll assign points when you post the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 02:02 PM
03-30-2002 02:02 PM
Re: Fixing bdf result display layout (not hot)!
try this:
bdf | tr -s " " " " |
awk '{printf("%20s %10d %10d %10d %4s %20s",$1,$2,$3,$4,$5,$6,$7)}'
THE "tr -s" command has TWO spaces in first "bb" and one space in second "b".
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 03:07 PM
03-30-2002 03:07 PM
Re: Fixing bdf result display layout (not hot)!
By the way, what is the tr -s " " " " doing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 03:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 03:41 PM
03-30-2002 03:41 PM
Re: Fixing bdf result display layout (not hot)!
Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 03:42 PM
03-30-2002 03:42 PM
Re: Fixing bdf result display layout (not hot)!
Harry forgot to put the carriage return into the code and there are only six coulmns not seven.
try this
bdf | awk '{printf("%20s %10d %10d %10d %4s %s\n",$1,$2,$3,$4,$5,$6)}'
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 03:44 PM
03-30-2002 03:44 PM
Re: Fixing bdf result display layout (not hot)!
opps I seem to have submitted twice !!
keep your mail notification going I shall be posting the MB version for you on Monday.
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 03:57 PM
03-30-2002 03:57 PM
Re: Fixing bdf result display layout (not hot)!
I changed the script a little to left justify the first column which looks better now.
cheers
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 04:13 PM
03-30-2002 04:13 PM
Re: Fixing bdf result display layout (not hot)!
just realised an easy way to adapt this script to print MB instead of kbytes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2002 04:38 AM
03-31-2002 04:38 AM
Re: Fixing bdf result display layout (not hot)!
I think with the script given previously I am very satisfied (how it displays is shown on the top portion of the attachment), and thanks for the MB conversion.
The last format you gave me displays the results as shown in the bottom part of the attachment. Maybe if I play a little with the field justifications I can get a different result, but for now, I am very happy with the results as shown on the top portion.
Have a nice week!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2002 07:45 AM
04-01-2002 07:45 AM
Re: Fixing bdf result display layout (not hot)!
ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/coolscripts/
See an example of the output. bdfmegs (and bdfmegs -l) can be run by any user, bdfmegs with the -v option requires root. With -v, you can determine the block and frag size of the filesystem, the type (and version) of the filesystem, and whether it supports large files.
You'll notice that bdfmegs always lists each mountpoint on one line (never splits) so it adjusts the width of the first field automatically.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2002 05:04 AM
09-08-2002 05:04 AM
Re: Fixing bdf result display layout (not hot)!
Sorry I did not reply earlier but by the time you posted your solution I had already received a solution which I've been using since then. I just started reviewing all of my postings again today to see if I had missed any good info in the past.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 04:15 AM
09-09-2002 04:15 AM
Re: Fixing bdf result display layout (not hot)!
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/di-3.3/
Version 3.5 (with the 3.6 patches applied) binary is available on https://www.beepz.com/personal/merijn for 11.00 and 10.20
Current version available on http://www.gentoo.com/di/ is 3.7