ps aux
ps aux --sort
按内存使用情况查找运行次数最多的进程
ps aux --sort -%cpu
按内存使用情况查找运行次数最多的进程
ps aux --sort -%mem
ps aux --sort -%mem | head -10
前 10 个内存消耗最大的进程
ps -eo pid,ppid,cmd,comm,%mem,%cpu --sort=-%mem | head -10
使用 top 命令按内存和 CPU 使用率查找排名靠前的进程
top -o %MEM
只想显示前 10 个内存消耗的进程
top -o %MEM | head -n 16
前 10 个 CPU 消耗量最高的进程
top -o %CPU | head -n 16