dot net application monitoring

Post on 20-May-2015

755 Views

Category:

Documents

10 Downloads

Preview:

Click to see full reader

DESCRIPTION

From the phillydotnet 2012.2 talk

TRANSCRIPT

ADVANCED TROUBLESHOOTING TOOLS

FOR .NET APPLICATIONSRavi Okade

Agenda

Production Troubleshooting Issues WinDbg – a brief introduction Main Agenda:

○ Part 1 - IntelliTrace○ Part 2 - System Center APM

Me (raviokade at hotmail)

I have been programming since

I like to program in

My favorite programming topic is

Java

C#

Data, more data, big data

Production Issue Types

Environmental issuesConnectivity, Hardware issuesHigh CPU, Memory issuesTypically managed through alerts

Application issuesRelated to incorrect application logicCan lead to incorrect application behavior,

“hang” or termination

Troubleshooting Application Issues Eventlogs, Perfmon can be of some help But Application logs are most appropriate. Requires proper logging to be in place. Sometimes you have to change to a more

verbose level.Generates tons of dataSlows down the applicationUseless if lots of multi-threading is going on

Parameter values are not appropriate for logging

What do you do when logs don’t work ? Try to reproduce! Near impossible.

QA = Production: rarely!Takes time!

Add more logging and redeployNot practical in large organizations

Agenda

Production Troubleshooting Issues WinDbg – a brief introduction Main Agenda:

○ Part 1 - IntelliTrace○ Part 2 - System Center APM

WinDbg

Available as a silent collector or as an interactive debugger

Generates dump files Dump files contain information about the

final state of the application Used for critical scenarios where

application tends to terminate or hang

WinDbg issues

Nice tool .. If you know how to use it! Need time to diagnose. Not for those

bleeding issues! Not appropriate for all types of issues.

Agenda

Production Troubleshooting Issues WinDbg – a brief introduction Main Agenda:

○ Part 1 - IntelliTrace○ Part 2 - System Center APM

Intellitrace

Code is instrumented dynamically Records program execution flow Historical debugging Records program data

Method ParametersReturn values

1st class debugging experience in Visual Studio

Intellitrace

Low overhead for collection (depends on collection plan)

IntelliTrace supports debugging VB and C# applications that use.NET version 2.0, 3.0, 3.5, or 4

Available only with Visual Studio Ultimate edition

Intellitrace Production Setup Application

IntelliTrace FileCollectionPlan.xmlIntelliTrace Recorder

IntelliTrace Collector Basics Collector can be deployed with xcopy You can collect data without installing

Visual Studio. The collector lets you capture details

about exceptions, threads, Web requests, modules, and other system information.

The collector saves this information as a recording (.iTrace file) that you can open in Visual Studio Ultimate.

IntelliTrace Collection steps Download and expand the IntelliTrace

collector cab file Collecting the Trace:

Web Application (need PowerShell):Start-IntelliTraceCollection <ApplicationPool> <CollectionPlan> <FullOutputPath>

Stop-IntelliTraceCollection <AppPoolName>

Exe Application:IntellitraceSC.exe launch /cp: <CollectionPlan> /f: <OutputFile> <ExecutableFile>

Open IntelliTrace recording in Visual Studio Ultimate

Copy the recording (.iTrace file) to a computer that has Visual Studio Ultimate.

Start Visual Studio Ultimate. Use the File menu to find and open the recording.

IntelliTrace DEMO

Tracing an EXE Application Tracing a Web Application Customizing Trace

Collection Plan

Image: http://www.crowcanyon.com/Pick-a-demo.html

Agenda

Production Troubleshooting Issues WinDbg – a brief introduction Main Agenda:

○ Part 1 - IntelliTrace○ Part 2 - System Center APM

System Center APM

Code is instrumented dynamically Records program execution flow Records program data (Parameters and

Return values) Low overhead for collection (depends on

configuration)

System Center APM

Code is instrumented dynamically Records program execution flow Records program data (Parameters and

Return values) Low overhead for collection (depends on

configuration)

How is it different from Intellitrace? Always-on monitoring Performance monitoring Remote administration/configuration Correlation with performance counters Multi-server call chains

System Center .Net Monitoring setup

System Center

DB

System Center Application

Server

System Center Agent

Monitored Web Application System

Center Operations

Monitor

System Center APM Demo Monitoring a Web Application View Alerts View Stack Trace and Parameter

Values Customizing What is collected

ADO.NET Parameters and Execution time

Security Alerts

Profiling options

System Center APM – Advanced features

Client side monitoring System Center Advisor Collected data automated clean-up

When to use whatScenario WinDbg System Center

APMIntelliTrace

Memory leak Yes Limited No

Exceptions Limited Yes Yes

Performance No Yes No

Deadlocks, Hang Yes No Limited

Running threads and stack Yes No Yes

Performance impact on target application when debugging

Low/Medium Low/Medium (configurable)

Medium/High (configurable)

Correlation across tiers spread across servers

No Yes No

Application types All Web All

Target audience Developers (High skill)

Ops (Primary), Developers

Developers

Always On ? No Yes No

Cost Free $$ Low

References

System Center Application Monitoring Tutorialhttps://cmg.vlabcenter.com/default.aspx?moduleid=7a804b17-0025-4309-957d-a21c2e121e2b

Intellitrace Tutorialhttp://msdn.microsoft.com/en-us/vs2010trainingcourse_debuggingwithintellitrace.aspx

top related