1752577 Members
4041 Online
108788 Solutions
New Discussion юеВ

Swapinfo VS Memdetail

 
SOLVED
Go to solution
C_V
Frequent Advisor

Swapinfo VS Memdetail

Hey guys whats the difference of the device swap in swapinfo and memdetail how come they dont match?

In checking the swap usage of the server which should be follow, swapinfo or memdetail?
12 REPLIES 12
Dennis Handly
Acclaimed Contributor

Re: Swapinfo VS Memdetail

Do you have some actual output?
Steven E. Protter
Exalted Contributor
Solution

Re: Swapinfo VS Memdetail

Shalom,

Two different utilities written, using two different concepts to report.

You might wish to provide an example of what the discrepancy really is.

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
C_V
Frequent Advisor

Re: Swapinfo VS Memdetail

Here is the sample:

$ /usr/sbin/swapinfo -tamd
Mb Mb Mb PCT Mb
TYPE AVAIL USED FREE USED START RESERVE PRI NAME
dev 2048 68 1980 3% 0 - 1 /dev/vg00/lvol2
total 2048 68 1980 3% - 0 -

$ /opt/HPO/SMSPIv2/bin/memdetail
Memory Stat total used avail %used
physical 1022.0 931.0 91.0 91%
active virtual 472.0 401.1 70.9 85%
active real 134.6 115.6 19.0 86%
memory swap 721.1 663.4 57.7 92%
device swap 2048.0 264.2 1783.8 13%


Don Morris_1
Honored Contributor

Re: Swapinfo VS Memdetail

http://docs.hp.com/en/B3921-60631/swapinfo.1M.html

-d

Print information about device paging areas only. This modifies the output header appropriately.

When you tell swapinfo to only report on devices, you shouldn't be surprised when the memory swap line is missing.

"swapinfo -atm" should look right (memdetail and swapinfo certainly agree on what swapinfo reported).
C_V
Frequent Advisor

Re: Swapinfo VS Memdetail

- Here is another output from the server:

$ /opt/HPO/SMSPIv2/bin/memdetail
Memory Stat total used avail %used
physical 1022.0 935.4 86.6 92%
active virtual 471.7 407.9 63.8 86%
active real 137.4 121.7 15.7 89%
memory swap 721.1 663.4 57.7 92%
device swap 2048.0 263.9 1784.1 13%
$ /usr/sbin/swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2048 66 1982 3% 0 - 1 /dev/vg00/lvol2
reserve - 198 -198
memory 721 663 58 92%
total 2769 927 1842 33% - 0 -

- When speaking of swap usage we are talking about device right?
- But how come the device swap usage is different from the memdetail and swapinfo.
Ganesan R
Honored Contributor

Re: Swapinfo VS Memdetail

Hi Sigfred,

Where is device swap value is varied on memdetail and swapinfo output?

memdetail report:
------------------
device swap 2048.0 263.9 1784.1 13%

swapinfo report:
----------------
dev 2048 66 1982 3% 0 - 1 /dev/vg00/lvol2

both are showing 2GB as device swap. it is correct only...
Best wishes,

Ganesh.
Dennis Handly
Acclaimed Contributor

Re: Swapinfo VS Memdetail

>When speaking of swap usage we are talking about device right?

Not really. There is device and there is pseudo swap.

>But how come the device swap usage is different from the memdetail and swapinfo.

You are going to have to point to the difference. Ganesan and I don't see any, at least for the total. For pseudo swap, it is the same for all values.

For memdetail, it seems it doesn't separate the reserved line from the used device swap. Summing the two from swapinfo, matches.
C_V
Frequent Advisor

Re: Swapinfo VS Memdetail

Yes i think your right "For memdetail, it seems it doesn't separate the reserved line from the used device swap. Summing the two from swapinfo, matches."

Is the reserve line considered as a normal swap?

What is the purpose of this reserve swap anyway?
Dennis Handly
Acclaimed Contributor

Re: Swapinfo VS Memdetail

>Is the reserve line considered as a normal swap? What is the purpose of this reserve swap anyway?

The reserve line is just details of how device swap is used. It basically says that the space has been reserved but hasn't been touched or swapped back to disk yet.