zoukankan      html  css  js  c++  java
  • Windbg Script---一个从连接池里查找信息的脚本

    如果您像我一样,您可能会忘记需要查找某些特定信息的类和名称空间。或者你忘了要查找的字段名。例如当我需要从System.Data.SqlClient命名空间查找信息。
    此脚本从连接检索特定信息。扩展它也很容易,因此可以使用相同的方法从其他名称空间和字段中提取信息。
    就个人而言,我更喜欢基于DML(调试标记语言)的方法,因为我可以使用超链接和默认脚本调用:$$><。DML方法需要更多的工作和更低级的编程,但是可以提供更好的结果。

    需要使用$$<而不是$$><。

    Source code for CONNECTIONS_POOL.TXT:

    $$
    
    $$ =============================================================================
    
    $$ Verify Connections from Pool.
    
    $$
    
    $$ Compatilibity: Win32, should work on Win64.
    
    $$
    
    $$ Attention! For .Net Framework 2.0, edit the script and remove the clr10\ from it so it can use the
    
    $$ sos.dll version 2.0
    
    $$
    
    $$ Usage: $$< to run the script. (note: Just $$< not $$><)
    
    $$
    
    $$ Requirements: Public symbols.
    
    $$
    
    $$ Roberto Alexis Farah
    
    
    $$ All my scripts are provided "AS IS" with no warranties, and confer no rights.
    
    $$ =============================================================================
    
    $$
    
    .shell -i - -ci ".foreach ( obj {!clr10\sos.dumpheap -type System.Data.SqlClient.SqlInternalConnection -short} ) {!do ${obj} }" FIND "_fInPool"
    
    .shell -i - -ci ".foreach ( obj {!clr10\sos.dumpheap -type System.Data.SqlClient.SqlConnectionPoolControl -short} ) {!do ${obj} }" FIND "_fResetConnection"
    
    .shell -i - -ci ".foreach ( obj {!clr10\sos.dumpheap -type System.Data.SqlClient.SqlConnectionPoolControl -short} ) {!do ${obj} }" FIND "_maxPool"
    
    $$
    
    $$ Number of Connection Objects
    
    $$ ============================
    
    $$
    
    !clr10\sos.dumpheap -type System.Data.OleDb.OleDbConnection -stat
    
    $$
    
    $$ ===================================================================
    
  • 相关阅读:
    WCF全面解析学习之地址Address(1)
    【转】理解和使用Oracle 8i分析工具-LogMiner
    【Wonder原创】NHibernate映射文件范例
    【转】C#经典面试题及答案
    【转】C#中abstract class和interface之探讨
    【转】130道C#面试题
    【Oracle学习】archivelog
    【转载】sql server 2005系统表详细说明
    【转】WINDOWS批处理命令详解
    【转】Linux find命令详解
  • 原文地址:https://www.cnblogs.com/yilang/p/13456951.html
Copyright © 2011-2022 走看看