Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I wanted to know what mathematical connection is there between the SZ, RSZ and VSZ output in ps output e.g.

ps -p 2363 -o sz,rss,vsz
share|improve this question
    
and the output is?.. –  sendmoreinfo Feb 24 '12 at 21:52
add comment

1 Answer

up vote 5 down vote accepted

sz and vsz represent the same thing, but sz is in page units, while vsz is in 1024 byte units.

To get your system's page size, you can use:

$ getconf PAGE_SIZE
4096

rss is the subset of the process's memory that is currently loaded in RAM (in kilobytes). This is necessarily smaller than vsz.

So the "mathematical" connections are:

vsz * 1024 = sz * page_size
rss <= vsz
share|improve this answer
    
Thanks for the great answer. Any idea how %mem is related to rss and sz/vsz? –  abc Mar 1 '12 at 0:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.