How much memory is a specific user using
You can use ps
together with awk
to find the physical memory usage by a user:
ps -U root --no-headers -o rss | awk '{ sum+=$1} END {print int(sum/1024) "MB"}'
Here it prints memory used by root
to the output.