Operating System - HP-UX
1834150 Members
2568 Online
110064 Solutions
New Discussion

bdf output in megabytes on 11.23

 
SOLVED
Go to solution
Steven Richards
Frequent Advisor

bdf output in megabytes on 11.23

Hi,

I found a really useful script on the forums that produced all my bdf output into nice columns and into megabytes for HPUX 11.00 and 11.11, but this doesn't seem to work on Itanium 11.23, has anyone got a script that'll do this for 11.23?

Your time and help are much appreciated.

S.
A pint of vodka my good woman
22 REPLIES 22
Yogeeraj_1
Honored Contributor

Re: bdf output in megabytes on 11.23

hi,

did you use the bdfmegs script?

revert

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Patrick Wallek
Honored Contributor

Re: bdf output in megabytes on 11.23

Are you talking about the bdfmegs script? If so, what errors are you getting? I have just put bdfmegs on an 11.23 PI (PA-RISC) and it works fine.

Can you post the output from the command?
Steven Richards
Frequent Advisor

Re: bdf output in megabytes on 11.23

Yes, I believe it is called bdfmegs. Is there a version for 11.23 Itanium?

[I setup link called bdfm as I couldn't be bothered to type bdfmegs everytime!]
A pint of vodka my good woman
Pete Randall
Outstanding Contributor
Solution

Re: bdf output in megabytes on 11.23

I haven't tried it on 11.23, but here is bdfmegs (attached). You might want to re-install.


Pete

Pete
Geoff Wild
Honored Contributor

Re: bdf output in megabytes on 11.23

Sorry - don't have an Itanium to test on - add a set -x to the top of the script and post the output if you can...

If bdfmegs script - it uses df to get mount point sizes...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Kent Ostby
Honored Contributor

Re: bdf output in megabytes on 11.23

When you say it doesn't seem to work, what exactly is it doing differently (or not doing)?

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Steven Richards
Frequent Advisor

Re: bdf output in megabytes on 11.23

Apologies if I was being a bit vague.

It would appear my version of bdfmegs was a bit out of date, I used the version pete attached and it works no problem, although I do get a strange line of zero's, sometimes in the middle, sometimes at the end, but I can live with that.

My version was hanging on the Itanium servers in the middle of the listing and I would have to 'ctrl-c' to end it. Whatever caused this obviously got fixed in the more recent version.

Thanks for all your help.
A pint of vodka my good woman
Patrick Wallek
Honored Contributor

Re: bdf output in megabytes on 11.23

If you are interested, I have modified a version of bdfmegs so that it prints the output in GB instead of MB.

It is attached and called bdfg.
Steven Richards
Frequent Advisor

Re: bdf output in megabytes on 11.23

Patrick,

Thank you, much appreciated.

Steve.
A pint of vodka my good woman
Bill Hassell
Honored Contributor

Re: bdf output in megabytes on 11.23

This is the latest version. I started to work on VxVM filesystems a while ago but got sidetracked. The -v option doesn't work for the Veritas Volume Manager as fsadm doesn't work with VxVM filesystems.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: bdf output in megabytes on 11.23

This is the latest version. I started to work on VxVM filesystems a while ago but got sidetracked. The -v option doesn't work for the Veritas Volume Manager as fsadm doesn't work with VxVM filesystems.


Bill Hassell, sysadmin
Steven Richards
Frequent Advisor

Re: bdf output in megabytes on 11.23

Bill,

Actually, it doesn't work. I get the following message:

root on pizarro[bin] bdfmegs
interpreter "/usr/bin/sh" not found
sh: bdfmegs: not found.

Any ideas?

S.
A pint of vodka my good woman
Patrick Wallek
Honored Contributor

Re: bdf output in megabytes on 11.23

It worked for me, but I had to do a:

# dos2ux bdfmegs.new > bdfmegs

to strip the ^M's from the file.

It also sounds like the shell specification in the first line is invalid in the script for some reason.
Steven Richards
Frequent Advisor

Re: bdf output in megabytes on 11.23

Patrick

dos2ux seemed to fix it, thanks.

S.
A pint of vodka my good woman
Alan Meyer_4
Respected Contributor

Re: bdf output in megabytes on 11.23

I've run across an another problem with the code in bdfmegs. Where would be a good place to have that discussion? Here, in another thread or offline?
" I may not be certified, but I am certifiable... "
Borislav Perkov
Respected Contributor

Re: bdf output in megabytes on 11.23

Hi Steve,

Here I have one modified script showing also inodes.

Regards,
Borislav
H.Merijn Brand (procura
Honored Contributor

Re: bdf output in megabytes on 11.23

OK, just a tiny bit besides the issue here, but why a script?

Fetch the source for 'di' from http://www.gentoo.com/di/ and install that :)

FYI I have just uploaded di-4.1 software depots for 10.20, 11.00, and 11.11v1

http://www.cmve.net/~mbrand/di-4.1-10.20.sd.bz
http://www.cmve.net/~mbrand/di-4.1-11.00.sd.bz
http://www.cmve.net/~mbrand/di-4.1-11.11.sd.bz

I'll see if I can manage to make a 4.1-11.23 too from a testdrive

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: bdf output in megabytes on 11.23

The moonphase on the td176 was good:

http://www.cmve.net/~mbrand/di-4.1-11.23.sd.bz

Please enjoy it's power

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Alan Meyer_4
Respected Contributor

Re: bdf output in megabytes on 11.23

The problem I encounter occurs whenever you have more than one mount point from the same NFS source.

My nornal bdf output includes the following;

nasunix:/mrcdoc 8786112 53776 8732336 1% /mrcdoc
nasunix:/prod 6195432 2139152 4056280 35% /prod
nasunix:/u 17573248 13503560 4069688 77% /u

with bdfmegs, it shows as;

nasunix:/mrcdoc 8580 53 8528 1% /mrcdoc
nasunix:/mrcdoc 8580 53 8528 1% /mrcdoc
nasunix:/mrcdoc 8580 53 8528 1% /mrcdoc


I traced it back to the MYMOUNTS line. It occurs due to the fact that the delimiter, a ":", is used inthe NFS mout definition.

MYMOUNTS=$(cat $MNTLIST | awk '{print $2":"$3":"$1}')


I changed the delimiter to a pipe ("|").

MYMOUNTS=$(cat $MNTLIST | awk '{print $2"|"$3"|"$1}')

Additionally, the following lines need to be changed reflect the different delimiter also;

MOUNTPOINT=$(echo $MNTINFO | cut -f1 -d"|")
SOURCE=$( echo $MNTINFO | cut -f3 -d"|" )
FSTYPE=$( echo $MNTINFO | cut -f2 -d"|" )


" I may not be certified, but I am certifiable... "
rick jones
Honored Contributor

Re: bdf output in megabytes on 11.23

If folks are finding value in having different units for bdf output, it might be a good idea to fire-up those support contracts and submit Enhancement Requests... then the onus of making sure that stuff works falls on HP :)
there is no rest for the wicked yet the virtuous have no pillows
Bill Hassell
Honored Contributor

Re: bdf output in megabytes on 11.23

Thanks for the feedback. I will be fixing the : delimiter problem and also adding a bdfgigs version (same script, link the additional name for Gbyte display). The inode list is really only useful for HFS filesystems--VxFS filesystems create inodes on the fly. I'll post a new thread and reply to this one when it is ready. Thanks for the feedback about the ^M as this is always a possibility when attaching a Unix file. I'll make sure the file is properly attached.


Bill Hassell, sysadmin
Patrick Wallek
Honored Contributor

Re: bdf output in megabytes on 11.23

Bill,

One question I have about the source code. In the statement 'awk '{print int($1/1024+.5)}'', why are you adding .5 to the result of $1/1024? I think I know the reason, but I'm just curious to see if I'm right.

Thanks!