1 / 38

Using Instrumentation And Troubleshooting To Develop High-Quality Software

PC50. Using Instrumentation And Troubleshooting To Develop High-Quality Software.  Ricky Buch Program Manager Microsoft Corporation.  Kevin Michael Woley Program Manager Microsoft Corporation. Agenda. Solving software problems in Windows

elina
Download Presentation

Using Instrumentation And Troubleshooting To Develop High-Quality Software

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PC50 Using Instrumentation And Troubleshooting To Develop High-Quality Software  Ricky Buch Program Manager Microsoft Corporation  Kevin Michael Woley Program Manager Microsoft Corporation

  2. Agenda • Solving software problems in Windows • Instrumentation and Troubleshooting platform • Windows Instrumentation • Event and Counter platform • Windows 7 improvements • Design principles • Windows Troubleshooting • Key Features • Architecture • Deployment

  3. Software Problems • When software is inconsistent with expectations • Why are software problems bad? • Lower customer satisfaction • Reduced profit • Software problems can be caused by • Design Issues • Configuration conflicts

  4. Solving Software Problems • Address in standard, structured way • Minimize development cost • Programmatic analysis • Enable problem detection and resolution • Windows provides two platforms that address above criteria • Instrumentation Platform • Troubleshooting Platform

  5. Windows Instrumentation: Performance Counters And Events Kevin Michael Woley Program Manager Microsoft Corporation

  6. Instrumentation Overview • The purpose of instrumentation • Diagnose and debug problems • Manage and maintain software • Instrumentation is used by • Developers • Ex: Measuring performance of an application • System administrators and IT Professionals • Ex: Determining system workload characteristics Instrumentation exposes internal OS and application state in a discoverable, easily consumable, standardized way

  7. Windows Instrumentation • Key Features • High-performance, low overhead, highly scalable • Native and Managed APIs • Dynamic enablement of data collection • Data delivered in real-time or persisted in files Applications can make use of both Performance Counters and Events

  8. demo Instrumentation Consumption Kevin Michael Woley

  9. Windows Event Overview Common API Set and Development Model

  10. Windows 7 Instrumentation Improvements

  11. Performance Counter Improvements In Windows 7 • New Version 2.0 Kernel Mode APIs • Declaratively defined in XML • Leverages Version 2.0 infrastructure from Vista • Fundamental Quality Investments • Enhanced performance, scalability, and robustness • Several new system counters exposing Windows internals • Improved design-time validation • Scriptable Consumption using PowerShell • Consume live counters (get-counter) • Read and write counter log files (import-counter/export-counter)

  12. ETW/Event Log Improvements In Windows 7 • Fundamental Quality Investments • Enhanced performance, scalability, and robustness • Several new Windows events and event providers • Event Development • Improved design-time validation • Automatically generate code from XML • Event Consumption • Scriptable consumption using PowerShell (get-event) • Discover and read ETW or Eventlog events locally or remotely • Portable event log file decoding • Improved data formatting • Windows Performance Toolkit Improvements

  13. Instrumentation Implementation And Design

  14. Instrumentation Design Considerations • Design for the appropriate audience • Provide meaningful event messages and counter descriptions • Provide actionable events and counters for System Administrators and IT Professionals • Use recommended interfaces • Performance Counters Version 2.0 • Managed – System.Diagnostics.PerformanceData • User Mode – PerfSet*(), PerfIncrement*(), etc. • Kernel Mode – PcwRegister(), PcwCreateInstance(), etc. • Manifest-based ETW and Event Log APIs • Managed – System.Diagnostics.Eventing • User Mode – EventWrite(), etc. • Kernel Mode – EtwWrite(), etc. Design your application’s events and counters with a goal in mind

  15. Generate Code 3 .rc Build 5 New Provider Create Instrumentation Manifest (ECMangen) XML Manifest CTRPP / MC preprocessors .c Build Instrumentation Definition 2 .h New provider code Instrument provider APIs Instrument 4 Windows Instrumentation Design Workflow Win7: Event Logging Code Generation & Improved Manifest Validation 5 Steps Design 1 Design

  16. demo Instrumentation Implementation Kevin Michael Woley

  17. Windows Troubleshooting Ricky Buch Program Manager Microsoft Corporation

  18. Windows 7 Troubleshooting Approach • Automating Troubleshooting • Spend less time fixing problems • Deflect calls or reduce minutes-per-incident • Different types of software problems • Design issues • Configuration conflicts • Troubleshooting configuration • Verify if desired user state can be supported • Set configuration to support desired state Troubleshooting is the process of detecting and resolving a problem

  19. Windows 7 Troubleshooting Implementation • Windows 7 troubleshoots configuration problems using Troubleshooting Packs • A Troubleshooting Pack is a program that • Launched by the user or an application • Detects and resolves configuration issues • Verifies that configuration has been set properly Troubleshooting Packs detect and resolve configuration problems

  20. demo Troubleshooting Pack – UI Ricky Buch

  21. End-User Troubleshooting Features • Easy to Discover • Inbox or online help documentation • Windows Troubleshooting Interface • Simple to Execute • Each pack uses a standard wizard user interface • Single-click problem resolution • Secure • Signed by a certificate to ensure pack integrity

  22. System-Administrator Troubleshooting Features • Easy to Deploy • Deploy as .cab files onto a file share or website • Flexible Execution • Run interactively or in unattended mode • Run on local or remote machines • Secure • Signed by a certificate to ensure pack integrity • Group Policy can control which packs can execute

  23. demo Troubleshooting Pack – PowerShell Ricky Buch

  24. Developer Troubleshooting Features • Easy to Develop • Packs use Windows PowerShell • Detection, resolution and verification code • Capturing user input and relaying progress • Can be deployed with application • Simple to Debug • Errors and exceptions from PowerShell scripts captured in a debug report • Secure • Signed by a certificate to ensure pack integrity

  25. Architecture Overview • Troubleshooting Pack consists of metadata and script files • Troubleshooting Platform executes the Troubleshooting Pack • Leverages the PowerShell runtime to execute scripts • Interacts with the GUI or command-line • Generates reports for analysis GUI CMD Troubleshooting Platform Trouble-shooting Packs Reports PowerShell

  26. Diagram Of A Troubleshooting Pack • Name and description • List of configuration issues • Security signature • Checks current configuration with expected configuration • Sets the current configuration to what is expected • Verifies that current configuration is now what is expected • Contains localized display strings in MUI format Identification Metadata Detection Scripts Trouble-shooting Pack Resolution Scripts Verification Scripts Localized Resources

  27. Diagram Of Component Interaction Identification Metadata • Detect a problem • Get input from user • Provide progress • Write to the report GUI CMD Detection Scripts Troubleshooting Platform PowerShell Runtime Resolution Scripts Verification Scripts Reports Localized Resources

  28. Authoring Troubleshooting Packs • Identify configuration issues • Develop troubleshooting PowerShell scripts • Troubleshooting toolkit • Graphical authoring environment • Links to Graphical PowerShell editor • Signs each pack with a certificate • Packages the Troubleshooting Pack for deployment

  29. demo Troubleshooting Pack Authoring Ricky Buch

  30. Deploying Troubleshooting Packs • Windows will • Ship critical packs inbox • Target additional packs using Windows Online Troubleshooting Service • You should • Ship troubleshooting packs with your client software • Post troubleshooting packs online • Link to packs from your help documentation Troubleshooting Packs offer multiple deployment options.

  31. Conclusion

  32. Solving Software Problems • Windows Instrumentation and Troubleshooting Platforms provide • Centralized, standard, structured platforms to improve manageability • Consistent ways to debug and diagnose software problems • Detection and resolution of configuration problems

  33. Call To Action • Review and revise your existing debugging techniques • Add or upgrade existing debug messages with the appropriate Windows Event or Performance Counter technologies • Review “An Overview of Windows Troubleshooting” whitepaper • Develop and deploy an appropriate troubleshooting pack with your application

  34. Related Content • Additional software quality sessions on video • Driving for software quality through customer feedback • Developing compatible applications for Windows • Hands On Analysis with Windows Performance Toolkit • Best practices for signing and verifying code on Windows 7 • Meet us at the Windows Fundamentals booth!

  35. Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com

  36. Q&A Please use the microphones provided

  37. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related