Memory usage

Hi all,

I'd like to write a script to watch the memory usage under an user.

But what's different between VSZ et RSS when you use ps command ?

RSS is a resident size. Memory usage for a process at this time ?
VSZ is a virtual size. Memory usage for a process + shared lib + swap used ?

Thanks a lot
 
Hi all,

I read the post but i have a question.
When i count the number of process Apache and the sum of their resident memory, this value don't match with memory usage display by the command 'top'.

Code:
Apache : 19 process x 5296 rss = 100624 Ko resident memory ~ 100 Mo

Code:
$ top
[...]
Mem: 19M Active, 3440K Inact, 46M Wired, 28K Cache, 387M Free
Swap:
[...]

The system have juste 19 Mo of active memory.

Thank
 
The Apache processes all share that memory, so don't multiply the values.
 
Back
Top