你好,游客 登录 注册 搜索
背景:
阅读新闻

Fedora下关于top和System Monitor的一点疑惑

[日期:2010-12-26] 来源:Linux社区  作者:elvalad [字体:大 中 小]

在我刚刚接触Linux时就知道了top这个命令,后来又发现了图形界面下类似Windows任务管理器的System Monitor,但我发现二者在内存的统计方面有很大的不同,SEE:

Fedora下关于top和System Monitor的一点疑惑‍

注意Mem处的used,再看System Monitor

Fedora下关于top和System Monitor的一点疑惑‍

仔细观察会发现,top的Mem used和System Monitor的差别很大,后来才知道,System Monitor的Mem是==used-cached,计算下确实如此,再回过头来看看man top,同时水木上一位大哥给我介绍说:

The memory meter in htop says a low number, such as 9%, when top shows 
something like 90%! (Or: the MEM% number is low, but the bar looks almost full. 
What's going on?) 

The number showed by the memory meter is the total memory used by processes. 
The additional available memory is used by the Linux kernel for buffering and 
disk cache, so in total almost the entire memory is in use by the kernel. I 
believe the number displayed by htop is a more meaningful metric of resources 
used
-----
htop的作者的解释

看完顿时受益良多,二者其实都正确,只不过是对于内存的使用方式理解不同罢了。

linux
相关资讯       Fedora教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款