1752782 Members
5823 Online
108789 Solutions
New Discussion юеВ

Re: bdfmegs ver 5.3

 
SOLVED
Go to solution
Bill Hassell
Honored Contributor

bdfmegs ver 5.3

Hi all. The latest bdfmegs is now available (attached) and has a much needed option to change the divisor between 1024 and 1000. The default is now 1000 (was 1024) but a one line change can be used to change the behavior back to 1024. Additionally, the -d option will toggle the default divisor to the opposite value.

Here's the -h (help) option:

Usage: bdfmegs [ -cdghlNPpqstuVv ] [ ]
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)
-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.3_Sep2009)


Bill Hassell, sysadmin
16 REPLIES 16
avizen9
Esteemed Contributor

Re: bdfmegs ver 5.3

thanks Bill,
i had downloaded it and will try with one of my test unix system.

i think in this update -V option is very usefull,

thanks again.. :)
Arturo Galbiati
Esteemed Contributor

Re: bdfmegs ver 5.3

Thanks Bill.
This is not only a good tool, but a good example of shell programming as well.
Rgds,
Art
Jorge Pons
Trusted Contributor

Re: bdfmegs ver 5.3

Hi

Thanks for this intersting tool.

Jorge
Hakki Aydin Ucar
Honored Contributor

Re: bdfmegs ver 5.3

Thank you Bill, I tried previous version and it was good. Now I will try this.
Hakki Aydin Ucar
Honored Contributor

Re: bdfmegs ver 5.3

Hi,

I tried -d switch, could you please look at the output in my 11i v1 HP-UX server:

# ./bdfmegs -vd /usr/contrib/bin /var/tmp
File-System Mbytes Used Avail %Used Type Vr Lrg Mounted on
/dev/vg00/lvol8 2048 1414 628 69% vxfs 4 yes /usr
/dev/vg00/lvol9 2048 833 1205 41% vxfs 4 yes /var

# ./bdfmegs -v /usr/contrib/bin /var/tmp
File-System Mbytes Used Avail %Used Type Vr Lrg Mounted on
/dev/vg00/lvol8 2097 1448 643 69% vxfs 4 yes /usr
/dev/vg00/lvol9 2097 853 1234 41% vxfs 4 yes /var

-different MB(s) ,so I admit that I could not quite catch the reason for this, can you explain why added this workaround ?
Patrick Wallek
Honored Contributor
Solution

Re: bdfmegs ver 5.3

**********
# ./bdfmegs -vd /usr/contrib/bin /var/tmp
File-System Mbytes Used Avail %Used Type Vr Lrg Mounted on
/dev/vg00/lvol8 2048 1414 628 69% vxfs 4 yes /usr
/dev/vg00/lvol9 2048 833 1205 41% vxfs 4 yes /var

# ./bdfmegs -v /usr/contrib/bin /var/tmp
File-System Mbytes Used Avail %Used Type Vr Lrg Mounted on
/dev/vg00/lvol8 2097 1448 643 69% vxfs 4 yes /usr
/dev/vg00/lvol9 2097 853 1234 41% vxfs 4 yes /var
*****************

In the first output, using the '-d' switch, it is forcing the use of 1024 as the divisor for figuring MB and GB. Your output shows the the LVOLs are '2048 MB' (2 GB) which is 2,097,152 KB / 1024.

The 2nd output is using 1000 as the divisor. Thus it is showing 2,097,152 / 1000 = 2,097 MB for your LVOLs.

Bill Hassell
Honored Contributor

Re: bdfmegs ver 5.3

Sorry Hakki, I messed up your points - you deserve 8 for asking a common question. Patrick beat me to the answer. If you compare bdf to bdfmegs (ver 5.3), the numbers will match. The 1024 option is not that useful


Bill Hassell, sysadmin
Hakki Aydin Ucar
Honored Contributor

Re: bdfmegs ver 5.3

I got the answer. it is a matter of resolution for me. Thanks for the replies.

No matter point I received.

Regards.
AndyMueller
Frequent Advisor

Re: bdfmegs ver 5.3

Bill, I have been using bdfmegs for some time now, and find it extremely useful. At times I have multiple snapshot filesystems mounted, which truly are only built at 10% of the actualy filesystem. However, in bdfmegs they appear as the identical size of the original (rather than the 10%). All of my snap lv's are names as such (/dev/vgtrn/lvtprepip_snap) always mounted to a /backups mountpoint. Is there any way that these could be excluded from the TOTALS calculation that bdfmegs does so well? Thanks in advance!