如何确定Linux中的可用物理内存 [英] how to determine the available physical memory in linux

查看:110
本文介绍了如何确定Linux中的可用物理内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图确定我的软件是否在linux suffers from memory leak上运行.我已经尝试过测量/proc/meminfo中的可用物理内存(见下文),但可以理解哪些字段代表了可用内存以及MemFree, Cached, Buffers, Active, Inactive之间的关系是什么.

I'm trying to figure if my software running on linux suffers from memory leak. I've tried to measure the available physical memory as found in /proc/meminfo (see below) but could understand which field(s) represents the available memory and what is the relation between MemFree, Cached, Buffers, Active, Inactive.

cat /proc/meminfo
MemTotal:       124128 kB
MemFree:         62872 kB
Buffers:             0 kB
Cached:          15624 kB
SwapCached:          0 kB
Active:          38724 kB
Inactive:        11148 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
AnonPages:       34272 kB
Mapped:          14640 kB
Slab:             5564 kB
SReclaimable:      424 kB
SUnreclaim:       5140 kB
PageTables:        504 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
WritebackTmp:        0 kB
CommitLimit:     62064 kB
Committed_AS:    57936 kB
VmallocTotal:   655360 kB
VmallocUsed:      1016 kB
VmallocChunk:   654328 kB 

推荐答案

这是检查内存使用情况的更简单的命令:

This is simpler command to check memory usage:

free

这篇关于如何确定Linux中的可用物理内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