Operating System - HP-UX
1753946 Members
7390 Online
108811 Solutions
New Discussion юеВ

explaination swapinfo output v./ memory usage

 
SOLVED
Go to solution
Frank de Vries
Respected Contributor

explaination swapinfo output v./ memory usage

I am in two minds about swapinfo

[orasrv4:/root]# swapinfo -a
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2097152 321452 1775700 15% 0 - 1 /dev/vg00/lvol2
reserve - 1216928 -1216928
memory 1548472 1079464 469008 70%
[orasrv4:/root]#

There is dev , reserve and memory.
Am I right in assuming that memory is our system memory , or is it somethiingh else.
If not how do I check what my physical memory realy is and how much of it is used.

Then the PCT used how do I interprete that ?
for both dev and memory.


Look before you leap
5 REPLIES 5
Ramesh S
Esteemed Contributor

Re: explaination swapinfo output v./ memory usage

Hi

Please go thru the following:

Swapinfo Description

Use 'swapinfo -tm' to get a complete/total picutre of swap usage (see below for example and details.)├В  Pay particular attention to the total line as it indicates how much swap space has been actually reseved for swap. When this percentage gets near 100%, rocesses will not start up (unable to fork process) and new shared memory segments can not be created.
swapinfo -tm├В  example and explanation:

├В ├В ├В ├В ├В ├В ├В  Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4093 0% 0 - 1 /dev/vgroot/swap
reserve - 1344 -1344
total 4096 1344 2749 33% - 0 -

dev line(s):

are the actual physical swap device(s)
show if swapping has actually occurred. In other words, the├В  PCT USED column in the dev lines represents the value last attained during a previous period of swapping. This is analogous to the high-water mark that a flood leaves.
to check to see if swapping is currently occuring, use 'vmstat -v 5 5' to see if the 'po' (page outs) is sustained above 0.

reserve line(s)

indicate how much of the swap device(s) has(have) been set aside for memory should it need to be swapped.

memory line:

indicative of how much of pseudo-swap has been reserved
when present, indicates├В  pseudo-swap is enabled ├В  (i.e.├В  swapmem_on kernel paraemter is set to 1, which├В  is the default.) The size of pseudoswap is calculated to be 75% of the size of RAM (a.k.a. memory.)├В  In other words, it does not refer to acual physical memory use!!!!├В  Pseudo-swap was designed specifically for large memory systems for which acutal swapping is never (or rarely) expected to occur, so there├в s less need to use actual physical disk space for swap. For more information, see├В swapmem_on(5) , which reads:

In previous versions of HP-UX, system configuration required sufficient physical swap space for the maximum possible
number of processes on the system. This is because HP-UX reserves swap space for a process when it is created, to
ensure that a running process never needs to be killed due to insufficient swap.
This was difficult, however, for systems needing gigabytes of swap space with gigabytes of physical memory, and those
with workloads where the entire load would always be in core. This tunable was created to allow system swap space to
├В be less than core├В  memory. To accomplish this, a portion of physical memory is set aside as 'pseudo-swap' space.
├В While actual swap space is still available, processes still reserve all the swap they will need at fork or execute time from
the physical device or file system swap. Once this swap is completely used, new processes do not reserve swap, and
├В each page which would have been swapped to the physical device or file system is instead locked in memory and
├В counted as part of the pseudo-swap space.
total line:
├В the PCT USED value shown in the total line indicates how much swap space has been actually reseved for swap. When this percentage gets near 100%, processes will not start up (unable to fork process) and new shared memory segments can not be created.

Thanks & Regards

Ramesh
F Verschuren
Esteemed Contributor

Re: explaination swapinfo output v./ memory usage

the memory is NOT the memory of your system:
pmem is a way to see howmatch mem you eraly are haging.

-[root:/]# swapinfo -a
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1048576 116612 931964 11% 0 - 1 /dev/vg00/lvol2
reserve - 146268 -146268
memory 171428 92168 79260 54%

[root:/]# pmem
256 MB

you can alsow use the dmesg, after a reboot it will show someting like:
Memory Information:
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 262144 Kbytes, lockable: 165892 Kbytes, available: 200104 Kbytes

but because the info is limmeted in size it can be that it is overwritten
Frank de Vries
Respected Contributor

Re: explaination swapinfo output v./ memory usage

Sorry, I get this

[orasrv4:/root]# pmem
sh: pmem: not found.
[orasrv4:/root]#

And our dmesg is allready full with crap messages from filesystem full etc ..
So that info is gone.

How can I get dmesg to reset or callback the original boot info that shows the memory ??
Look before you leap
Ramesh S
Esteemed Contributor
Solution

Re: explaination swapinfo output v./ memory usage

Hi

Run the following to know the Physical memory ( If PA-RISC )

echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm | grep 'Total Configured'


Thanks & Regards

Ramesh
Eric SAUBIGNAC
Honored Contributor

Re: explaination swapinfo output v./ memory usage

Bonjour Frank,

And to know physical memory (and cpu) under Itanium :

--> machinfo

You said :

Maybe you have configured root crontab with :

05,15,25,35,45,55 * * * * /usr/sbin/dmesg - >>/var/adm/messages

If so you will keep in /var/adm/messages all dmesg messages, from the boot of the system, even if you have many "crap messages".

Regards

ERic