How can I determine how much memory a process is using in AIX?
Solution 1
svmon
is the most comprehensive tool for doing this on AIX.
svmon -P <pid>
will get you the full and glorious output. Obviously man svmon
helps with interpreting that (just remember, by default, nearly all of the numbers are page counts, which are usually 4KB in size).
You can also get a very nice summary with memory shown in MB using,
svmon -P -O summary=basic,unit=MB
Solution 2
You can see memory usage with:
ps v PID
where PID is the process ID you are checking.
You can find info about the variables displayed here: http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/mem_usage_determine_ps.htm
You will be more interested in SIZE (Virtual size in paging space in kilobytes of the data section of the process) and RSS (Real-memory size in kilobytes of the process)
Solution 3
Have you tried topas? It's pretty good for that sort of thing.
You can also try nmon but it's third party, so you'll have to download and compile it.
Related videos on Youtube
C. Ross
I'm support .NET, SQL Server 2000, SQL Server 2005, Windows Server 2003, and AIX systems professionally. In my free time I play with php and java on linux. But yes, I'm primarily a developer. If I get called at night because the server is down does that make me a sysadmin too?
Updated on September 17, 2022Comments
-
C. Ross almost 2 years
How can I determine how much memory a process is using in AIX?
-
C. Ross over 14 yearsDo I type literally "command,size"?
-
Dennis Williamson over 14 yearsYes, those are the field names for the output option:
-o
-
Andrew Brennan over 7 yearsThis doesnt work for me, I get the error: ps: 0509-048 Flag -o was used with invalid list.
-
Dennis Williamson over 7 years@AndrewBrennan: try
ps -p PID -o comm,rss
-
ivicaa about 6 years+1 for "just remember, by default, nearly all of the numbers are page counts, which are usually 4KB in size"
-
Bhaskar Jyoti Dutta over 5 yearsinclude the options filtertype=working,segment=off and you will see the real memory usage.