AIX - How to monitor memory usage

AIX - How to monitor memory usage

 
In AIX, ps command can be used to monitor status of processes. It will display information such as CPU usage, memory usage and etc of processes. To monitor memory usage of processes, RSS and %MEM column need to be refer to as they are the parameters related to memory. Below is a quick explanation on what RSS and %MEM referred to.

RSS - The amount of RAM used for the text and data segments per process. PID 15256 is using 2888k. This is the real memory being used by the process.

%MEM - The actual amount of the RSS / Total RAM. Processes using large percentages of memory should be examined further, although remember that database and HPC applications can use the entire memory block as normal and could be ignored. On a more general purpose system, any single process can use a lot of memory.


Question : How to monitor memory [%MEM] in AIX?
Answer : ps command can be used to report a snapshot of the current processes in AIX. Use option aux and sort based on the column to get the top usage based on the parameter you need. If you need to get %MEM then you will need to sort column 4.
Example :
[root@server ~]# while true;do echo `ps aux |head -1`;ps aux |sort -nrk 4| head -10;sleep 2;clear;done
Note : Above command will output top 10 processes with highest %MEM in an interval of 2 seconds. Press "Crtl C" to exit the while loop.


Question : How to show overview of memory usage in AIX?
Answer : svmon command with option "G" can be used to show overview of memory usage in AIX. To continuos output in specific interval, option "i" followed by interval and numintervals values are needed.
Example :
root@server # svmon -G
size inuse free pin virtual mmode
memory 131072 126083 4989 88483 201381 Ded
pg space 262144 76328

work pers clnt other
pin 81529 0 0 6954
in use 120504 0 5579

PageSize PoolSize inuse pgsp pin virtual
s 4 KB - 88371 65160 68899 142389
m 64 KB - 2357 698 1224 3687
Note : Above command will output overview of memory usage in interval of 3 seconds for 3 times. You need to calculate the memory size by multiplying memory size output with 4kb.


Question : How to monitor memory usage of a specific process in AIX?
Answer : svmon command with option "P" followed by PID can be used to specific which process to monitor.
Example :
[root@server ~]# svmon -P <PID>
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
ILMT Procedure - ILMT / TAD4D / SUA / BFI
Viewed 10782 times since Fri, Jul 5, 2019
AIX, Networking↑ Adding and deleting a static network route using the command line
Viewed 3302 times since Fri, Apr 19, 2019
To do a quick check on the number of path present (does not mean all are Enabled] using for loop
Viewed 4569 times since Fri, Jun 8, 2018
Secure Secure Shell
Viewed 11773 times since Fri, Aug 21, 2020
Recovery AIX system when hang on boot (554 code error).
Viewed 17673 times since Thu, Feb 21, 2019
Part 1, The basics of network troubleshooting
Viewed 6221 times since Tue, May 22, 2018
How to set Kernel Parameters in AIX ?
Viewed 15985 times since Tue, Jul 2, 2019
Writing a Custom PVID
Viewed 3425 times since Fri, Feb 1, 2019
AIX, Monitoring, Networking, Red Hat, Security, System Admin↑ Determining type of system remotely
Viewed 2876 times since Fri, Apr 19, 2019
This document discusses a new feature implemented for JFS2 filesystems to prevent simultaneous mounting.
Viewed 3312 times since Sat, Jun 1, 2019