cancel
Showing results for 
Search instead for 
Did you mean: 

Swap Issue

Vivek Bhatia
Trusted Contributor

Swap Issue

How to find that how much space of swap is utilized by the Process?
5 REPLIES
Jaime Bolanos Rojas.
Honored Contributor

Re: Swap Issue

Vivekbhatia,

Usually unless the system is paging out, the swap is reserved instead of used, I do not know of any way to check for the amount of swap reserved for a specific pid, but it should be equal to the amount of memory been used by that PID.

Given that we can check for the amount of plain memory, shared memory a PID is using, you might want to refer to this manual to find more information on this topic:

ftp://eh:spear9@hprc.external.hp.com/memory.htm

Regards,

Jaime.
Work hard when the need comes out.
Robert-Jan Goossens_1
Honored Contributor

Re: Swap Issue

Don Morris_1
Honored Contributor

Re: Swap Issue

vsz as reported in top, ps, etc. (and from the script given in prior replies) will be a good first estimate since the default is that swap must be reserved for all virtual memory.

If you're worried about Lazy swap allocations or really want to drill down into the process sub-objects, you'll need to use pstat directly.

Sample program attached -- "cc +DD32 -D_PSTAT64 object_dump.c -o object_dump" to compile, object_dump -p will give you the basic totals. Add "-v" options to taste.
Steven E. Protter
Exalted Contributor

Re: Swap Issue

Shalom,

http://www.hpux.ws/?p=8

That memory leak detector happens to display memory used by a process including swap reservation.

When processes actually start getting swapped regularly, its time to consider more memory because when paging happens its very bad for overall system performance.

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
Vivek Bhatia
Trusted Contributor

Re: Swap Issue

Thank you