1751940 Members
4963 Online
108783 Solutions
New Discussion юеВ

Disk information in HPUX

 
S N Raju
Advisor

Disk information in HPUX


Hi all,

I am using statvfs structure in a sample program to get the disk used(f_blocks*f_frsize) and disk free(f_bfree) in a particular file system.What I found was that in HP_UX 11.0 ,the values returned by the structure are different from the values I get from command "df -k".In HPUX 11.11 the values shown are matching with "df -k" output.


Can any one clarify it?

Thank u all
raju
10 REPLIES 10
Calandrello
Trusted Contributor

Re: Disk information in HPUX

the values that you this catching is in block and not in KB
S N Raju
Advisor

Re: Disk information in HPUX


hi,

Thank u..Can i know how i can get this block data in kb.. right now i am considering block as byte and caluclating in kb. thank u for ur help

thanks,
raju
Evert Ladrak
Advisor

Re: Disk information in HPUX

Hi Raju,

Normaly it's 512 bytes in a block.

- ETL
Evert
S N Raju
Advisor

Re: Disk information in HPUX


Hi,
Thank u all,

I got the "fundamental block size" ie: 1024 from the "f_frsize" field in the statvfs structure.so,i have done
(f_blocks *f_frsize)/1024 to get the total size allocated for filesystem in KB.I got the value as 1496021.

But the "df -k" shows 1346418 (in kb).

please help me on this.

thanks,
raju
S N Raju
Advisor

Re: Disk information in HPUX



Hi all,

can anyone tell me the structure i need to refer to get matched output as of "df -k".
As i mentioned earlier, i was not able to get the output as of "df -k".I was refering to statvfs structure..Can anyone help me on this.

thanks
raju
S N Raju
Advisor

Re: Disk information in HPUX


Hi

Is the values in the structure "statvfs" gets updated accordingly or it caches the data.The output is not getting matched with df -k output.Which information I need to consideras the correct one, the structure data or the
df -k output?

please anyone clarify me

thanks,
raju

Sandman!
Honored Contributor

Re: Disk information in HPUX

man 4 fs_vxfs
S N Raju
Advisor

Re: Disk information in HPUX


Hi sandman

I have checked the fs_vxfs man page. It seems to be for format of a vxfs file system. I checked the output of bdf -l.The value of total space allocated for a file system in the bdf -l output is mismatching the the df -k output.i am
confused to see diffrent values for the same field.Can i get a solution to have the correct values of the filesystem

thanks
raju
Mohanasundaram_1
Honored Contributor

Re: Disk information in HPUX

Hi Raju,

If my memory serves me right, there is a bdf patch in HP-UX 11.00 to fix this mismatch between df and bdf outputs. PLease search for the patch in ITRC.

With regards,
Mohan.
Attitude, Not aptitude, determines your altitude