Re: swap (paging )space in HP Unix..... (3355 Views)
Reply
Occasional Visitor
ravikiransrv
Posts: 3
Registered: ‎03-29-2011
Message 1 of 9 (3,355 Views)

swap (paging )space in HP Unix.....

Dear All,

How to analyze the swap space (Paging space)…in particular how to identify
Which processes (PID’s)are consuming more paging space.

My hp flavor .
HP-UX s96spmq0 B.11.31 U ia64 2201497067 unlimited-user license
But swapinfo –atm is not giving any output

A55spmq01:axgadm 8> swapinfo -atm
swapinfo: Command not found.

Please advise on the above

I tried "Glance " Also

Thanks in advance
Please use plain text.
Esteemed Contributor
Ismail Azad
Posts: 487
Registered: ‎11-09-2010
Message 2 of 9 (3,355 Views)

Re: swap (paging )space in HP Unix.....

Hi,

How about vmstat?

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
Please use plain text.
Honored Contributor
Wim Rombauts
Posts: 886
Registered: ‎08-20-1997
Message 3 of 9 (3,355 Views)

Re: swap (paging )space in HP Unix.....

Try /usr/sbin/swapinfo.

swapinfo is normally a command to be run as root, so it is (probably) not in your default search path.
Please use plain text.
Occasional Visitor
ravikiransrv
Posts: 3
Registered: ‎03-29-2011
Message 4 of 9 (3,355 Views)

Re: swap (paging )space in HP Unix.....

Thanks Wim and Ismail....:)
both are informative


Regards
Please use plain text.
Honored Contributor
Bill Hassell
Posts: 14,205
Registered: ‎05-29-2000
Message 5 of 9 (3,355 Views)

Re: swap (paging )space in HP Unix.....

> I tried "Glance " Also

Does that mean that you ran glance and could not understand the display, or that glance is not installed on your system?

If you want to identify the processes that have been deactivated and paged to the swap area, use this command:

UNIX95=1 ps -e -o flags,pid,args

The first number has a number of bits (see man ps) but if the number is odd, the process is in memory. If it is even, the process is in swap space.
Please use plain text.
Occasional Visitor
ravikiransrv
Posts: 3
Registered: ‎03-29-2011
Message 6 of 9 (3,355 Views)

Re: swap (paging )space in HP Unix.....

Hello Hassel,

Thanks for the concern..

I tried

UNIX95=1 ps -e -o flags,pid,args

axgadm 8>UNIX95=1 ps -e -o flags,pid,args
UNIX95=1: Command not found.

System says command not found..

My Hp unix version is

HP-UX B.11.31 U ia64 2201497067 unlimited-user license

Whether this command requires the Root access >

or is there a way, to find...

The Processes that have been deactivated and paged to the swap area, on the above OS..

Regards



Please use plain text.
Regular Advisor
blackwater
Posts: 129
Registered: ‎05-14-2009
Message 7 of 9 (3,355 Views)

Re: swap (paging )space in HP Unix.....

ravikiransrv,

If you are satisfied with wmstat or glance, that is OK. If not you might find the following idea useful. By the way, HP-UX experts may find that this idea is wrong.

Anyway, once I found on this forum a program that collects information about memory consumption on HP-UX of a process or a few processes and prints it. Google gives me this link: http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBQQFjAA&url=http%3A%2F%2Fforums11.itrc.hp.com%2... Again, this program is not mine. The source of this program was posted by someone, you must be able to find it easily on this forum. So it is just necessary to compile it.

Basically it prints information about memory consumption of a process. You need too look in the end of the output at the line: "Mb in Use: Virt: 1981 Phys: 1638 Swap: 1836" (by the way mem_statistics.11.31 is just a name of the executable on mine HP-UX 11.31 server).

srv2-rx8 B.11.31 ia64 bash-4.0$ ./mem_statistics.11.31 -v -p 24934

