查看进程内存使用情况


bash# top  -M -b -n1 -p<pid>

bash# ps -e -o pid,comm,args,rsz --sort=+rsz|grep -v grep

下面解释命令输出

其它第一列为pid,进程号;最后一列rsz 内存使用量。以B为单位,1125084B为1.1GB

下面使用top查看进程内存占用:

其中res列为内存占用,与ps列出的一致。

猜你喜欢

转载自www.cnblogs.com/hyang0/p/linuxMemUsage.html