- 系统环境
[root@ceshiji ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core) - 查看内存常用方法
(1)[root@ceshiji ~]# top
说明:top 按内存列排序,使用>可以移动到以内存排序 x高亮 z 加颜色。
(2)[root@ceshiji ~]# top -o %MEM
说明:当然也可以使用top -o %CPU对cpu使用进行排序。
(3)htop 可以使用鼠标点击按内存列排序
说明:需要yum安装(epel源)
(4)[root@ceshiji ~]# ps -eo "%C : %p : %z : %a" --sort -vsz
(5)[root@ceshiji ~]# ps aux | sort -k4nr | head -3
说明:使用ps -ef | sort -k4nr | head -3也是可以的,ps aux是unix风格的参数格式ps -ef是 通用风格的。
Linux内存异常:活跃进程使用的内存远远低于实际使用的内存
最新推荐文章于 2022-08-20 11:59:03 发布