Re: script involving bdf command (217 Views)
Reply
Trusted Contributor
John Guster
Posts: 506
Registered: ‎03-16-2006
Message 1 of 5 (217 Views)
Accepted Solution

script involving bdf command

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 129256 1952672 6% /
/dev/vg03/lvol1 105775104 79229992 26368480 75% /devdata
/dev/devdatareplicate/lvol1
53018624 48677552 4311432 92% /devdatarep

how to get info of %used and its Mounted on in script? notice that /dev/devdatareplicate/lvol1 is one line, its' info is in another line while /dev/vg00/lvol3 has everything in one line. Thanks. JG
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 2 of 5 (217 Views)

Re: script involving bdf command

Hi John:

Bill Hassell's 'bdfmegs' script addresses this issue and much more:

http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1124262&admit=109447627+120170...

Regards!

...JRF...
Honored Contributor
Sandman!
Posts: 2,220
Registered: ‎01-13-2005
Message 3 of 5 (217 Views)

Re: script involving bdf command

bdf | awk '{if(NF==1) getline m;gsub(" +"," ",m);print $0m;m=""}'

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 129256 1952672 6% /
/dev/vg03/lvol1 105775104 79229992 26368480 75% /devdata
/dev/devdatareplicate/lvol153018624 48677552 4311432 92% /devdatarep
Honored Contributor
Sandman!
Posts: 2,220
Registered: ‎01-13-2005
Message 4 of 5 (217 Views)

Re: script involving bdf command

Minor update to my last post...so use the command posted below:

# bdf | awk '{if(NF==1) getline m;gsub(" +"," ",m);print $0" "m;m=""}'
Trusted Contributor
John Guster
Posts: 506
Registered: ‎03-16-2006
Message 5 of 5 (217 Views)

Re: script involving bdf command

thanks for sharing the info.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.