cancel
Showing results for 
Search instead for 
Did you mean: 

bdf output error

SOLVED
Go to solution
Viney Kumar
Regular Advisor

bdf output error

Hi All,

I am facing some problem with bdf cmd with awk option but it not capturing proper way
cmd

bdf|awk '{print $5,$6}'|sed 1d|sed s/%// > bdf.out

problem is in cmd is not giving percentage value of except vg00 vloume
#more bdf.out
BSCSTEST:/tmp> more bdf.out
99 /
19 /stand
83 /var
0 /var/adm/crash
66 /usr

/ub00/work
83 /tmp
99 /opt
82 /home

/OLD_CDR_restore20

/OLD_CDR_restore15

/OLD_CDR_restore19

/OLD_CDR_restore23

/OLD_CDR_restore26

/OLD_CDR_restore1

/OLD_CDR_restore5

/OLD_CDR_restore11

/OLD_CDR_restore4

/OLD_CDR_restore6

/OLD_CDR_restore

/ub02/bscs

/ub01/bscs

/uu05_pjb/bscs/BSCSPRPnew_new

/bscspjb_redo_new

/uu08/bscs/BSCSPINT_new

/uu03_pjb/bscs/BSCSDBAS_new

/uu07_pjb/bscs/RTXTST_new

/prehar_control2_arch

/OLD_CDR_restore35

/OLD_CDR_restore14

/ora817_new

/OLD_CDR_restore24
100 /ora9

/OLD_CDR_restore39

kindly help me

thanks in adv
9 REPLIES
avizen9
Esteemed Contributor

Re: bdf output error

What did you mean by

problem is in cmd is not giving percentage value of except vg00 vloume

are you only gettting output in % for vg00? can you post bdf -l and bdf command output here, thanks
likid0
Honored Contributor

Re: bdf output error

I would think that in your bdf output the FS that are not showing the % is beacuse they are 2 diferent lines in bdf, you have to change your one-liner.

for example:

bdf:

/dev/vgsoftora/lvgsoftora --> one-line

20967424 10247076 10058217 50% /oracle --> second -line
Windows?, no thanks
Viney Kumar
Regular Advisor

Re: bdf output error

