You must be aware of several commands like free which are used to check the RAM usage on a linux system. Have you ever wondered how the RAM utilization for a particular user or application can be checked.





If we need to see real RAM utilisation, there is command smem(Show MEMory) to check actual RAM utilised by user or any application.

Obtaining smem:





On debian based machines:

#apt-get install smem





On rpm based machines:

#yum install smem





Usage of command:





#smem -u username





Example:

smem -u evaipar





User Count Swap USS PSS RSS

evaipar 60 0 703132 730122 1051560





Note : The values are in KB So real RAM utilised by user evaipar is 730MB, PSS value ( proportional set size)





Even you can add USS, PSS, RSS which will give us total Memory used by user here its 12.95G. You must be wondering where this 12.95G is coming from? This is because large portions of RAM are shared between different applications using same libraries which result in RSS(resident set size).



