1745786 Members
4004 Online
108722 Solutions
New Discussion юеВ

bdfmegs ver 5.0

 
SOLVED
Go to solution
Bill Hassell
Honored Contributor

bdfmegs ver 5.0

The latest version of bdfmegs is attached. The major changes are multiple -V vgnames and -N to exclude one or more vgnames.

The -V option can now be repeated many times, like this:

bdfmegs -V vg00 -Vvgextra,vg01,vg12

The new -N option is the opposite of -V. It can be used to not show selected vgnames, like this:

bdfmegs -N vg01,vg02

For those that have not used bdfmegs before, here are the help details:

Usage: bdfmegs [ -cghlNPpqstuVv ] [ ]
where:
-c # = Sort on column #
-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 limit
the output of bdfmegs as in:

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

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


Bill Hassell, sysadmin
19 REPLIES 19
Uday_S_Ankolekar
Honored Contributor

Re: bdfmegs ver 5.0

Great! Thanks Bill.
Good Luck..
Patrick Wallek
Honored Contributor

Re: bdfmegs ver 5.0

Bill,

Most excellent!!!! And thank you very much for the '-N' option. I **WILL DEFINITELY** use that.

See you in Las Vegas!
(I have signed up for your Monday class!!!)

avizen9
Esteemed Contributor

Re: bdfmegs ver 5.0

Hello Bill,

good to know its having some more additional options,

shall i use this with 10.10 version,
i had downloded this file, can i just copy this to any server/station and run it? is this executable? or i need to follow any step to make it work, let me know, thanks again.:)
avizen9
Esteemed Contributor

Re: bdfmegs ver 5.0

okey,
just i had tried its executable, its good can get more info with it,


thanks bill :)
Suraj K Sankari
Honored Contributor

Re: bdfmegs ver 5.0

Hi Bill,

Congratulation for your new version...
and many thanks to you for making such an nice tool.

Suraj
PatRoy
Regular Advisor

Re: bdfmegs ver 5.0

Hey there. If you don't mind me reporting a "bug", it can't read volume larger than 1 terabyte... see below :

[root@hostname]:/$ /usr/bin/bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 195304 846624 19% /
/dev/vg00/lvol1 1835008 462664 1361704 25% /stand
/dev/vg00/lvol8 34963456 17521896 17328328 50% /var
/dev/vg00/lvol7 6291456 3004608 3261248 48% /usr
/dev/vg00/lvol6 1048576 26992 1013728 3% /tmp
/dev/disk/disk80 20971520 4395700 15539850 22% /sybase
/dev/vg00/lvol5 10485760 5773400 4675576 55% /opt
/dev/vg01/ignite 23068672 7928017 14194430 36% /ignite
/dev/vg00/lvol4 4194304 1521824 2652072 36% /home
DevFS 13 13 0 100% /dev/deviceFileSystem
/dev/dumps/fsdump 5341052928 184704 5299142704 0% /dumps

[root@hostname]:/$ bdf
File-System Mbytes Used Avail %Used Mounted on
/dev/vg00/lvol3 1024 190 826 19% /
/dev/vg00/lvol1 1792 451 1329 25% /stand
/dev/vg00/lvol8 33.3g 16.7g 16.5g 50% /var
/dev/vg00/lvol7 6144 2934 3184 48% /usr
/dev/vg00/lvol6 1024 26 989 3% /tmp
/dev/disk/disk80 20.0g 4292 14.8g 22% /sybase
/dev/vg00/lvol5 10.0g 5638 4565 55% /opt
/dev/vg01/ignite 22.0g 7742 13.5g 36% /ignite
/dev/vg00/lvol4 4096 1486 2589 36% /home
DevFS 0 0 0 100% /dev/deviceFileSystem
/dev/dumps/fsdump 997.6g 180 957.7g 0% /dumps

Look at the /dumps volume.

Many thanks. Patrick
James R. Ferguson
Acclaimed Contributor
Solution

Re: bdfmegs ver 5.0

Hi Bill:

It looks like some left-over 32-bit shell arithmetic was exposed by Patrick's data (immediately above this post of mine).

In your 'TGconv()' function, a potential fix is:

Instead of:

[ $SUMFLAG -eq 0 ] && NUM=$(($1/$DIV)) || NUM=$1

Substitute:

if [ $SUMFLAG -eq 0 ]; then
NUM=$(echo "$1 $DIV"|awk 'END{printf "%d", $1/$2}')
else
NUM=$1
fi

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: bdfmegs ver 5.0

Thanks James. It has been difficult to locate multi-terabyte filesystems for testing. I'll fix the code.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: bdfmegs ver 5.0

>JRF: It looks like some left-over 32-bit shell arithmetic was exposed by Patrick's data

On 11.23, if you use ksh, you get 64 bit arithmetic.