AIX memory usage by processes

Tags
aix, aix memory, memory, processes

 
Thread Tools Search this Thread
# 15  
Old 10-26-2018
-e ought to show every process. If it's not in "RSS", it might be in shared pages, which are notoriously hard to tally since they overlap with no particular owner between processes. Oracle in particular likes to use a lot of share, and manages its own memory internally.
# 16  
Old 10-26-2018
Try ps -e -o size -o args= | sort -k 1,1 which is a very, very rough estimate that likely includes a lot of overlap between processes.
# 17  
Old 10-28-2018
Quote:
Originally Posted by Corona688
Try ps -e -o size -o args= | sort -k 1,1 which is a very, very rough estimate that likely includes a lot of overlap between processes.
I get this...
ps -e -o size -o args= | sort -k 1,1
ps: 0509-048 Flag -o was used with invalid list.
Usage: ps [-AMNZaedfklm] [-n namelist] [-F Format] [-o specifier[=header],...]
[-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist] [ -T pid] [ -L pidlist ]
[-@ [wparname] ]
Usage: ps [aceglnsuvwxX] [t tty] [processnumber]


While i ran the command (Madeingermany proposed)
ps -e -o pid= -o rss= -o vsz= -o args= | sort -k2,2n

and while Server B confuses me, in Server A if you add the RSS(*4/1024) is almost the same as in nmon for processes and system!!
So, it seems the command to give as output the expected result, but not on Server B... Smilie

I Just ran the command on a third similar server and i had the expected results again!!! SmilieSmilie
# 18  
Old 10-28-2018
Quote:
Originally Posted by dim
I get this...
ps -e -o size -o args= | sort -k 1,1
ps: 0509-048 Flag -o was used with invalid list.
Usage: ps [-AMNZaedfklm] [-n namelist] [-F Format] [-o specifier[=header],...]
[-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist] [ -T pid] [ -L pidlist ]
[-@ [wparname] ]
Usage: ps [aceglnsuvwxX] [t tty] [processnumber]
First off: you could have looked it up by searching the forum, for example here, post #6, if you didn't want to read the man page where the various options to ps are also explained. No problem, i will write it down once again:

Code:
ps -Alo pid,vsz,args

"pid" gives the process number, "vsz" the virtual memory used by the process, "args" the commandline used to start the process. Add/rearrange columns for your needs. You will also find some other useful commands to gather information about memory usage in this thread. Especially the output of vmo -a would be interesting.

Your systems are both not swapping (although one uses a very small fraction of the swap) but you can anticipate beginning swap activity even before it happens: issue vmstat -vs and have a look at the number of "revolutions of the clock hand" (or similar - i can't access an AIX system right now). This is the number of times the free memory page scanner has already searched the whole memory for free pages. The faster this number grows the nearer the system gets to the point where actual swapping starts.

And a last tip: when issuing vmstat you should use the -w option always. You will get a neatly formatted table again this way.

I hope this helps.

bakunin
# 19  
Old 10-29-2018
Thanks Bacunin (a phrase I never expected to say :P),

To be honest, i am really tired with this issue.... that's why i didn't even search man page.
I have looked too many threads on this forum, and other forums as well.. but i just don't get it..

i used command you proposed, but this doesn't make any sense... neither ps -Alo, nor vmstat.
vmo -a gets almost the same output on both servers..

Could you please explain to me how you figured out that there is no memory problem?
If it is so, why on Server A the processes are on 35% and on Server B on 70% using 4% pgsp?
# 20  
Old 10-29-2018
Yes, shared memory is often not considered, because it can be used by many process - or it is counted several times.

A special type of shared memory is the SysV IPC (inter process communication), listed with
Code:
ipcs -p

E.g. for the "Shared Memory" the listed PIDs are for the "Creator" and the "Last attacher".

Even the normal fork/exec to create a new process produces shared memory.
Because initially they are identical, they are not actually copied but the new process reuses the memory. They are really copied when the new process modifies it. This is called COW (copy on write).

Last edited by MadeInGermany; 10-29-2018 at 05:48 AM..
# 21  
Old 10-29-2018
Quote:
Originally Posted by MadeInGermany
Yes, shared memory is often not considered, because it can be used by many process - or it is counted several times.

A special type of shared memory is the SysV IPC (inter process communication), listed with
Code:
ipcs -p

E.g. for the "Shared Memory" the listed PIDs are for the "Creator" and the "Last attacher".

Even the normal fork/exec to create a new process produces shared memory.
Because initially they are identical, they are not actually copied but the new process reuses the memory. They are really copied when the new process modifies it. This is called COW (copy on write).
Your last sentence is the explanation of why two identical servers have different usage of memory? To be honest i tried to read man page of ipcs. I can give you the output of those 2 servers... but i still cannot understand it.... Smilie

I am about to give it up.. Smilie

My next shot is to reboot the server which confuses me and check its reaction... Smilie

But i would like to have any "evidence" to approve the need of reboot!
Smilie

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Memory usage in AIX server System Admin 77 AIX 8 08-14-2013 12:00 PM
Script to check the memory usage in AIX System Admin 77 AIX 3 05-22-2013 04:04 PM
Identify All Processes memory and cpu usage. ckwan AIX 2 04-10-2013 06:05 PM
Regarding AIX Memory Utilization usage calculation maruthu AIX 9 03-14-2013 02:49 PM
AIX memory usage always high virusxx AIX 1 08-26-2011 08:14 AM
AIX: Finding processes attached to shared memory DreamWarrior UNIX for Advanced & Expert Users 7 05-07-2010 05:53 AM
AIX 5.3 Physical Memory usage navin7386 AIX 5 02-06-2010 11:37 AM
How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..? laknar AIX 3 07-16-2009 06:35 AM
how can I find cpu usage memory usage swap usage and logical volume usage alert0919 HP-UX 3 12-02-2008 02:38 PM
Memory usage on AIX aajmani AIX 1 09-19-2008 08:40 PM
estimating memory usage by database processes hariza AIX 2 09-18-2008 12:09 AM
High memory usage in AIX 5.1 jayakumarrt AIX 5 02-14-2008 07:17 PM
How to calculate Memory and CPU Usage on AIX asutoshch Shell Programming and Scripting 0 07-31-2007 09:28 AM
Memory Usage in AIX kollam68 AIX 3 10-21-2005 06:56 PM
Memory Usage in AIX kollam68 UNIX for Advanced & Expert Users 1 10-21-2005 08:12 AM