It's my htop output:
For example, I'm confused by this ruby script:
How many physical memory is it using?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
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: