linux ram usage by process code example
Example 1: what process consuming RAM
ps -o pid,user,%mem,command ax | sort -b -k3 -r
Example 2: Ram usage in linux
$ cat /proc/meminfo
ps -o pid,user,%mem,command ax | sort -b -k3 -r
$ cat /proc/meminfo