Operating System - HP-UX
1832609 Members
2371 Online
110043 Solutions
New Discussion

Question on swap used - file system type

 
Padmini_2
Occasional Advisor

Question on swap used - file system type

Hi,
I am programatically trying to get the swap space used (using pstat interface).
I am getting the correct value of swap of type device. However, i am not able to get the values for swap of type file system.
The field in pstat pst_swapinfo pss_nfpgs(# of free pages of space in pool) is showing 0 for file system. However if I run swapinfo shows 0 in USED for the file system.
Could someone please help me?

Thanks
Padmini

3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Question on swap used - file system type

If your system load is low, a swapinfo value of zero is quite possible.

swapinfo -tam shows no reserved swap? That might be accurate.

Check that first though.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Padmini_2
Occasional Advisor

Re: Question on swap used - file system type

Hi,
Yes the system load is low.
My question is, in my program, if number of free pages of space is zero, then all of them must be displayed as used. (100%used, 0% free)

If swapinfo shows it as zero, then the no. of free pages should not be zero.

So, for filesystem, is pss_nfpgs, the right field to look for no. of free pages? Or is there a different field that I need to look at?

Thanks
Padmini
Kent Ostby
Honored Contributor

Re: Question on swap used - file system type

Padmini --

If the system has RESERVED all of the swap in your filesystem swap segment, but has not actually swapped out data there ( USED ) then it will report 0% USED on swapinfo -t and 0% available.

Also, what OS revision are you using and have you patched swapinfo ? There was at least at 11.00, a patch for swapinfo.

Finally, as a general FYI, you can read:

/usr/share/doc/mem_mgt.txt

which discusses the memory management system quite a bit.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"