1820342 Members
2796 Online
109623 Solutions
New Discussion юеВ

Output of used memory

 
SOLVED
Go to solution
Ammar_4
Frequent Advisor

Output of used memory

Hi
How can i get only first column and used memory percentage column from "bdf" command


4 REPLIES 4
Patrick Wallek
Honored Contributor
Solution

Re: Output of used memory

This is very simplistic and assumes that your bdf output is only 1 line per LV.

# bdf | awk '{print $1,$3}'


If some of the LV's span 2 lines, it gets more difficult.
TwoProc
Honored Contributor

Re: Output of used memory

bdf | grep -v Filesystem | awk '{ print $1 " " $5 }'
We are the people our parents warned us about --Jimmy Buffett
Ammar_4
Frequent Advisor

Re: Output of used memory

Thanks a lot
Alan Meyer_4
Respected Contributor

Re: Output of used memory

use bdf |awk '{print $1,$5}'

One problem though, if the LV name is too long it will force the bdf report to a second line and screw up the report. I've attached a perl script called bdf1.pl which outputs the bdf report in one line per filesystem.

Using this script, it would be

bdf1.pl |awk '{print $1,$5}'
" I may not be certified, but I am certifiable... "