免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 9430 | 回复: 10
打印 上一主题 下一主题

[FreeBSD] freebsd top详解 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-01 15:32 |只看该作者 |倒序浏览
$man top
...
DESCRIPTION OF MEMORY
       Mem:  9220K  Active, 1032K Inact, 3284K Wired, 1MB Cache, 2M Buf, 1320K
       Free Swap:   91M Total, 79M Free, 13% Inuse, 80K In, 104 K Out

       K: Kilobyte

       M:     Megabyte

       %:     1/100

       Active:
              number of pages active

       Inact: number of pages inactive

       Wired: number of pages wired down, including cached file data pages

       Cache: number of pages used for VM-level disk caching

       Buf:   number of pages used for BIO-level disk caching

       Free:  number of pages free

       Total: total available swap usage

       Free:  total free swap usage

       Inuse: swap usage

       In:    pages paged in from swap devices (last interval)

       Out:   pages paged out to swap devices (last interval)

上文为我在freebsd下运行man top之后的一部分,我想请教大家的是
     Wired: number of pages wired down, including cached file data pages
       Cache: number of pages used for VM-level disk caching
       Buf:   number of pages used for BIO-level disk caching
这三者是什么意思呢?

哎,从linux过来,感觉不是很习惯freebsd啊!郁闷。

论坛徽章:
0
2 [报告]
发表于 2008-12-01 15:35 |只看该作者
慢慢就习惯了!我已经开始不习惯linux了

论坛徽章:
0
3 [报告]
发表于 2008-12-01 15:43 |只看该作者

回复 #2 smilecat 的帖子

解释一下啊,兄台~
Wired: number of pages wired down, including cached file data pages
Cache: number of pages used for VM-level disk caching
Buf:   number of pages used for BIO-level disk caching

论坛徽章:
0
4 [报告]
发表于 2008-12-01 15:52 |只看该作者

回复 #3 andrefun 的帖子

这个不用翻译吧?
多看几次你会习惯的。

论坛徽章:
0
5 [报告]
发表于 2008-12-01 17:17 |只看该作者
Wired: Wired pages are locked in memory and cannot be paged out. Typically, these pages are being used by the kernel or the physical-memory pager, or they have been locked down with mlock. In addition, all the pages being used to hold the user structure and thread stacks of loaded (i.e., not swapped-out) processes are also wired. Wired pages cannot be paged out.

Active: Active pages are being used by one or more regions of virtual memory. Although the kernel can page them out, doing so is likely to cause an active process to fault them back again.

Inactive: Inactive pages have contents that are still known, but they are not usually part of any active region. If the contents of the page are dirty, the contents must be written to backing store before the page can be reused. Once the page has been cleaned, it is moved to the cache list. If the system becomes short of memory, the pageout daemon may try to move active pages to the inactive list in the hopes of finding pages that are not really in use. The selection criteria that are used by the pageout daemon to select pages to move from the active list to the inactive list are described later in this section. When the free-memory and cache lists drop too low, the pageout daemon traverses the inactive list to create more cache and free pages.

Cache: Cache pages have contents that are still known, but they are not usually part of any active region. If they are mapped into an active region, they must be marked read-only so that any write attempt will cause them to be moved off the cache list. They are similar to inactive pages except that they are not dirty, either because they are unmodified, since they were paged in, or because they have been written to their backing store. They can be moved to the free list when needed.

Free: Free pages have no useful contents and will be used to fulfill new page-fault requests. The idle process attempts to keep about 75 percent of the pages on the free list zeroed so that they do not have to be zeroed while servicing an anonymous-region page fault. Pages with unknown contents are placed at the front of the free list. Zeroed pages are placed at the end of the free list. The idle process takes pages from the front of the free list, zeros them, marks them as having been zeroed, and puts them on the end of the free list. Page faults that will be filling a page take one from the front of the free list. Page faults that need a zero-filled page take one from the end of the free list. If marked as zeroed, it does not have to be zeroed during the fault service.


这是我找到的,嘿嘿,有点儿明白了。

论坛徽章:
0
6 [报告]
发表于 2008-12-01 18:01 |只看该作者

回复 #5 andrefun 的帖子

顶一个!

论坛徽章:
0
7 [报告]
发表于 2008-12-01 18:47 |只看该作者
偶以为楼主要详解TOP呢,偶看man top英文不好,看不太明白。

论坛徽章:
0
8 [报告]
发表于 2008-12-02 11:14 |只看该作者
原帖由 有点白 于 2008-12-1 18:47 发表
偶以为楼主要详解TOP呢,偶看man top英文不好,看不太明白。


偶也菜鸟一个,学习中~

论坛徽章:
0
9 [报告]
发表于 2011-10-21 11:35 |只看该作者
看着有些费力,大牛给解释一下

论坛徽章:
54
2017金鸡报晓
日期:2017-02-08 10:39:42操作系统版块每日发帖之星
日期:2016-03-08 06:20:00操作系统版块每日发帖之星
日期:2016-03-07 06:20:00操作系统版块每日发帖之星
日期:2016-02-22 06:20:00操作系统版块每日发帖之星
日期:2016-01-29 06:20:00操作系统版块每日发帖之星
日期:2016-01-27 06:20:00操作系统版块每日发帖之星
日期:2016-01-20 06:20:00操作系统版块每日发帖之星
日期:2016-01-06 06:20:0015-16赛季CBA联赛之江苏
日期:2015-12-21 20:00:24操作系统版块每日发帖之星
日期:2015-12-21 06:20:00IT运维版块每日发帖之星
日期:2015-11-17 06:20:002015亚冠之广州恒大
日期:2015-11-12 10:58:02
10 [报告]
发表于 2011-10-21 15:34 |只看该作者
偶不懂原理,涉及到页面置换对我来说有点复杂,简单理解如下:
Wired: 程序已经预订,确实要使用,但是还没有用到。
Cache: 系统层面的磁盘缓存
Buf:   IO层面的磁盘缓存

等高手来讲。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP