SHAREPOINT LOGGING & DEBUGGING:                THE TROUBLESHOOTER’S BEST FRIEND           Cornelius J. van Dyk            ...
Thank you for being a part of the first         SharePoint Saturday Austin• Please turn off all electronic devices or set ...
ABOUT JASON• SharePoint Practice Director, Sentri Inc.• Microsoft vTSP     – virtual Technology Solutions Professional•   ...
ABOUT CORNELIUS •   Chief SharePoint Architect, Crayveon •   7 time Microsoft MVP •   MCITP, MCTS SharePoint 2010 •   Shar...
SHAREPOINT LOGGING – A HISTORY• How has SharePoint traditionally done logging   – IIS Logs   – ULS Logs   – Upgrade Logs  ...
SHAREPOINT LOGGING – NEW & IMPROVED! New Functionality in SharePoint 2010    – Correlation IDs    – Flood Protection    – ...
CORRELATION IDS • What is this weird 32 character message and why do I   care? • How are they used in SharePoint 2010? • W...
FLOOD PROTECTION• I’m smart, why don’t I want to see everything?• How does Flood Protection work?• How do I turn it off an...
FLOOD PROTECTION (CONT’D)  • How do I turn it off and on?
THE DEVELOPER DASHBOARD • How do I turn it on for a limited scope only? • There’s some great info here for developers, but...
THE DEVELOPER DASHBOARD (CONT’D) • Enabling the dashboard    – 3 modes           • Off           • On           • OnDemand...
THE DEVELOPER DASHBOARD (CONT’D)
SPMONITOREDSCOPE •   The SPMonitoredScope class resides in the Microsoft.SharePoint.Utilities     namespace.      –   Exam...
DEMO• Developer Dashboard
HEALTH DATA COLLECTION • Health Logging timer jobs are disabled by default    – Be selective in what you want to enable • ...
USAGE LOGGING • The drivers behind Web Analytics • True detail on who clicked what, and what   they saw
CONFIGURABLE ULS LOGS • Size limitation • Easy Granular tuning, with visibility into   what’s tuned • Ability to specify n...
DEMO• Web Analytics     • In Central Admin        –   Administrative Report Library – Search Admin Reports        –   Heal...
ONE DATABASE TO RULE THEM ALL:           THE LOGGING DATABASE•   What can it log?•   How do I tell it to start logging?•  ...
DEMO• SQL Views• CodePlex Projects  – http://SPFLogger.codeplex.com
NTEVENTLOG IN SPFLOGGER
NTEVENT ANALYTICS IN SPFLOGGER
ULSTRACEVIEW IN SPFLOGGER
TIMERJOB LOG IN SPFLOGGER
TIMERJOB ANALYTICS IN SPFLOGGER
HANDY REFERENCE INFORMATION •   Useful Stuff            • Jason’s info                    –   http://www.sharepointlonghor...
Thanks to our SponsorsTHANKS TO OUR OTHER SPONSORS!
SharePoint logging  & debugging
SharePoint logging  & debugging
Upcoming SlideShare
Loading in...5
×

SharePoint logging & debugging

1,458

Published on

