Linux 如何查看某个进程占用内存情况

时间:2024-02-24 08:45:02

1、ps -ef | grep "进程名" 获取pid;然后 top -p pid 可查看内存。 【主要看RSS为程序实际使用内存】

2、ps aux |grep "进程名", 可显示进程专用内存

3、cat /proc/pid/status   【看VmRSS】

4、pmap -x pid

5、 ps -e -o \'pid,comm,args,pcpu,rsz,vsz,stime,user,uid\'  |grep "进程名"

注:

(RSS is the "resident set size" meaning physical memory used)