Your SlideShare is downloading. ×
Himmelstein SP Connections HAD207 SharePoint Logging & Debugging
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Himmelstein SP Connections HAD207 SharePoint Logging & Debugging


Published on

Jason Himmelstein's presentation at SP Connections 2012

Jason Himmelstein's presentation at SP Connections 2012

Published in: Technology, Business

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. SharePoint Logging & Debugging The Troubleshooter’s Best FriendCornelius J. van Dyk Jason Himmelstein Crayveon Corporation Sentri, Inc @cjvandyk @sharepointlhorn
  • 2. • SharePoint Practice Director, Sentri Inc.• MCITP, MCTS SharePoint 2010• Microsoft vTSP ● virtual Technology Solutions Professional• SharePoint Foundation Logger (• Web:• Blog:• Twitter: @sharepointlhorn• LinkedIn:
  • 3. • Chief SharePoint Architect, Crayveon• 7 time Microsoft MVP• MCITP, MCTS SharePoint 2010• SharePoint Foundation Logger (• Blog:• Twitter: @cjvandyk• LinkedIn:
  • 4. • How has SharePoint traditionally done logging
  • 5. New Functionality in SharePoint 2010
  • 6. • Size limitation• Easy Granular tuning, with visibility into what’s tuned• Ability to specify number of days to log
  • 7. • I’m smart, why don’t I want to see everything?• How does Flood Protection work?• How do I turn it off and on? With this option enabled, if the same event fires 5 times within 2 minutes, SharePoint will suppress the event from logging and throw a summary event at the 2 minute mark. The default behavior and can be customized using PowerShell and the Set-SPDiagnosticConfig cmdlet.
  • 8. • How do I turn it off and on?
  • 9. • Health Logging timer jobs are disabled by default• How to enable: • Filter by Disabled and enable one by one
  • 10. • The drivers behind Web Analytics• True detail on who clicked what, and what they saw
  • 11. Finding the root cause
  • 12. Correlation IDs• What is this weird 32 character message and why do I care?• How are they used in SharePoint 2010?• Why are they useful?
  • 13. The Developer Dashboard• How do I turn it on for a limited scope only?• There’s some great info here for developers, but what does it tell me from an Operations/Support perspective?• How can I convince my development team to code for it?• SPMonitored Scope ● Not available in Sandboxed Solutions
  • 14. The Developer Dashboard (cont’d)• Enabling the dashboard ● 3 modes • Off • On • OnDemand (recommended) ● STSADM • stsadm -o setproperty -pn developer-dashboard -pv [off | on | ondemand] ● PowerShell $j = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings; $j.DisplayLevel = OnDemand; $j.Update() Optional parameters $j.TraceEnabled = $true; $j.RequiredPermissions = %MaskSetting%;
  • 15. The Developer Dashboard (cont’d)
  • 16. The Developer Dashboard (cont’d)
  • 17. The Developer Dashboard (cont’d)
  • 18. SPMonitoredScope• The SPMonitoredScope class resides in the Microsoft.SharePoint.Utilities namespace. ● Example of wrapped code:• A tip for the best and most effective use of SPMonitoredScope: ● All calls to external components, such as custom databases, external Web services, and so on, should be wrapped with SPMonitoredScope. This will make it easier for administrators to identify them as points of failure, and to isolate the problem quickly. • Sandbox Solutions are not able to be wrapped in SPMonitoredScope• Measured statistics are written to the ULS logs as well as to the Developer Dashboard.• There are a few limitations for using SPMonitoredScope. ● Only calls to SharePoint databases are captured. ● Only the code wrapped with SPMonitoredScope that resides on the front-end Web server appears on the Developer Dashboard. Code that executes on application servers only displays the SPMonitoredScope information in the ULS logs of the computer that the code is running on.• Create custom monitors by adding ISPScopedPerformanceMonitor to the current SPMonitoredScope
  • 19.  Configurable ULS Logs Flood Protection Developer Dashboard
  • 20. DEMO• Web Analytics • In Central Admin – Administrative Report Library – Search Admin Reports – Health Reports -Slowest Pages & Top Active Users – Break down by Web Application – Traffic, Search Inventory• Configurable ULS Logs
  • 21. One Database to rule them all:The Logging database• What can it log?• How do I tell it to start logging?• How do I get the information out?• Are there tools out there to help me see the data more easily? ● BDC models ● SQL Views ● CodePlex Projects• Are there performance implications?
  • 22.  SQL Views CodePlex Projects 
  • 23. NTEventLog in SPFLogger
  • 24. NTEvent Analytics in SPFLogger
  • 25. ULSTraceView in SPFLogger
  • 26. TimerJob Log in SPFLogger
  • 27. TimerJob Analytics in SPFLogger
  • 28. Handy Reference Information• Useful Stuff • Jason’s info @sharepointlhorn • Corne’s info @cjvandyk • Todd Carter’s info @toddca • Russ Maxwell’s Blog• Microsoft References ● SPMonitoredScope Class ● Using SPMonitoredScope Class• Download links Microsoft SharePoint 2010 Administration Toolkit v2.0
  • 29. Thanks to our giveaway sponsor & Sentri Partner!
  • 30. Your Feedback is Important Please fill out a session evaluation form drop it off at the conference registration desk. Thank you!