惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
V
Vulnerabilities – Threatpost
Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
I
Intezer
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
News | PayPal Newsroom
S
Security Affairs
T
Tor Project blog
P
Proofpoint News Feed
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security @ Cisco Blogs
H
Heimdal Security Blog
Hacker News: Ask HN
Hacker News: Ask HN
Help Net Security
Help Net Security
U
Unit 42
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
Cisco Talos Blog
Cisco Talos Blog
量子位
F
Full Disclosure
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
有赞技术团队
有赞技术团队
T
Troy Hunt's Blog
P
Privacy & Cybersecurity Law Blog
Forbes - Security
Forbes - Security
人人都是产品经理
人人都是产品经理
L
Lohrmann on Cybersecurity
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Security Blog
Microsoft Security Blog
博客园 - Franky
腾讯CDC
AI
AI
Last Week in AI
Last Week in AI
Latest news
Latest news
Google Online Security Blog
Google Online Security Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
Martin Fowler
Martin Fowler
Blog — PlanetScale
Blog — PlanetScale
V2EX - 技术
V2EX - 技术
酷 壳 – CoolShell
酷 壳 – CoolShell

博客园 - yangjun

网页的栅格系统设计 jQuery 结合 Json 提交数据到Webservice,并接收从Webservice返回的Json数据 - yangjun JQuery 选择器、过滤器 普通程序员回顾2010 数据库从sql 2000迁移到SQL 2005遇到的问题 编写自文档化的代码 Top 10 steps to optimize data access in SQL Server. Part II C#六种集合性能比较 一个想法:把园子每月的精华文章制作成PDF文档 请问:哪里的空间申请较实惠 自定义“验证码”控件(转) 简单自定义实现jQuery验证 特性和属性 掌握ASP.NET之路:自定义实体类简介 深入浅出Attribute(中)——Attribute本质论 深入浅出Attribute(上)——Attribute本质论 (转) Head First IL中间语言--实例深入经典诠释(转) [转]CSS技巧:无懈可击的CSS圆角技术 C#的内存管理:堆栈、托管堆与指针 (转)
转:好用的抓取dump的工具-ProcDump
yangjun · 2011-03-09 · via 博客园 - yangjun

Procdump是一个轻量级的Sysinternal团队开发的命令行工具, 它的主要目的是监控应用程序的CPU异常动向, 并在此异常时生成crash dump文件, 供研发人员和管理员确定问题发生的原因. 你还可以把它作为生成dump的工具使用在其他的脚本中.

有了它, 就完全不需要在同一台服务器上使用诸如32位系统上的Debug Diag 1.1或是64位系统上的ADPlus了.

问题描述

===============

在任务管理器里发现w3wp.exe的CPU总在49%-60%左右, 间歇性地会下降一些. 我们需要在w3wp.exe的CPU在50%以上并能维持三秒钟的情形下抓取两组dump. 如果使用debug diag或adplus的话, 会比较困难, 因为这需要等待时机并手动抓取. 容易出现抓到的dump里不包含那些引发异常的动作的情况.

解决方案 - 救世主procdump

===============

Procdump可以很方便地帮助我们应付这种情况, 加速动作过程, 抓取正确数据集合. 它会指定的时间内监控目标进程的cpu, 并在那个点抓取一个内存快照(dump).

比如说:

procdump -ma -c 50 -s 3 -n 2 5844 (Process Name or PID)  -0 c:\dumpfile
    -ma 生成full dump, 即包括进程的所有内存. 默认的dump格式包括线程和句柄信息.

    -c 在CPU使用率到达这个阀值的时候, 生成dump文件.

    -s CPU阀值必须持续多少秒才抓取dump文件.

    -n 在该工具退出之前要抓取多少个dump文件.

    -o dump文件保存目录. 

上面的命令行会监控w3wp.exe的CPU, 在CPU使用率超过百分之五十超过3秒的时候, 生成dump文件, 重复该动作两次.

下面是该命令的一个实例记录:

C:\Users\jaskis\Downloads\procdump> procdump -ma -c 50 -s 3 -n 2 5844 -o c:\dumpfile
ProcDump v1.1 - Writes process dump files 
Copyright (C) 2009 Mark Russinovich 
Sysinternals - www.sysinternals.com
Process:            w3wp.exe (5844) 
CPU threshold:      50% of system
Duration threshold: 3s
Number of dumps:    2
Hung window check:  Disabled 
Exception monitor:  Disabled 
Dump file:          C:\Users\jaskis\Downloads\procdump\w3wp.dmp 
Time        CPU  Duration 
[23:48.35]  59%  1s 
[23:48.36] CPU usage below threshold.
[23:48.37]  54%  1s
[23:48.38]  55%  2s
[23:48.39]  61%  3s
Process has hit spike threshold.
Writing dump file C:\Users\jaskis\Downloads\procdump\w3wp_080309_114839PM.dmp... Dump written. 
[23:48.44]  61%  1s
[23:48.45]  59%  2s 
[23:48.46]  57%  3s 
Process has hit spike threshold. 
Writing dump file C:\Users\jaskis\Downloads\procdump\w3wp_080309_114846PM.dmp... 
Dump written.

下载路径:

ProcDump v3.01

http://technet.microsoft.com/en-us/sysinternals/dd996900 

译自:

Using ProcDump.exe to monitor w3wp.exe for CPU spikes

http://blogs.iis.net/webtopics/archive/2009/08/07/using-procdump-exe-to-monitor-w3wp-exe-for-cpu-spikes.aspx