HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Memory and swap utilisation = 98%,

 
arun khatwani
Frequent Advisor

Memory and swap utilisation = 98%,

Glance C.04.73.100 21:09:02 ia64 Current Avg High
-----------------------------------------------------------------------------------------------------------------------------
CPU Util S SNA | 8% 8% 8%
Disk Util F FV V | 8% 8% 8%
Mem Util S SU UB B | 98% 98% 98%
Swap Util U UR R | 97% 97% 97%

Mem n swap utilisation are 97% continously,

So how can i check which process r causing mem n swap utilisation full..
9 REPLIES
Patrick Wallek
Honored Contributor

Re: Memory and swap utilisation = 98%,

Please post the output of 'swapinfo -tam' so we can see if you are really using swap.
arun khatwani
Frequent Advisor

Re: Memory and swap utilisation = 98%,

swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 10240 2219 8021 22% 0 - 1 /dev/vg00/lvol2
dev 10240 2211 8029 22% 0 - 1 /dev/vg00/lvol3
reserve - 16050 -16050
memory 32736 31030 1706 95%
total 53216 51510 1706 97% - 0 -
[nlxsl236:/]#
mvpel
Trusted Contributor

Re: Memory and swap utilisation = 98%,

When you run "ps -le" the SZ column will show you the size of that process in pages, which are usually some multiple of 4k.

This command:

ps -le | perl -ne 's/^\s+//; print (join("\t", (split(/\s+/, $_, 14))[2,3,9,13]))' | sort -rnk 3

...will give you a list of all the processes sorted from the largest to the smallest number of pages, showing the UID, PID, size, and process name. Here's the top five on one of my workstations:

0 1609 809 cimserver
1 3049 752 Xhp
0 1596 595 dced
0 2339 548 swagentd
0 1083 539 automountd
Tingli
Esteemed Contributor

Re: Memory and swap utilisation = 98%,

Anyway, it seems need more memory...
arun khatwani
Frequent Advisor

Re: Memory and swap utilisation = 98%,

and the size is in kb or mb
mvpel
Trusted Contributor

Re: Memory and swap utilisation = 98%,

The SZ column shows pages, which in HP-UX are 4k. So the top process in my list is 809 pages, or 3,236k or 3.2 megabytes.
Bill Hassell
Honored Contributor

Re: Memory and swap utilisation = 98%,

A bit simpler method to sort processes by memory usage is:

UNIX95=1 ps -e -o vsz,pid,args | sort -rn | head -20

The first column is in Kbytes (rather than cumbersome 4k pages).


Bill Hassell, sysadmin
mvpel
Trusted Contributor

Re: Memory and swap utilisation = 98%,

I learned ps before it had the -o option, and my copy of "Learning Perl" has instructions for downloading the exercises via BITNET, UUCP, and Gopher, so I guess all I can say in my defense is that old habits die hard. *chuckle*
Bill Hassell
Honored Contributor

Re: Memory and swap utilisation = 98%,

Yep, the new options to ps are really nifty but a bit cumbersome. -o -H -C are extremely useful but require the UNIX95 variable to be set. After writing a number of specialized scripts, I learned to use the man page as a toolbox. Even the standard options like -u and -p are hardly used even though they provide exact matches. grep and ps do not work together very reliably -- that's where grep is replaced by ps built-ins.

And of course, ps has variants in other Unix flavors. That's the best feature for standards -- there are so many to choose from.


Bill Hassell, sysadmin