SharePoint Saturday Austin - SharePoint Logging & Debugging: The Troubleshooter’s Best Friend

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,458
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SharePoint logging & debugging

  1. 1. SHAREPOINT LOGGING & DEBUGGING: THE TROUBLESHOOTER’S BEST FRIEND Cornelius J. van Dyk Jason HimmelsteinEnterprise Architect, Crayveon Corporation SharePoint Practice Director, Sentri, Inc www.cjvandyk.com/blog www.sharepointlonghorn.com c@sharepointmvp.net jhimmelstein@sentri.com @cjvandyk @sharepointlhorn
  2. 2. Thank you for being a part of the first SharePoint Saturday Austin• Please turn off all electronic devices or set them to vibrate.• If you must take a phone call, please do so in the hall so as not to disturb others.• Open wireless access is available with no password• Feel free to “tweet and blog” during the session• Thanks to our Title Sponsors:
  3. 3. ABOUT JASON• SharePoint Practice Director, Sentri Inc.• Microsoft vTSP – virtual Technology Solutions Professional• SharePoint Foundation Logger (http://spflogger.codeplex.com)• Web: www.sentri.com• Blog: www.sharepointlonghorn.com• Twitter: @sharepointlhorn• LinkedIn: www.linkedin.com/in/jasonhimmelstein
  4. 4. ABOUT CORNELIUS • Chief SharePoint Architect, Crayveon • 7 time Microsoft MVP • MCITP, MCTS SharePoint 2010 • SharePoint Foundation Logger (http://spflogger.codeplex.com) • Blog: www.cjvandyk.com/blog • Twitter: @cjvandyk • LinkedIn: http://www.linkedin.com/in/cjvandyk
  5. 5. SHAREPOINT LOGGING – A HISTORY• How has SharePoint traditionally done logging – IIS Logs – ULS Logs – Upgrade Logs – PSConfig Logs
  6. 6. SHAREPOINT LOGGING – NEW & IMPROVED! New Functionality in SharePoint 2010 – Correlation IDs – Flood Protection – Developer Dashboard – Usage Logging (Web Analytics) – Configurable ULS Logs
  7. 7. 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?
  8. 8. FLOOD PROTECTION• 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.
  9. 9. FLOOD PROTECTION (CONT’D) • How do I turn it off and on?
  10. 10. 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
  11. 11. 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 Add-PSSnappin Microsoft.SharePoint.PowerShell –EA 0 $j = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings; $j.DisplayLevel = OnDemand; $j.Update() Optional parameters $j.TraceEnabled = $true; $j.RequiredPermissions = %MaskSetting%;
  12. 12. THE DEVELOPER DASHBOARD (CONT’D)
  13. 13. 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
  14. 14. DEMO• Developer Dashboard
  15. 15. HEALTH DATA COLLECTION • Health Logging timer jobs are disabled by default – Be selective in what you want to enable • How to enable: – Central Admin | /_admin/ServiceJobDefinitions.aspx • Filter by Disabled and enable one by one – Powershell commandlet: SPDiagnosticProvider – Enable all Health Data Collection option in Central Admin | /_admin/LogUsage.aspx
  16. 16. USAGE LOGGING • The drivers behind Web Analytics • True detail on who clicked what, and what they saw
  17. 17. CONFIGURABLE ULS LOGS • Size limitation • Easy Granular tuning, with visibility into what’s tuned • Ability to specify number of days to log
  18. 18. 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
  19. 19. 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 easier? – BDC models – SQL Views – CodePlex Projects• Are there performance implications?
  20. 20. DEMO• SQL Views• CodePlex Projects – http://SPFLogger.codeplex.com
  21. 21. NTEVENTLOG IN SPFLOGGER
  22. 22. NTEVENT ANALYTICS IN SPFLOGGER
  23. 23. ULSTRACEVIEW IN SPFLOGGER
  24. 24. TIMERJOB LOG IN SPFLOGGER
  25. 25. TIMERJOB ANALYTICS IN SPFLOGGER
  26. 26. HANDY REFERENCE INFORMATION • Useful Stuff • Jason’s info – http://www.sharepointlonghorn.com – jase@sharepointlonghorn.com – @sharepointlhorn • Corne’s info – http://www.cjvandyk.com/blog – c@crayveon.com – @cjvandyk • Todd Carter’s info – @toddca – http://www.todd-carter.com/ • Russ Maxwell’s Blog – http://blogs.msdn.com/b/russmax • Microsoft References – SPMonitoredScope Class • http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.spmonitoredscope(office.14).aspx – Using SPMonitoredScope Class • http://msdn.microsoft.com/en-us/library/ff512758.aspx • Download links • http://spflogger.codeplex.com • Microsoft SharePoint 2010 Administration Toolkit v2.0
  27. 27. Thanks to our SponsorsTHANKS TO OUR OTHER SPONSORS!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×