Operating System - HP-UX
1836579 Members
1447 Online
110102 Solutions
New Discussion

command to check the free space in Gb

 
SOLVED
Go to solution
Grayh
Trusted Contributor

command to check the free space in Gb

Is there a command to check the total available free space on the Disk in GB.

12 REPLIES 12
Adam W.
Valued Contributor
Solution

Re: command to check the free space in Gb

Hein van den Heuvel
Honored Contributor

Re: command to check the free space in Gb

This question has been asked and answerred many times before.

If you just google your subject line you'll find a solution in the bottom of:

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

re-google for hpux bfd you'll find:

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

you may want to check out bdfmegs and several other similar tools

google: +site:itrc.hp.com bdf gigabytes

"bdf | awk '{ sum += $2; } END { print sum; }' for total space in Megabytes ??"

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


Cheers,
Hein.
James R. Ferguson
Acclaimed Contributor

Re: command to check the free space in Gb

Hi:

Sure, do the math. Actually, Bill Hassell has a very nice 'bdf' script:


http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1124262

Regard!

...JRF...
Torsten.
Acclaimed Contributor

Re: command to check the free space in Gb

It is related to your thread

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

right?

So you want to know about the free space in file systems?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Grayh
Trusted Contributor

Re: command to check the free space in Gb

From the below forum I have the script 48368.null... Now how to run this script is the issue...

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1124262&admit=109447626+1224598060060+28353475

Totston... You are correct... It is related to my other thread...may be for my future reference...

To make sure that there is no confusition caused... I have opened a new thread..
Adam W.
Valued Contributor

Re: command to check the free space in Gb

well how about assigning some points for those of us who have taken time out of our day to post something helpful? Too many people not giving out points these days.
There are two types of people in the world, Marines and those who wish they were.
Grayh
Trusted Contributor

Re: command to check the free space in Gb

I have fond the below in one of the links provided and it worked great directly copy,pasting at the command line

#bdf | awk '/^Filesystem/ {next;}; NF>1 && $NF!="/"{datotal+=$(NF-2)/(10
24*1024);printf("%10s %9d kbytes available \n", substr($NF,2), $(NF-2));}END {pr
int "Total available ", datotal, "gigabytes"}' | sort -nr -k2,2

# t "Total available ", datotal, "gigabytes"}' | sort -nr -k2,2
usr 49515144 kbytes available
data 42356606 kbytes available
var 6769232 kbytes available
opt 5017400 kbytes available
tmp 4997160 kbytes available
stand 1671872 kbytes available
home 783093 kbytes available
Total available 105.963 gigabytes


Now after allocation space to the filesystems.. Is there a way to check the Total remaining unallocated space {which is not been allocated to any file system}
Torsten.
Acclaimed Contributor

Re: command to check the free space in Gb

You already know about your 10 free PEs in vg00!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
James R. Ferguson
Acclaimed Contributor

Re: command to check the free space in Gb

hI:

> From the below forum I have the script 48368.null... Now how to run this script is the issue...

In Bill's thread, he describes the script's usage (available options and arguments)!

If you *look* at the script you downloaded, you would see those optinos and arguments as inline documentation.

If you *run* the script like:

# ./bdfmegs -?

,,,you will see the available options and arguments.

I hope "...how to run this script?" doesn't mean that you need to arm its executable bit.

Regards!

...JRF...
Torsten.
Acclaimed Contributor

Re: command to check the free space in Gb

From your other thread:

...
PE Size (Mbytes) 32
Total PE 4322
Alloc PE 4312
Free PE 10
...

320MB.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Grayh
Trusted Contributor

Re: command to check the free space in Gb

thanks everyone
Torsten.
Acclaimed Contributor

Re: command to check the free space in Gb

To make it clear:

"Is there a way to check the Total remaining unallocated space {which is not been allocated to any file system}"

This is what vgdisplay (Free PE) is telling you!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!