Here is my htop output:
For example, I'm confused by this ruby script:
How much physical memory is it using? 3+1+8+51+51
? 51
? 51+51
?
Here is my htop output:
For example, I'm confused by this ruby script:
How much physical memory is it using? 3+1+8+51+51
? 51
? 51+51
?
Hide user threads (shift + H) and close the process tree view (F5), then you can sort out the process of your interest by PID and read the RES column (sort by MEM% by pressing shift + M, or F3 to search in cmd line)
Memory is a hard thing, you cannot calculate used physical memory by just running ps/htop/top. Memory can be shared between processes.
I recommend you to check usage with this script:
Take a look at the Column RES and SHR.
RES - SHR = Total estimated memory usage by the process.