VIRT/PHYS/LOCKED/SWAP summaries in pages.
System page size is 4096 or 0x1000 bytes.
Total physical memory is 4c8f3a pages (19599 Mb).
Maximum allocatable User memory is 43ab52 pages (17323 Mb).
PID 24934: GID:24934
UNUSED TYPE consumes 0 VIRT,0 PHYS, 0 LOCKED and 0 SWAP.
UAREA consumes 1296 VIRT,1152 PHYS, 0 LOCKED and 1296 SWAP.
TEXT consumes 13 VIRT,12 PHYS, 0 LOCKED and 0 SWAP.
DATA/HEAP consumes 431104 VIRT,403928 PHYS, 0 LOCKED and 431104 SWAP.
MAIN STACK consumes 256 VIRT,2 PHYS, 0 LOCKED and 32 SWAP.
SYSV SHMEM consumes 0 VIRT,0 PHYS, 0 LOCKED and 0 SWAP.
NULL DEREF consumes 1 VIRT,1 PHYS, 0 LOCKED and 1 SWAP.
MEM MAPPED I/O consumes 0 VIRT,0 PHYS, 0 LOCKED and 0 SWAP.
MMAP consumes 72572 VIRT,14271 PHYS, 0 LOCKED and 37819 SWAP.
GRAPHICS SPECIFIC consumes 0 VIRT,0 PHYS, 0 LOCKED and 0 SWAP.
GRAPHICS SPECIFIC consumes 0 VIRT,0 PHYS, 0 LOCKED and 0 SWAP.
RSE STACK consumes 2048 VIRT,0 PHYS, 0 LOCKED and 3 SWAP.
PID: 24934 (0.08%) SYS sec:758 USER sec:2166
Mb in Use:
Virt: 1981 Phys: 1638 Swap: 1836

If you run this command without -p you will get information about all processes. So if you sort all the processes by the value in "Swap: " (which in Mbs) you will see that processes consume more paging space.

I posted the source of the program in case you don't find it.

Please use plain text.
Frequent Advisor
Kannandgl_1
Posts: 91
Registered: ‎02-17-2008
Message 8 of 9 (3,355 Views)

Re: swap (paging )space in HP Unix.....

Dear Ravi,

Swap space is an area on a high-speed storage device (almost always a disk drive), reserved for use by the virtual memory system for deactivation and paging processes.

Here Swap space THREE types:
Physical Swap Space
==================
There are two kinds of physical swap space: device swap and file-system swap.

Device Swap Space:
Device swap space resides in its own reserved area (an entire disk or logical volume of an LVM disk) and is faster than file-system swap because the system can write an entire request (256 KB) to a device at once.

File-System Swap Space:
File-system swap space is located on a mounted file system and can vary in size with the system's swapping activity. However, its throughput is slower than device swap, because free file-system blocks may not always be contiguous; therefore, separate read/write requests must be made for each file-system block.

Note : use this command
#swapinfo -tam

SAM is one method for adding and configuring swap space. Swap configuration is under the Disks and File System area of SAM. For more information on configuring swap, please see the on-line Help section within SAM's Swap Configuration. If you wish to use the swapon command, review the man page, swapon(2).
Regards
Rajamani.
Please use plain text.
Honored Contributor
Bill Hassell
Posts: 14,205
Registered: ‎05-29-2000
Message 9 of 9 (3,355 Views)

Re: swap (paging )space in HP Unix.....

> UNIX95=1 ps -e -o flags,pid,args
> UNIX95=1: Command not found.

You are running csh (or tcsh or some other non-standard shell). If you are a system administrator for this system, change your shell to ksh or POSIX:

8> chsh myusername /usr/bin/sh

The vast majority of system administrators use a POSIX shell like ksh because of it's predictability and portability. If changing your shell is not an option, you can do this:

8> setenv UNIX95=1
8> ps -e -o flags,pid,args

Make sure you unset the variable after you use it with ps:

8> unsetenv UNIX95
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation