cancel
Showing results for 
Search instead for 
Did you mean: 

bdfmegs 5.5 available

 
SOLVED
Go to solution
Bill Hassell
Honored Contributor

bdfmegs 5.5 available

The latest version of bdfmegs is now available (attached). Three changes have been made:

1. -M will skip mountpoints as in: bdfmegs -M /mnt2. The pattern is anchored internally to the end of the line as: /mnt2$

2. Added selection of bdf -s (when available) to speed up the output.

3. Added snap volume detection. When a snap volume is found, the size is the lvol size, the Used amount is from mount -p, and Avail and %Used are not applicable. For -s (sum total), snap volumes are not counted.

Here is the online help: bdfmegs -h

Usage: bdfmegs [ -cghlNPpqstuVv ] [ ]
where:
-c # = Sort on column #
-d = Toggle divisor (1000 or 1024, current=1000)
-g = show gigabytes, otherwise megabytes
-h = Usage (return code=0, Usage to stdout)
-l = local (no NFS)
-M = skip (grep -v) mountpoints
-N = skip one or more volume groups
Repeat -N or use commas: -N vg10,vg24
-p ## = highlight % -ge ##
-P ## = show only % -ge ##
-q = suppress header line and no char enhancements
-s = summarize total, used and available
-t = specifc filesystem: (hfs vxfs nfs cdfs cifs autofs DevFS)
-u = usage (return code=0, Usage to stdout)
-v = verbose (type, version, largefiles)
(version info read permission for mountpoint)
-V = select one or more volume groups
Repeat -V or use commas: -V vg00,vg01

File(s) or dirpath(s) may be specified to reduce the output of bdfmegs:

bdfmegs -vg /usr/contrib/bin /var/tmp

If bdfmegs is run as bdfgigs (ie, a link), then -g is default.
(bdfmegs ver 5.5_Dec2009)


Bill Hassell, sysadmin
18 REPLIES
Fabian Briseño
Esteemed Contributor
Solution

Re: bdfmegs 5.5 available

Thanks a lot for the update Mr. Hassell.


Have a nice day.
Knowledge is power.
Bill Hassell
Honored Contributor

Re: bdfmegs 5.5 available

Not sure what happened -- here's the attachment again.


Bill Hassell, sysadmin
Arturo Galbiati
Esteemed Contributor

Re: bdfmegs 5.5 available

Hello Bill,
good improvements. Thx a lot for keep this alive!
Rgds,
Art
Hakki Aydin Ucar
Honored Contributor

Re: bdfmegs 5.5 available

Hi,

it is working good in Hp-UX 11iv1 environment, bdfgigs seems good option.

nice work
Regards.
Gordon Sjodin
Frequent Advisor

Re: bdfmegs 5.5 available

Thanks for publishing this !
Vijeesh CTK
Trusted Contributor

Re: bdfmegs 5.5 available


Bill,

you are wonderful, dont know how i can express my gratitude.

this script made my life easy :)


Cheers,

Vijeesh CTK
Basheer_2
Trusted Contributor

Re: bdfmegs 5.5 available

I have been using your bdfmegs and I really love it.

Thanks again, I will get the new one.
uppu
Occasional Visitor

Re: bdfmegs 5.5 available

Hi,

How do i use this script in HP UX,

as a root user?

could you please let me know the procedure.

Thanks
Dennis Handly
Acclaimed Contributor

Re: bdfmegs 5.5 available

>uppu: How do I use this script in HP-UX?
>as a root user?
>could you please let me know the procedure.

root not needed.
Download the script as bdfmegs. Make it executable:
chmod a+x bdfmegs

Then execute it: ./bdfmegs options ...

If you put this in a location that's in your $PATH, you don't need that "./".
likid0
Honored Contributor

Re: bdfmegs 5.5 available

Thnx,

it's allways alised into our .profile

keep on the good work
Windows?, no thanks
uppu
Occasional Visitor

Re: bdfmegs 5.5 available

Hi,

Getting below error:

-rwxr-xr-x 1 payt nextst 25526 Aug 11 11:05 bdfmegs
dogmatix:/home$ ./bdfmegs -g
interpreter "/usr/bin/sh" not found
ksh: ./bdfmegs: not found
dogmatix:/home$ uname -a
HP-UX dogmatix B.11.23 U ia64 1990836496 unlimited-user license
dogmatix:/home$
Bill Hassell
Honored Contributor

Re: bdfmegs 5.5 available

> interpreter "/usr/bin/sh" not found

If you use vi to look at the file, I think you'll find ^M at the end of every line. This is caused by transferring a file from your PC to the HP-UX system (actually, any Unix flavor) using ftp in BINARY mode. Transfer the file again using ASCII and it will work OK. This is a very common mistake using ftp between very different operating systems.

You can also see the error suing cat -v:

cat -v bdfmegs

You can also fix the problem using dos2ux:

dos2ux bdfmegs > bdfmegs1
mv bdfmegs1 bdfmegs


Bill Hassell, sysadmin
uppu
Occasional Visitor

Re: bdfmegs 5.5 available

Excellent now it works.. you are champ.... :)

Thanks
Raj D.
Honored Contributor

Re: bdfmegs 5.5 available

Bill,
Congrats again for the new version of bdfmegs (5.5).


Working fine for me, however one quick question, when I am not using the -g flag, I am expecting all in MB (Megabyte ) output, however g still comming in the output.

-g = show gigabytes, otherwise megabytes.




#----------------------------------
$ ./bdfmegs
File-System Mbytes Used Avail %Used Mounted on
/dev/vx/dsk/rootdg/rootvol 1327 400 919 30% /
/dev/vx/dsk/rootdg/standvol 295 93 172 35% /stand
/dev/vx/dsk/dg01/work2 104.9g 11.3g 92.8g 11% /work2
/dev/vx/dsk/dg01/work1 104.9g 3577 100.5g 3% /work1
/dev/vx/dsk/rootdg/varvol 6291 4942 1338 79% /var
/dev/vx/dsk/rootdg/usrvol 6291 2010 4247 32% /usr
/dev/vx/dsk/rootdg/usersvol 2097 271 1811 13% /users
/dev/vx/dsk/rootdg/tmpvol 2097 17 2063 1% /tmp
/dev/vx/dsk/dg01/tarback 3080 35 2854 1% /tarback
/dev/vx/dsk/rootdg/optvol 6291 3431 2837 55% /opt
/dev/vx/dsk/dg01/optoracle 52.4g 9592 42.5g 18% /opt/oracle



thanks n Regards,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: bdfmegs 5.5 available

It is working great. Just want to know if the g in the output is normal.

The text not displaying good in the forum reply space, so attached in the output.
Regards, Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Bill Hassell
Honored Contributor

Re: bdfmegs 5.5 available

> It is working great. Just want to know if the g in the output is normal.

Yes. Because disk lvols can be a few MB or several TB, I reduced the available column widths to make things easier to read. The g shows GB, t shows TB. Rerun with -g to see the numbers in GB.

And be sure to read the announcement of bdfmegs 5.8 posted today.


Bill Hassell, sysadmin
Patrick Wallek
Honored Contributor

Re: bdfmegs 5.5 available

S.S.
Super Advisor

Re: bdfmegs 5.5 available

I would like to appreciate you Bill.
Great work!!

Today i have installed this script initially on our TEST server and checked, it was working fine and later i have installed on production machines.

Thank you for posting.