Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding HPUX swap info details

 
SOLVED
Go to solution
Highlighted
S N Raju
Advisor

Regarding HPUX swap info details

Hi All,

I want to know how the swap space value in swapinfo -t is shown.

To my knowledge I am multiplying f_bsize in struct statfs and pss_nblksenabled in pst_swapinfo structure.
ie:
(pss_nblksenabled *f_bsize)/1024 to get the swap size in KB. iS it the right way to do?

In HPUX 11 v2 the block size is shown as 8192.
But, in the swapinfo -t output it is considering 1024 as block size and showing the output.

Can anyone help me on this.This is very urgent...

Thanking u all,
Raju
8 REPLIES 8
Highlighted
Peter Godron
Honored Contributor
Solution

Re: Regarding HPUX swap info details

Raju,
you have the correct way.

Further info:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=700862
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=939794
ftp://hprc.external.hp.com/memory.htm

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.

So far you have never awarded any points !
Highlighted
S N Raju
Advisor

Re: Regarding HPUX swap info details

Thank u for ur help,

But why the swapinfo -t output shows result
considering 1024 as block size in HPUX 11 v2.But the block size value shown for f_bsize value in statfs structureis 8192.

which i should consider 1024 (or) 8192 as block size in HPUX 11 v2 .


I thing i want to know whether i need to assign points at the time of closing thread or during every reply.
Highlighted
Dennis Handly
Acclaimed Contributor

Re: Regarding HPUX swap info details

>assign points at the time of closing thread or during every reply.

Well if each reply is useful, you can do the latter.
Highlighted
Peter Godron
Honored Contributor

Re: Regarding HPUX swap info details

Raju,
swapinfo displays in 1024 byte 'blocks' as most people can easily work with / understand KB.
f_bsize comes from the filesystem generation and is set to 8KB in your case.

For example:
The du command works in 512-byte blocks.

This is the sort of stuff that makes UNIX such fun.
Highlighted
S N Raju
Advisor

Re: Regarding HPUX swap info details

Thank u,

Can anyone help me on the above query.Awaiting for replies.

tahnks,
raju
Highlighted
S N Raju
Advisor

Re: Regarding HPUX swap info details

Peter ,

Thanks for ur assistance.
I observed "f_frsize" in statvfs structure and "f_bsize" from statfs structure as 8192 bytes in HPUX 11 i version 2.

But i was not able to get which structure "swapinfo" system call is using.

The output of "tusc swapinfo" prior to HPUX 11i v2 is showing that it uses statvfs structure in caluclating the swap space.

Can you send me the output of "tusc swapinfo" from the HPUX 11i B 11.23,so that i can trace and know how the swapinfo output is shown.can u please help me on this...

Thanks,
Raju
Highlighted
S N Raju
Advisor

Re: Regarding HPUX swap info details


Hi,

I want to know the value of pss_flags in the struct pst_swapinfo when it enters to (SW_BLOCK) device swap size and when it enters into (SW_FS ) file system swap size.

ie :
I was caluclating using the following snippet.

if ((swp.pss_flags) & (SW_BLOCK))
{
swap = swp.pss_nblksenabled;
}
else if ((swp.pss_flags) & (SW_FS))
{
swap = swp.pss_limit * swp.pss_swapchunk;
}


I want to know whether the value of pss_flags is always 3 when entering to SW_BLOCK and 5 when entering to SW_FS .

Thanks,
Raju
Highlighted
S N Raju
Advisor

Re: Regarding HPUX swap info details

I am hardcoding the block size value in HPUX 11iv2.