linux查看内存使用90,Linux 查看内存使用情况

1、hp unix 查看内存使用情况

swapinfo -t

2、其它Linux可以用

$ free -m

total       used       free     shared    buffers     cached

Mem:          7976       6459       1517          0        865       2248

-/+ buffers/cache:       3344       4631

Swap:         1951          0       1951

The m option displays all data in MBs. The total os 7976 MB is the total amount of RAM installed on the system, that is 8GB. The used column shows the amount of RAM that has been used by linux, in this case around 6.4 GB. The output is pretty self explanatory. The catch over here is the cached and buffers column. The second line tells that 4.6 GB is free. This is the free memory in first line added with the buffers and cached amount of memory.

Linux has the habit of caching lots of things for faster performance, so that memory can be freed and used if needed.

The last line is the swap memory, which in this case is lying entirely free.

3、TOP

he top command is generally used to check memory and cpu usage per process. However it also reports total memory usage and can be used to monitor the total RAM usage. The header on output has the required information. Here is a sample output

top - 15:20:30 up  6:57,  5 users,  load average: 0.64, 0.44, 0.33

Tasks: 265 total,   1 running, 263 sleeping,   0 stopped,   1 zombie

%Cpu(s):  7.8 us,  2.4 sy,  0.0 ni, 88.9 id,  0.9 wa,  0.0 hi,  0.0 si,  0.0 st

KiB Mem:   8167848 total,  6642360 used,  1525488 free,  1026876 buffers

KiB Swap:  1998844 total,        0 used,  1998844 free,  2138148 cached

PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND

2986 enlighte  20   0  584m  42m  26m S  14.3  0.5   0:44.27 yakuake

1305 root      20   0  448m  68m  39m S   5.0  0.9   3:33.98 Xorg

7701 enlighte  20   0  424m  17m  10m S   4.0  0.2   0:00.12 kio_thumbnail

Check the KiB Mem and KiB Swap lines on the header. They indicate total, used and free amounts of the memory. The buffer and cache information is present here too, like the free command.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值