hi

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1032192 1023144 9048 99% /
/dev/vg00/lvol1 393392 68728 285320 19% /stand
/dev/vg00/lvol7 10485760 8813848 1659704 84% /var
/dev/vg00/lvol10 5128192 6468 4801686 0% /var/adm/crash
/dev/vg00/lvol6 7176192 4627469 2389474 66% /usr
/dev/vg00/ub00_work
8192000 2047360 5760655 26% /ub00/work
/dev/vg00/lvol5 4608000 3963341 604992 87% /tmp
/dev/vg00/lvol4 5128192 5070992 57200 99% /opt
/dev/vg00/lvol8 212992 173816 38920 82% /home
/dev/Old_CDR-Restore_VG2_291/Old_CDR-Restore_LV2
2139095040 78414456 2044582592 4% /OLD_CDR_restore20
/dev/Old_CDR-Restore_VG15_291/Old_CDR-Restore_VG15_291_lv
2139095040 68456 2122316088 0% /OLD_CDR_restore15
/dev/Old_CDR-Restore_VG19_291/Old_CDR-Restore_VG19_291_lv
2139095040 1427342656 706191848 67% /OLD_CDR_restore19
/dev/Old_CDR-Restore_VG23_291/Old_CDR-Restore_VG23_291_lv
2139095040 69680 2122316088 0% /OLD_CDR_restore23
/dev/Old_CDR-Restore_VG26_291/Old_CDR-Restore_VG26_291_lv
2139095040 69680 2122316088 0% /OLD_CDR_restore26
/dev/Old_CDR-Restore_VG18_291/Old_CDR-Restore_VG18_291_lv
2139095040 376714848 1748612400 18% /OLD_CDR_restore1
/dev/Old_CDR-Restore_VG22_291/Old_CDR-Restore_VG22_291_lv
2139095040 69104 2122316088 0% /OLD_CDR_restore5
/dev/Old_CDR-Restore_VG25_291/Old_CDR-Restore_VG25_291_lv
1497366528 161186640 1325741744 11% /OLD_CDR_restore11
/dev/Old_CDR-Restore_VG20_291/Old_CDR-Restore_VG20_291_lv
2139095040 69856 2122316096 0% /OLD_CDR_restore4
/dev/Old_CDR-Restore_VG16_291/Old_CDR-Restore_VG16_291_lv
2139095040 68528 2122316080 0% /OLD_CDR_restore6
/dev/Old_CDR-Restore_VG/old-CDR-Restore_LV
784334848 687407976 96169720 88% /OLD_CDR_restore
/dev/bscsdata1/ub02_lv
266240000 266239352 648 100% /ub02/bscs
/dev/bscsdata1/ub01_lv
266240000 237085896 28926368 89% /ub01/bscs
/dev/pjbtest_400/bscsprp_newlv
2097152 37726 1930735 2% /uu05_pjb/bscs/BSCSPRPnew_new
/dev/pjbtest_400/bscspjb_temp_new_lv
25624576 3768 25220488 0% /bscspjb_redo_new
/dev/pjbtest_400/bscspint_new_lv
11272192 3526 10916528 0% /uu08/bscs/BSCSPINT_new
/dev/pjbtest_400/bscsdbas_new_lv
2097152 1614 1964574 0% /uu03_pjb/bscs/BSCSDBAS_new
/dev/pjbtest_400/rtxtst_new_lv
2097152 1614 1964574 0% /uu07_pjb/bscs/RTXTST_new
/dev/prehararch/prehar_control2_lv
1024000 1357 958735 0% /prehar_control2_arch
/dev/bscsdata1/ub03_lv
266240000 18584 262061780 0% /OLD_CDR_restore35
/dev/Old_CDR-Restore_VG14_291/Old_CDR-Restore_VG14_291_lv
2139095040 69448 2122316088 0% /OLD_CDR_restore14
/dev/newpjbuat_vg291/ora817_lv
20971520 13563164 7292656 65% /ora817_new
/dev/Old_CDR-Restore_VG24_291/Old_CDR-Restore_VG24_291_lv
2139095040 42929584 2079789704 2% /OLD_CDR_restore24
/dev/vg00/ora_lv 7168000 7168000 0 100% /ora9
/dev/newpjbuat_vg291/pjbuat_lv_new
1245184000 4484160 1231007128 0% /OLD_CDR_restore39


actually whatever output is coming in new line its giving error
thanks
Mark McDonald_2
Trusted Contributor

Re: bdf output error

Th problem is that bdf splits the lines for the volumes with longer names.

Please try to use bdfmegs instead of bdf, this will work for you.

bdfmegs is available elsewhere on this site.
Mark McDonald_2
Trusted Contributor
Solution

Re: bdf output error

Richard Hepworth
Esteemed Contributor

Re: bdf output error

Viney,

The problem with bdf is it line wraps if your volume name is too long.
Try this:

mount | awk '{print $1}' | while read FS
do
USAGE=$(df -k $FS | grep "%" | awk '{print $1}')
echo $USAGE $FS >> /tmp/bdf.out
done

regards,

Richard
Suraj K Sankari
Honored Contributor

Re: bdf output error

Hi,

No need to wright script just download this file bdfmesg written by Great Mr.Bill Hassell

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1291639

And Enjoy Really its a GREAT TOOL.

Suraj
Viney Kumar
Regular Advisor

Re: bdf output error

thanks to all

my problem has been resolve now by using following cmd:

bdf | awk ' { print $(NF-1) " " $(NF)}'

bye tc all
Viney Kumar
Regular Advisor

Re: bdf output error

bdf | awk ' { print $(NF-1) " " $(NF)}'