crash命令 —— vm

简介: crash命令 —— vm

参考:

https://crash-utility.github.io/help_pages/vm.html

用法:

  • 查看进程的用户虚拟内存信息(mm_struct地址,vma等)
查看当前进程: vm
查看指定进程: vm <进程pid> 或者 vm <进程的task_struct>

  • 查看进程的用户虚拟内存的映射信息vma -p
  • 如果虚拟地址已经映射到物理地址,那么会将对应的物理地址显示出来
  • 否则,如果映射的是文件的话,显示文件名以及偏移
  • 如果是匿名内存,并且被交换出去了,那么会显示对应的交换设备以及偏移
  • 如果只想查看指定vma的映射信息,可以使用vm -P <vma的虚拟地址>
  • 查看指定mm_struct的信息,用于无法通过task_struct获取mm_struct,但是可以通过其他途径获取mm_struct地址的情况
    vm -M <mm_struct的地址>
  • 查看指定进程的mm_struct的内容,跟用struct mm_struct <mm_struct地址>一个效果
    vm -m 或者 vm -m <pid>
  • 查看指定进程的vm_area_struct的内容,跟struct vm_area_struct <vma地址>效果类似
    vm -v 或者 vm -v <pid> 或者 vm -v <进程task_struct>
  • 将十六进制的vm_flags翻译为人可读的形式
crash> vm -f 0x8000871
8000871: (READ|MAYREAD|MAYWRITE|MAYEXEC|DENYWRITE|CAN_NONLINEAR)
  • 在进程vma里搜索指定的字符
在当前进程的vma中搜索: vm -R bash
在所有进程的vma中搜索: foreach vm -R bash
在所有进程的vma中搜索指定的flags: foreach vm -R 8000871
在所有进程的vma中搜索指定的虚拟地址: foreach vm -R 7f5699fae000
相关文章
|
17天前
crash命令 —— sym
crash命令 —— sym
|
17天前
|
分布式计算 关系型数据库 Ruby
crash命令 —— rd
crash命令 —— rd
|
17天前
|
Linux
crash命令 —— runq
crash命令 —— runq
|
17天前
|
调度
crash命令 —— ps
crash命令 —— ps
|
17天前
crash命令 —— dev
crash命令 —— dev
|
17天前
crash命令 —— ptob/btop
crash命令 —— ptob/btop
|
17天前
crash命令 —— kmem
crash命令 —— kmem
|
16天前
crash命令 —— waitq
crash命令 —— waitq
|
17天前
crash命令 —— vtop
crash命令 —— vtop
|
17天前
crash命令 —— ptov
crash命令 —— ptov