1837764 Members
3568 Online
110119 Solutions
New Discussion

View swaping activity

 
Marcelo De Florio_1
Frequent Advisor

View swaping activity

How can i to see swaping activity (without glance) ?

Regards.

MDF
Marcelo De Florio
11 REPLIES 11
steven Burgess_2
Honored Contributor

Re: View swaping activity

Hi

You can view usage with

swapinfo -tam

HTH

Steve
take your time and think things through
Joaquin Gil de Vergara
Respected Contributor

Re: View swaping activity

see man pages for sar

-w option shows you swap activity

# sar -w 1 10
(monitor swap activity each 1 second during 10 seconds)

Teach is the best way to learn
MANOJ SRIVASTAVA
Honored Contributor

Re: View swaping activity

Hi Marcelo


Here is a smal c Script which you can comiple and run , it will give the correct memory information as requierd :



Memory Stat total used avail %used
physical 32764.0 8058.4 24705.6 25%
active virtual 531.3 128.9 402.4 24%
active real 597.0 136.0 461.0 23%
memory swap 26522.5 3738.2 22784.3 14%
device swap 2378.0 2365.5 12.5 99%


Also ofcouse swapinfo does the job too .


I ahve attached the program which you can comiple in your machine.


Manoj Srivastava
Marcelo De Florio_1
Frequent Advisor

Re: View swaping activity

Steven:

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol9
reserve - 1784 -1784
total 8192 1784 6408 22% - 0 -

I execute this command, how can i interpreted this output ?

PCT USED, mean Swap Space Used, because /dev/vg00/lvol2 and lvol8 have 0% USED, what are the different between both ?

MDF
Marcelo De Florio
Pete Randall
Outstanding Contributor

Re: View swaping activity

Hi,

Try:

sar -w (not so good)
vmstat (preferred)

Pete

Pete
Marcelo De Florio_1
Frequent Advisor

Re: View swaping activity

Manoj:
I execute this program, so i get this result:

Memory Stat total used avail %used
physical 4092.0 4016.9 75.1 98%
active virtual 626.5 126.2 500.3 20%
active real 1093.3 132.9 960.4 12%
memory swap 0.0 0.0 0.0 nan%
device swap 8192.0 1786.8 6405.2 22%

How can i interpreted each row ?

Regards.

MDF
Marcelo De Florio
steven Burgess_2
Honored Contributor

Re: View swaping activity

Hi

Alternatively, the number of free swap pages can be seen through adb.
Do the following:

adb -k /hp-ux /dev/kmem
swapspc_cnt /D
swapspc_cnt /D

This will display the number of free swap pages. Multiply the number
returned by 4096 for the number of free swap bytes.

HTH

Steve
take your time and think things through
Rita C Workman
Honored Contributor

Re: View swaping activity

Marcelo,

Based on what I could see on the swapinfo -tam (which along with vmstat) is the commands I use..

lvol2 is your default area and it would seem that lvol9 was also set up for swap.

The %used...showing 0....says you are not swapping. Like I said you could run something like vmstat -nS and note fields pg_in and pg_out. If these are also 0 than ..again.. you are not paging/swapping. You are looking good !
Note...when running vmstat you need to clear the totals occassionaly to ensure your not reflecting old info...vmstat -z

The last line shows the total % used. Now this is the overall average of disk/fs/memory. In your case it shows 22% overall used. So you are barely making the system sweat !!

Hope that helps !
Rit
steven Burgess_2
Honored Contributor

Re: View swaping activity

Marcelo

Here is a white paper on memory management

http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000009254450

do a

man swapinfo

For an explanation on the swapinfo command

HTH

Steve
take your time and think things through
steven Burgess_2
Honored Contributor

Re: View swaping activity

Hi

And shared memeory

http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062685991

HTH

Steve
take your time and think things through
MANOJ SRIVASTAVA
Honored Contributor

Re: View swaping activity

Hi


This is simple , your device swap is 8.0 gb out of which only 22% is used .


Manoj Srivastava