Windbg基本命令应用总结
.cordll -ve -u -l //reload core dlls
------加载下载系统文件符号的URL----------
.sympath SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols
---------加载.net组件------- ---------------
.loadby sos clr
.load psscor4
-----------------Memory查看-------------------------
!dumpheap -stat //all .net objects statistics
!dumpheap -mt 000007feed866738 -min 80000 -max 90000 -stat //object size statistic
!dumpheap -mt 000007feed866738 -min 80000 //object in range addres list
!heap -s //shows heap summary
!heap -stat -h 00000000003a0000 //shows the heap statistics for the specified heap
!heap -flt s 1f64 //filters all other blocks of heap and displays the details of blocks having size 1f64
!heap -p -a UsrPtr //displays the call stack for UsrPtr
!traverseheap d:\HeapStatus.log //dump heap log, analyze by CLRProfiler
-----------------CPU------------------------------
!threads //show manage and unmanaged threads
!threadpool // show cpu usage and thread pool statistics
!runaway //show running threads and their cpu consuming
!threads -special //show all threads including gc, finalizer etc.
----------------堆栈查看----------------------------
~*e!mk //show all threads stack
~*kb 2000 //Examine the native callstacks
~*e!clrstack //Examine the .net callstacks 所有线程调用堆栈
!dso //find the objects on the stack
!clrstack 当前线程托管方法调用堆栈
k查看调用堆栈
!finalizequeue
!gcroot <address of string> 被根化(rooted)到哪里(即为什么它们不会被回收)
!eeHeap -gc查看.net GC 堆的大小
kb 2000产看当前线程本地(原生)调用堆栈
~* kb 2000 得到所有查看本地资源的callstack 触发GC的函数(mscorwks!)SVR::GCHeap::GarbageCollectGeneration)
GC 线程gc_heap::gc_thread_stub等待GC完成(GCHeap::WaitUntilGCComplete
------查看请求的url----
!aspxpages
!clrusage
//gcroot all the objects, find where the object created .foreach (obj {!dumpheap -mt 000007fef4c3da30 -short}) {!gcroot obj; .echo -----}
--------------------异常查看---------------
!pe 查看异常
!dso 查看栈上的对象
!pe [Object]打印出原先的异常,查看输出的信息 !SaveModule <Base address> <Filename> base Address还可以通过lm命令查看
!syncblk,查看线程中,锁的信息
------------------自动分析----------------------
!analyze
------------------服务器上dump文件的方法-----
1.服务器上使用windows任务管理器,选择进程创建转储文件即可。
2.Debugging Tools for Windows里提供了一个好工具, 其路径与Debugging Tools for Windows的安装路径相同,使用的方法如下所示: 在命令行模式下进入工具所在目录执行: adplus.exe -hang -p 1234 -o d:\dump
-p需要抓取文件的进程ID
-o文件输出的路径
adplus.exe -hang -p 33668 -o d:\dump
adplus.exe -crash -p 33668 -o d:\dump
当前安装包名称:X64 Debuggers And Tools-x64_en-us.msi
常用插件:
psscor4.dll下载地址: http://www.microsoft.com/download/en/details.aspx?id=21255
SOS.dll 获取地址:C:\Windows\Microsoft.NET\Framework\v2.0.50727
Windbg基本命令应用总结的更多相关文章
- windbg基本命令
1, .reload k 当前调用堆栈.u 当前正在执行的代码. 2, ~ 查看被调试进程中的线程信息每一行是一个线程的信息.第一行中,0 表示这个进程的编号:1ff4.1038 是 16 进制数字, ...
- .Net Memory -- Windbg基本命令
命令 解释 .cls 清空命令窗口屏幕 .load dllfullpath 加载debugger扩展dll如SOS sosex psscor. .loadby dll moduleName 加载deb ...
- Windbg Extension NetExt 使用指南 【2】 ---- NetExt 的基本命令介绍
摘要 : 本章节介绍NetExt常用的命令. 并且对SOS进行一些对比. NetExt的帮助 要想玩好NetExt, 入门就得看帮助. 看NetExt的帮助可以调用!whelp 命令. 这样hi列举出 ...
- Windbg调试命令详解
作者:张佩][原文:http://www.yiiyee.cn/Blog] 1. 概述 用户成功安装微软Windows调试工具集后,能够在安装目录下发现四个调试器程序,分别是:cdb.exe.ntsd. ...
- Windbg使用简明指南
第一章 准备 1.1. 环境配置 _NT_DEBUGGER_EXTENSION_PATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 _NT_SY ...
- windbg调试.net程序
1. 解决线上.NET应用程序的如下问题: 崩溃 CPU高 程序异常 程序Hang死 2. 安装WinDbg: http://msdn.microsoft.com/en-us/windows/hard ...
- windbg命令分类与概述
WinDBG的大多数功能是以命令方式工作的, 本系列将介绍WinDBG的三类命令, 标准命令, 元命令和扩展命令. =============== 标准命令 =============== 标准命令用 ...
- Windbg简单介绍
1.1 使用帮助 Windbg中的命令分为三种:基本命令.元命令和扩展命令.基本命令和元命令都是调试器自带的,元命令以" ."开头. 扩展命令是外部加入的,以"!&quo ...
- windbg命令学习1
一.windbg 常用知识: 1. Windbg中的调试命令,分为三种:基本命令,元命令和扩展命令.基本命令和元命令是调试器自带的,元命令总是以“.”开头,而扩展命令是外部加入的,总是以感叹号“!”开 ...
随机推荐
- 什么是URL,URI或URN?
什么是URI? 每个Web服务器资源都有一个名字,这样客户端就可以说明它们感兴趣的资源是什么了. 服务器资源名被称为统一资源标识符(Uniform Resource Identifier, URI). ...
- vue_ form表单 v-model
插值两种方式:{{}},v-model v-model 可以用 v-model 指令在只能在表单 <input> 及 <textarea> 元素上创建双向数据绑定.它会根据控件 ...
- Eclipse远程调试Java程序
1. 在服务器上运行jar包时加入参数 -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address= 2. 在Eclipse中操作 ...
- RBM
1. 玻尔兹曼分布: $$p(E) \thicksim e^{-E/kT} $$ 2. RBM 两层:隐层和可视层, $\mathbf v$, $\mathbf h$ $$v_i \in \{0, 1 ...
- java大文件断点续传
java两台服务器之间,大文件上传(续传),采用了Socket通信机制以及JavaIO流两个技术点,具体思路如下: 实现思路:1.服:利用ServerSocket搭建服务器,开启相应端口,进行长连接操 ...
- 生成代码,从 T1 到 T16 —— 自动生成多个类型的泛型
当你想写一个泛型 的类型的时候,是否想过两个泛型参数.三个泛型参数.四个泛型参数或更多泛型参数的版本如何编写呢?是一个个编写?类小还好,类大了就杯具! 事实上,在 Visual Studio 中生成代 ...
- LeetCode 675. Cut Off Trees for Golf Event
原题链接在这里:https://leetcode.com/problems/cut-off-trees-for-golf-event/description/ 题目: You are asked to ...
- tomcat nginx 证书切换
1. 导出公钥 keytool -export -alias tomcat -keystore <you jks>wsriakey.keystore -file <outputfil ...
- CentOS 6.8 源码安装mysql 5.6
一:卸载旧版本 rpm -qa | grep mysql rpm -e mysql #普通删除模式 rpm -e --nodeps xxx(xxx为刚才的显示的列表) # 强力删除模式,如果使用上面命 ...
- @Autowired & @Resource 区别 & 解读@Bean
一样 Autowired & @Resource 都可以用来Bean的注入,可以写在属性(字段)上.也可以写在setter方法上 不一样 1.来源不一样 @Autowired 由Spr ...