<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- MAIN BODY TABLE is nested for scalability -->
</head><body><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td colspan="3"><hr class="gray" noshade="noshade"></td>
</tr>
<tr>
<td colspan="3"><img src="kmem_files/pixel.htm" alt="" border="0" height="10" width="1"></td>
</tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td width="100%">
<!--CONTENT begins here-->
<h3>crash utility help page: <tt><b> kmem</b></tt></h3>
<table bgcolor="#e0e0e0" border="0" width="100%">
<tbody><tr>
<td>
<pre>
NAME
kmem - kernel memory
SYNOPSIS
kmem [-f|-F|-p|-c|-C|-i|-s|-S|-v|-V|-n|-z] [-[l|L][a|i]] [slab] [[-P] address]
DESCRIPTION
This command displays information about the use of kernel memory.
-f displays the contents of the system free memory headers.
also verifies that the page count equals nr_free_pages.
-F same as -f, but also dumps all pages linked to that header.
-p displays basic information about each page in the system
mem_map[] array.
-c walks through the page_hash_table and verifies page_cache_size.
-C same as -c, but also dumps all pages in the page_hash_table.
-i displays general memory usage information
-s displays basic kmalloc() slab data.
-S displays all kmalloc() slab data, including all slab objects,
and whether each object is in use or is free. If CONFIG_SLUB,
slab data for each per-cpu slab is displayed, along with the
address of each kmem_cache_node, its count of full and partial
slabs, and a list of all tracked slabs.
-v displays the vmlist entries.
-V displays the kernel vm_stat table if it exists, the cumulative
page_states counter values if they exist, and/or the cumulative
vm_event_states counter values if they exist.
-n display memory node data (if supported).
-z displays per-zone memory statistics.
-la walks through the active_list and verifies nr_active_pages.
-li walks through the inactive_list and verifies nr_inactive_pages.
-La same as -la, but also dumps each page in the active_list.
-Li same as -li, but also dumps each page in the inactive_list.
slab when used with -s or -S, limits the command to only the slab cache
of name "slab". If the slab argument is "list", then
all slab cache names and addresses are listed.
-P declares that the following address argument is a physical address.
address when used without any flag, the address can be a kernel virtual,
or physical address; a search is made through the symbol table,
the kmalloc() slab subsystem, the free list, the page_hash_table,
the vmalloc() vmlist subsystem, the current set of task_structs
and kernel stacks, and the mem_map array. If found in any of
those areas, the information will be dumped in the same manner as
if the location-specific flags were used; if contained within a
curent task_struct or kernel stack, that task's context will be
displayed.
address when used with -s or -S, searches the kmalloc() slab subsystem
for the slab containing of this virtual address, showing whether
it is in use or free.
address when used with -f, the address can be either a page pointer,
a physical address, or a kernel virtual address; the free_area
header containing the page (if any) is displayed.
address when used with -p, the address can be either a page pointer, a
physical address, or a kernel virtual address; its basic mem_map
page information is displayed.
address when used with -c, the address must be a page pointer address;
the page_hash_table entry containing the page is displayed.
address when used with -l, the address must be a page pointer address;
the page address is displayed if it is contained with the list.
address when used with -v, the address can be a mapped kernel virtual
address or physical address; the vmlist containing the address
is displayed.
All address arguments above must be expressed in hexadecimal format.
EXAMPLES
Display memory usage information:
crash> kmem -i
PAGES TOTAL PERCENTAGE
TOTAL MEM 63602 248.4 MB ----
FREE 993 3.9 MB 1% of TOTAL MEM
USED 62609 244.6 MB 98% of TOTAL MEM
SHARED 34035 132.9 MB 53% of TOTAL MEM
BUFFERS 10928 42.7 MB 17% of TOTAL MEM
CACHED 35249 137.7 MB 55% of TOTAL MEM
SLAB 2823 11 MB 4% of TOTAL MEM
TOTAL HIGH 0 0 0% of TOTAL MEM
FREE HIGH 0 0 0% of TOTAL HIGH
TOTAL LOW 63602 248.4 MB 100% of TOTAL MEM
FREE LOW 993 3.9 MB 1% of TOTAL LOW
TOTAL SWAP 129792 507 MB ----
SWAP USED 14727 57.5 MB 11% of TOTAL SWAP
SWAP FREE 115065 449.5 MB 88% of TOTAL SWAP
ZONE NAME FREE ACTIVE INACTIVE_DIRTY INACTIVE_CLEAN MIN/LOW/HIGH
0 DMA 240 1166 7 161 128/256/384
1 Normal 753 17009 27834 0 255/510/765
2 HighMem 0 0 0 0 0/0/0
Display and verify free memory data:
crash> kmem -f
NODE
0
ZONE NAME SIZE FREE MEM_MAP START_PADDR START_MAPNR
0 DMA 4096 3372 c4000040 0 0
AREA SIZE FREE_AREA_STRUCT BLOCKS PAGES
0 4k c02eb004 2 2
1 8k c02eb010 3 6
2 16k c02eb01c 5 20
3 32k c02eb028 4 32
4 64k c02eb034 5 80
5 128k c02eb040 3 96
6 256k c02eb04c 3 192
7 512k c02eb058 1 128
8 1024k c02eb064 1 256
9 2048k c02eb070 5 2560
ZONE NAME SIZE FREE MEM_MAP START_PADDR START_MAPNR
1 Normal 225280 202269 c4044040 1000000 4096
AREA SIZE FREE_AREA_STRUCT BLOCKS PAGES
0 4k c02eb0b8 1 1
1 8k c02eb0c4 2 4
2 16k c02eb0d0 0 0
3 32k c02eb0dc 1 8
4 64k c02eb0e8 1 16
5 128k c02eb0f4 0 0
6 256k c02eb100 0 0
7 512k c02eb10c 0 0
8 1024k c02eb118 0 0
9 2048k c02eb124 395 202240
ZONE NAME SIZE FREE MEM_MAP START_PADDR START_MAPNR
2 HighMem 819200 748686 c4ee0040 38000000 229376
AREA SIZE FREE_AREA_STRUCT BLOCKS PAGES
0 4k c02eb16c 10 10
1 8k c02eb178 2 4
2 16k
crash man手册
3星 · 超过75%的资源 需积分: 19 132 浏览量
2011-01-11
00:35:53
上传
评论
收藏 124KB ZIP 举报
charleswjwen87
- 粉丝: 3
- 资源: 18
最新资源
- 机械设计整经机上纱自动化sw20非常好的设计图纸100%好用.zip
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
- Python排序算法.zip
- C语言实现直接插入排序、希尔排序、选择排序、冒泡排序、堆排序、快速排序、归并排序、计数排序,并带图详解.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