ps

实时的显示各个进程的内存使用情况. Reported memory usage information includes %MEM (percent of physical memory used), VSZ (total amount of virtual memory used), and RSS (total amount of physical memory used). 你可以使用 “–sort”选项对进程进行排序,例如按RSS进行排序:

$ ps aux --sort -rss

/proc/meminfo 跟 free -h

一个快速查看内存使用情况的方法,它是对 /proc/meminfo 收集到的信息的一个概述

$ cat /proc/meminfo
$ free -h