ps -A --sort -rss -o comm,pmem | head -n 40  That command will show the 40 ram use of 40 process sorted.