AIX memory usage by processes


Login or Register to Reply

 
Thread Tools Search this Thread
# 15  
-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.
# 17  
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  
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  
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  
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 04:48 AM..
# 21  
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
Login or Register to Reply

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

More UNIX and Linux Forum Topics You Might Find Helpful
Identify All Processes memory and cpu usage.
ckwan
Hi All, Anyone has script to monitor AIX total processes memory and cpu usage that contribute to the total memory and CPU utilize so far ? The purpose of this is to analyze process memory trend. Thanks. Best Regards, ckwan... AIX
2
AIX
How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?
laknar
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage?... AIX
3
AIX
Memory usage on AIX
aajmani
How to check the memory usage on AIX by various processes?... AIX
1
AIX
estimating memory usage by database processes
hariza
Hi Guys, I wonder what would be the best way to determine how much memory is in use on any given time by the database processes. I thought about using ipcs -m command but I wonder if there any better way to determine this. Thanks. Harby.... AIX
2
AIX
Memory Usage in AIX
kollam68
Hi All, I have a question, can you guys please help me by giving your valuable suggestons: I am using AIX 5L, running oracle 7 version. I need to increase the oracle memory to 40 MB more. Currently Oracle occupies 260M. I wanted to know whether I can increase the memory without any problem....... UNIX for Advanced & Expert Users
1
UNIX for Advanced & Expert Users