linux 内存管理相关命令,linux内存管理命令

linux内存管理命令

vmstat -s

与free -m 是比较好的观测内存的命令

www.2cto.com

刚进入运行的系统

-bash-3.2$ vmstat -s

30897940  total memory

184408  used memory

78848  active memory

67432  inactive memory

30713532  free memory

6356  buffer memory

105176  swap cache

4192956  total swap

0  used swap

4192956  free swap

369 non-nice user cpu ticks

0 nice user cpu ticks

537 system cpu ticks

120270 idle cpu ticks

1523 IO-wait cpu ticks

4 IRQ cpu ticks

50 softirq cpu ticks

0 stolen cpu ticks

112896 pages paged in

9724 pages paged out

0 pages swapped in

0 pages swapped out

160886 interrupts

71964 CPU context switches

1350373112 boot time

2821 forks

[root@localhost ~]# free -m

total       used       free     shared    buffers     cached

Mem:         30173        179      29994          0          6        102

-/+ buffers/cache:         70      30103

Swap:         4094          0       4094

==========

www.2cto.com

运行很长时间,内存cach了很多

[root@localhost ssh]# vmstat -a 2

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------

r  b   swpd   free  inact active   si   so    bi    bo   in   cs us sy id wa st

0  0      0 23590020 5347780 1614948    0    0     0     1    1    0  0  0 100  0  0

0  0      0 23590020 5347772 1615016    0    0     0     4 1006  306  0  0 100  0  0

0  0      0 23590020 5347772 1615012    0    0     0     0 1002  301  0  0 100  0  0

0  0      0 23589880 5347772 1615012    0    0     0    24 1017  384  0  0 100  0  0

www.2cto.com

root@localhost ssh]# vmstat -s

30897940  total memory

7302736  used memory

1610636  active memory

5346844  inactive memory

23595204  free memory

274844  buffer memory

6102092  swap cache

4192956  total swap

0  used swap

4192956  free swap

558515 non-nice user cpu ticks

1193 nice user cpu ticks

585088 system cpu ticks

2967723549 idle cpu ticks

210472 IO-wait cpu ticks

4406 IRQ cpu ticks

301885 softirq cpu ticks

0 stolen cpu ticks

543204 pages paged in

41063536 pages paged out

0 pages swapped in

0 pages swapped out

3722943494 interrupts

393601166 CPU context switches

1346660283 boot time

8934193 forks

www.2cto.com

[root@localhost ssh]# vmstat

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------

r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st

0  0      0 23595204 274848 6102060    0    0     0     1    1    0  0  0 100  0  0

[root@localhost ssh]# free -m

total       used       free     shared    buffers     cached

Mem:         30173       7131      23042          0        268       5958

-/+ buffers/cache:        904      29269

Swap:         4094          0       4094

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值