Debugging and Monitoring

Document Sample
Debugging and Monitoring Powered By Docstoc
					Debugging and

 Different   debugging techniques

 Debugging     tools

 Monitoring   released applications

 Debugging
      Debugging techniques
      Tools
      Application Control of COM+ Transactions
 Monitoring
      Monitoring techniques
      WMI
Global Problem Areas

 Application   Layer
      Debugging     scripts is not easy
      Traditional   debugging for components
      Security   issues abound
 Protocol    and messaging layers
 3rd-party   black boxes
Development Debugging

 Assumptions
      Done on developer workstation
      Full suite of tools, full control of systems
      You have access to your source code
 Challenges
      Debugging across different environments
      Security is difficult to understand
      Debugging COM+ is “an art”
Release Code Debugging

 Assumptions
      Done in integration test or production
      No tools, limited access
      May not have access to source
 Challenges
      Preparing the production environment
      Operational procedures
      Debug symbols
Strategic Planning

 Know   the tools and environment
 Load   test throughout development
 Always   have symbols
     Generate   symbols for release builds
Debug symbols

 You   need the right symbols for debugging
 Generate     symbols for Release builds
 Install   debug symbols
      Windows NT including Service Packs
      Visual Basic Runtime
      Server products
 Symbol     file types (DBG vs. PDB)
Generating Symbols

 Visual Basic        Visual C++
Development Debugging Tools

 Application   Layer
     Visual InterDev
     Visual Basic

     Visual C++

     NuMega BoundsChecker

     Sysinternals Regmon and Filemon

     Mutek Bug Trapper

 Protocol   Layer
     Network   Monitor (aka NetMon)
Visual InterDev

 Robust   environment for debugging scripts
 Local   debugging
   Client   script
   ASP    script
   Visual   J++ components
 Remote    debugging
   ASP    script
   Visual   J++ components
Visual Basic

 IDE   debugger
 Debug   MTS components
 Debug   COM+ components
 No   system code debugging
Visual C++

 Best   of breed tool
 Multi-language   source-level debugging
 Not   ideal for “release mode”
Third-Party Tools

 NuMega    BoundsChecker
      Runtime    API usage validation
      Memory     leak detection
 Sysinternals    Regmon and Filemon
      Isolate   security issues
      Isolate   problems with the registry
 Mutek   Bug Trapper
      Lightweight   tool debugging binary images
Release Mode Debugging Tools

 Symbols

 Dr.   Watson
 UserDump

 WinDBG

 IIS   Exception Monitor
Dr. Watson

 Access   violation in release code
 Component    is not in IIS or COM+
 Symbols   must be installed
     Install Windows NT symbols (.DBG files)
     Install application symbols (.PDB)

 Available      in Platform SDK
 EXE    to generate memory dumps
 Service   automatically generate a dump
 Useful   for
      Hangs
      Infinite loops
      Unattended exceptions
IIS Exception Monitor

 Debug   exceptions in IIS
 Automate   the debugging process
 Generates   exception log
 Requires   debug symbols
Troubleshooting Security

 Build   a wrapper component
 Use   tools for monitoring
      Regmon for registry access
      Filemon for file system access
 Use   Auditing for security issues
Troubleshooting Protocols

 Have   NetMon installed on the subnet
 Keep   the protocol specification handy
 Test   vendor-specific implementations
COM+ Debugging Strategy

 Use   VB debugger for code and watches
 Use   VC++ for integrated systems
 Have   symbols installed in production
COM+ And Access Violations

 COM+   traps access violations
 DLLHost.exe   writes stack dump

 Pick   the right tool for the right job
 Prepare    for the worst
 Learn   everything you can about debugging
Monitoring techniques

 Tracing

 System     monitoring
      Event Log
      Performance Monitor
      WMI

 Tracing     target
      Data base
      File
 Optionally    enable in production
 Thread      safe tracing components
 Limit   trace log size
Event log, Performance Monitor

 Event   Log
      For important events
      No trace target
      System events
 Performance     Monitor
      Detect bottlenecks
      Measure throughput

 Windows    Management Instrumentation
 Goals
      Windows the most manageable system
      Comprehensive management infrastructure
      Consistent schema
 Core   component of Windows 2000
 Redistributable   for other systems
    WMI Architecture
                                WMI Consumers

                 CIM Object               Common Information
               Manager (CIMOM)                 Model

           Performance   NT Event
                                    Providers    WMI
Registry                                        ext for   SNMP
            Counters       Log                                   Server
What Is A WMI Provider?

 Agent   between data source and WMI
 Translates   requests for WMI data
 Provider   side of IWbemServices
 Enforces   security for each request
Microsoft WMI Providers
Core operating system providers
 Win32



 Registry

 Windows    NT Event log
 Performance    Monitor
 Performance    Counters
 Active   Directory
 Windows    Installer
 WMI  for WDM
     SCSI Disk, IDE Disk, NDIS, Keyboard, Mouse, USB,
      Modem, ACPI, Serial, Parallel, Disk Performance
Microsoft WMI Providers
Other providers
 SMS   inventory and SMS Healthmon
 NetMon    monitors and experts
 Network   Load Balancing
 SNA   Server
 Office   2000
 SQL   Server 2000
 Exchange

 Application     Server Monitoring
 DNS   Server, IIS, NetShow
 BizTalk   Server
 Clustering   Services
What Is A WMI Consumer?

 Makes    requests to WMI
     Enumerate    and retrieve instances or classes
     Query   for a specific set of instances
     Execute   methods; register for events
     Determine   relationships between objects
 Client   side of IWbemServices
 No   visibility to the actual data source
What Does WMI Do?

 Match    up consumers and providers
 Support   for
     Query

     Filtering

     Eventing

 Stores   the schema

 Tracing   is essential
 Detect   bottlenecks
 Monitor   your systems


Shared By: