Operating System - HP-UX
1752339 Members
5427 Online
108787 Solutions
New Discussion юеВ

Re: Which process use what amount of memory

 
Jonathan Caplette_1
Super Advisor

Which process use what amount of memory

I guys,

I would like to know how I can know what process use how much of the memory... I got a machine that is very slow... and when I do a "top", the CPU are idle at about 98%, the memory (free) is now at 9MB on a total of 4GB... Here is the output of top:

Load averages: 1.88, 1.90, 1.89
285 processes: 280 sleeping, 4 running, 1 zombie
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 1.90 0.0% 0.0% 1.6% 98.4% 0.0% 0.0% 0.0% 0.0%
1 1.89 0.2% 0.0% 0.4% 99.4% 0.0% 0.0% 0.0% 0.0%
2 1.64 0.0% 0.0% 0.8% 99.2% 0.0% 0.0% 0.0% 0.0%
3 2.09 0.0% 0.0% 0.4% 99.6% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 1.88 -0.0% -0.0% -0.0% 100.0% -0.0% -0.0% -0.0% -0.0%

Memory: 4121204K (1312456K) real, 1634952K (350368K) virtual, 9212K free Page# 1/12
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Which process use what amount of memory

Glance is not free but it has a 60 day trail available. This tool can do the job.

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.70/
This tool can also get you that information.

Attaching a background perf data collector as well.

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
Bryan D. Quinn
Respected Contributor

Re: Which process use what amount of memory

Hello,

Try :

UNIX95= ps -e -o ruser,vsz,pid,args | sort -rnk2 | more


-Bryan
Bryan D. Quinn
Respected Contributor

Re: Which process use what amount of memory

Add on note to my previous post. There is a space behind the equals sign in the command I posted.

-Bryan
Henry He
Occasional Contributor

Re: Which process use what amount of memory

Check zombie from list.
Geoff Wild
Honored Contributor

Re: Which process use what amount of memory

Here's one I use:

#!/bin/sh
# memtop - show top memory users and pid
# VSZ is in KB
echo "VSZ(KB) PID RUSER COMMAND"
UNIX95= ps -e -o 'vsz pid ruser args' |sort -nr|head -30



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.