%3CLINGO-SUB%20id%3D%22lingo-sub-1302545%22%20slang%3D%22en-US%22%3EGetting%20Reports%20from%20Long%20Running%20Performance%20Monitor%20Data%20Collector%20Sets%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1302545%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20everyone%2C%20my%20name%20is%20still%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsocial.technet.microsoft.com%2Fprofile%2Fdavid%2520%2520loder%2F%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EDavid%20Loder%3C%2FA%3E%2C%20and%20I'm%20still%20PFE%20out%20of%20Detroit%2C%20Michigan.%20And%20I%20have%20a%20confession%20to%20make.%20What%20you%20are%20about%20to%20read%20took%20me%20three%20revisions%20back%20and%20forth%20with%20my%20customer%20until%20we%20came%20up%20with%20a%20solution%20that%20worked.%20Each%20time%20I%20thought%20I%20was%20giving%20them%20full%20guidance%20on%20how%20to%20solve%20their%20problem%2C%20we%20hit%20another%20roadblock%20with%20things%20not%20working%20like%20we%20thought%20they%20should.%20Enjoy%20reading%20about%20the%20right%20way%20to%20solve%20this%20particular%20problem%20and%20keep%20challenging%20your%20PFEs!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20trying%20to%20track%20down%20an%20elusive%20Active%20Directory%20performance%20problem%2C%20gathering%20stats%20using%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fprevious-versions%2Fwindows%2Fit-pro%2Fwindows-server-2008-R2-and-2008%2Fcc749249(v%3Dws.11)%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EActive%20Directory%20Diagnostics%20Data%20Collector%20Set%3C%2FA%3E%20is%20the%20best%20method%20for%20insight%20as%20to%20what%20the%20Domain%20Controller%20is%20doing.%20However%2C%20having%20super%20busy%20DCs%20and%20not%20knowing%20exactly%20when%20the%20problem%20is%20going%20to%20occur%20can%20make%20capturing%20the%20data%20and%20generating%20a%20useful%20report%20harder.%26nbsp%3B%20There%20are%20also%20limitations%20with%20the%20Data%20Collector%20Sets%20that%20we%20have%20to%20take%20into%20consideration%20to%20come%20up%20with%20a%20solution%20that%20really%20works.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet%20me%20start%20with%20explaining%20how%2C%20and%20more%20importantly%20when%2C%20the%20various%20features%20of%20the%20Data%20Collector%20Sets%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20first%20thing%20to%20know%20is%20that%20you%20cannot%20change%20the%20properties%20of%20the%20built-in%20System%20Data%20Collector%20Sets.%26nbsp%3B%20You%20must%20create%20a%20custom%20User%20Defined%20Data%20Collector%20Set%20to%20be%20able%20to%20change%20its%20behavior.%20Create%20a%20new%20Data%20Collector%20Set%20by%20right-clicking%20the%20User%20Defined%20node%20and%20select%20New%20%26gt%3B%20Data%20Collector%20Set.%20Give%20it%20a%20name%2C%20create%20it%20from%20an%20existing%20template.%20Use%20the%20Active%20Directory%20Diagnostics%20as%20the%20template.%20Finish%20the%20wizard.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20DCS%20has%20settings%20that%20can%20be%20used%20to%20keep%20the%20collection%20from%20consuming%20too%20much%20disk%20capacity.%20Right-click%20the%20new%20DCS%20and%20select%20Data%20Manager%20Settings.%26nbsp%3B%20The%26nbsp%3BResource%20Policy%20of%20Delete%20Oldest%20causes%20older%20folders%20to%20be%20deleted%20to%20keep%20from%20growing%20too%20large.%20You%20can%26nbsp%3Badjust%20the%20size%20or%20folder%20count%20as%20needed.%20However%2C%20two%20things%20have%20to%20occur%20to%20have%20the%20data%20purging%20trigger.%26nbsp%3B%20First%2C%20the%20%E2%80%9CEnable%20data%20management%20and%20report%20generation%E2%80%9D%20property%20has%20to%20be%20selected.%26nbsp%3B%20It%20should%20be%20selected%20by%20default.%26nbsp%3B%20But%20second%2C%20these%20Data%20Manager%20rules%20don%E2%80%99t%20trigger%20until%20the%20DCS%20stops.%26nbsp%3B%20That%E2%80%99s%20an%20important%20distinction%20for%20the%20next%20set%20of%20DCS%20properties.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ENow%20right-click%26nbsp%3Bthe%20DCS%2C%20select%20Properties%20and%20switch%20to%20the%20Stop%20Condition%20tab.%20The%20Overall%20duration%2C%20which%20defaults%20to%205%20minutes%2C%20controls%20when%20the%20DCS%20will%20automatically%20stop.%26nbsp%3BOverall%20duration%20is%20the%20only%20setting%20that%20causes%20the%20DCS%20to%20stop%20on%20its%20own.%20The%20Limits%20section%20can%20be%20used%20to%20force%20the%20DCS%20to%20start%20using%20a%20new%20folder%20with%20new%20files%20for%20its%20collection%2C%20but%20setting%20a%20limit%20does%20not%20stop%20the%20DCS%20and%20therefore%20does%20not%20trigger%20the%20data%20purging%20configuration%20that%20is%20set%20in%20the%20Data%20Manager%20section.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20final%20feature%20of%20a%20DCS%20to%20explain%20is%20the%20report%20feature.%20Like%20data%20purging%2C%20report%20generation%20also%20only%20occurs%20when%20the%20DCS%20stops.%20Only%20the%20collection%20folder%20that%20was%20active%20when%20the%20DCS%20was%20stopped%20is%20used%20as%20the%20input%20source%20for%20the%20report.%20If%20you%20configure%20a%20limit%20and%20end%20up%20with%20multiple%20source%20folders%20for%20a%20single%20execution%2C%20only%20the%20last%20folder%20is%20used.%20Also%2C%20the%20size%20of%20the%20collected%20data%20in%20the%20collection%20folder%20determines%20how%20long%20the%20report%20generation%20will%20take.%26nbsp%3B%20Larger%20source%20data%20results%20in%20longer%20report%20generation%20times.%20While%20the%20report%20is%20being%20generated%2C%20all%20data%20collection%20has%20stopped%20and%20that%20same%20DCS%20cannot%20be%20restarted.%20Other%20than%20the%20report%20name%20in%20the%20Data%20Manager%20section%2C%20there%20is%20no%20GUI%20for%20managing%20report%20definitions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20this%20explanation%20for%20how%20a%20DCS%20works%20complete%2C%20I%20have%20a%20problem%20I%20had%20been%20trying%20to%20solve%20for%20a%20customer%20of%20mine.%20They%20had%20an%20elusive%20Active%20Directory%20performance%20problem%20that%20they%20couldn%E2%80%99t%20predict%20when%20it%20would%20happen%2C%20couldn%E2%80%99t%20cause%20it%20to%20happen%20on%20demand%20and%20it%20could%20be%20many%20days%20before%20it%20reoccurred.%26nbsp%3BBut%20they%20could%20tell%20when%20it%20had%20happened%20and%20wanted%20more%20diagnostic%20data%20for%20what%20the%20Domain%20Controller%20was%20doing%20at%20that%20time.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%2C%20we%20needed%20our%20DCS%20to%20behave%20with%20the%20following%20characteristics%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3EContinuously%20capture%20data%20over%20several%20days%20without%20gaps%20Do%20not%20save%20more%20data%20than%20the%20DC%20capacity%20Generate%20a%20report%20against%20an%20identified%20collection%3CP%3EThe%20first%20problem%20to%20solve%20is%20how%20to%20collect%20data%20without%20gaps%20yet%20still%20allow%20purging%20to%20run.%20The%20solution%20is%20to%20allow%20the%20DCS%20to%20stop%2C%20so%20purging%20can%20happen%2C%20but%20not%20run%20a%20report%20when%20it%20does%20stop%20so%20we%20don%E2%80%99t%20waste%20capture%20time%20running%20a%20report%20against%20a%20time%20period%20that%20likely%20didn%E2%80%99t%20include%20the%20event%20we%20were%20trying%20to%20capture.%26nbsp%3B%20There%E2%80%99s%20no%20GUI%20for%20the%20report%20definition.%26nbsp%3B%20It%E2%80%99s%20located%20in%20the%20XML%20of%20the%20DCS%20itself.%20Right-click%20your%20custom%20DCS%20and%20select%20Save%20Template.%20Open%20the%20XML%20in%20notepad%20and%20find%20the%20ReportSchema%20node.%20You%E2%80%99ll%20see%20there%20are%20nine%20report%20definitions%20that%20are%20included.%20Delete%20all%20the%20Imports%20except%20one%20and%20change%20the%20file%20to%20a%20non-existent%20filename.%20Having%20one%20invalid%20Import%20for%20the%20report%20causes%20the%20smallest%20possible%20report%20to%20be%20generated%2C%20which%20finishes%20in%20a%20fraction%20of%20a%20second%2C%20minimizing%20the%20amount%20of%20time%20we%E2%80%99re%20not%20collecting%20data.%26nbsp%3BHaving%20zero%20Report%20Imports%20causes%20a%20default%20set%20of%20reports%20to%20run%2C%20which%20we%20want%20to%20avoid%20since%20they%20take%20time%20to%20finish.%20Save%20the%20edited%20content%20to%20a%20new%20XML%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20section%20of%20XML%20should%20now%20look%20something%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CREPORTSCHEMA%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CREPORT%20name%3D%22%26quot%3BwpdcAdvisor%26quot%3B%22%20version%3D%22%26quot%3B1%26quot%3B%22%20threshold%3D%22%26quot%3B9999%26quot%3B%22%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CIMPORT%20file%3D%22%26quot%3B%25systemroot%25%5Cpla%5Creports%5CNoReport.xml%26quot%3B%22%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FIMPORT%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FREPORT%3E%3CBR%20%2F%3E%26lt%3B%20%2FReportSchema%26gt%3B%3C%2FREPORTSCHEMA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20this%20change%20to%20the%20XML%20complete%2C%20create%20a%20new%20DCS%20from%20a%20template%2C%20but%20this%20time%20browse%20to%20the%20edited%20XML%20file%20instead%20of%20selecting%20from%20the%20list.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20this%20new%20DCS%2C%20set%20the%20Data%20Manager%20purging%20rules%20as%20needed%26nbsp%3Band%20clear%20the%20Overall%20duration%20checkbox%20for%20the%20Stop%20Condition.%20Now%20we%20have%20a%20DCS%20that%20we%20can%20start%20and%20when%20we%20stop%20it%2C%26nbsp%3Bit%20quickly%20stops%2C%20creates%20a%20very%20small%2C%20useless%20report%20and%20purges%20the%20oldest%20data.%20By%20clearing%20the%20Overall%20duration%20checkbox%2C%20this%20DCS%20will%20run%20until%20stopped%20by%20another%20method%20(manual%20or%20scripted).%20It%20will%20not%20stop%20on%20its%20own.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20my%20customer%E2%80%99s%20busy%20DCs%20we%20can%E2%80%99t%20let%20the%20collection%20run%20too%20long%2C%20otherwise%20there%E2%80%99s%20a%20chance%20a%20report%20can%20never%20be%20generated%20so%20our%20plan%20is%20to%20stop%20and%20start%20the%20DCS%20once%20an%20hour.%20The%20built-in%20scheduler%20on%20the%20DCS%20properties%20isn%E2%80%99t%20that%20great%20so%20we%E2%80%99ll%20use%20Task%20Manager%20instead.%26nbsp%3B%20We%20created%20a%20small%20batch%20file%20with%20these%20commands%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Elogman.exe%20stop%20AD_DCS_NoReport%3CBR%20%2F%3Elogman.exe%20start%20AD_DCS_NoReport%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20we%20created%20a%26nbsp%3Btask%20that%20ran%20under%20the%20SYSTEM%20account%20that%20ran%20that%20batch%20file%20once%20an%20hour.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20the%20event%20reoccurred%2C%20we%20knew%20what%20collection%20set%20the%20data%20should%20be%20in%2C%20so%20we%20needed%20to%20generate%20a%20report%20for%20that%20particular%201%20hour%20block%2C%20which%20we%20have%20to%20do%20manually.%26nbsp%3BIn%20each%20DCS%20collection%20folder%2C%20you%20should%20see%20four%20files%3A%20Active%20Directory.etl%2C%20AD%20Registry.xml%2C%20NtKernel.etl%20and%20Performance%20Counter.blg.%20There%20is%20a%20fifth%20file%20that%20we%20need%20to%20generate%20the%20report.%20We%20will%20manually%20create%20it.%20Create%20a%20new%20text%20file%20in%20the%20folder%20called%20reportdefinition.txt.%20In%20that%20text%20file%2C%20add%20the%20following%20XML%20and%20save%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CREPORT%20name%3D%22%26quot%3BwpdcAdvisor%26quot%3B%22%20version%3D%22%26quot%3B1%26quot%3B%22%20threshold%3D%22%26quot%3B9999%26quot%3B%22%3E%3CIMPORT%20file%3D%22%26quot%3B%25systemroot%25%5Cpla%5Creports%5CReport.System.Common.xml%26quot%3B%2F%22%3E%3CIMPORT%20file%3D%22%26quot%3B%25systemroot%25%5Cpla%5Creports%5CReport.System.Summary.xml%26quot%3B%2F%22%3E%3CIMPORT%20file%3D%22%26quot%3B%25systemroot%25%5Cpla%5Creports%5CReport.System.Performance.xml%26quot%3B%2F%22%3E%3CIMPORT%20file%3D%22%26quot%3B%25systemroot%25%5Cpla%5Creports%5CReport.System.CPU.xml%26quot%3B%2F%22%3E%3CIMPORT%20file%3D%22%26quot%3B%25systemroot%25%5Cpla%5Creports%5CReport.System.Network.xml%26quot%3B%2F%22%3E%3CIMPORT%20file%3D%22%26quot%3B%25systemroot%25%5Cpla%5Creports%5CReport.System.Disk.xml%26quot%3B%2F%22%3E%3CIMPORT%20file%3D%22%26quot%3B%25systemroot%25%5Cpla%5Creports%5CReport.System.Memory.xml%26quot%3B%2F%22%3E%3CIMPORT%20file%3D%22%26quot%3B%25systemroot%25%5Cpla%5Creports%5CReport.System.Configuration.xml%26quot%3B%2F%22%3E%3CIMPORT%20file%3D%22%26quot%3B%25systemroot%25%5Cpla%5CReports%5CReport.AD.xml%26quot%3B%2F%22%3E%3C%2FIMPORT%3E%3C%2FIMPORT%3E%3C%2FIMPORT%3E%3C%2FIMPORT%3E%3C%2FIMPORT%3E%3C%2FIMPORT%3E%3C%2FIMPORT%3E%3C%2FIMPORT%3E%3C%2FIMPORT%3E%3C%2FREPORT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20may%20recognize%20that%20these%20are%20the%20same%20files%20that%20show%20up%20in%20the%20XML%20that%20we%20edited.%3CBR%20%2F%3E%3CBR%20%2F%3EFinally%2C%20execute%20the%20following%20command%20line%20from%20within%20the%20capture%20directory%20you%20want%20to%20use%20for%20the%20report.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Etracerpt.exe%20*.blg%20*.etl%20-df%20reportdefinition.txt%20-report%20report.html%20-f%20html%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20everything%20went%20right%2C%20you%20should%20end%20up%20with%20a%20normal%20DCS%20diagnostic%20report%20that%20you%20can%20review%20which%20covers%20the%20time%20period%20from%20when%20the%20event%20occurred.%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20a%20neat%20trick%2C%20if%20you%20need%20to%20see%20more%20than%20the%20top%2025%20items%20that%20the%20report%20defaults%20to%2C%20you%20can%20run%20the%20following%20command%20to%20get%20full%20XML%20output%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Etracerpt.exe%20%E2%80%93lr%20%22Active%20Directory.etl%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20additional%20reading%20on%20similar%20issues%20that%20led%20me%20to%20this%20solution%2C%20I%20offer%20up%20the%20Canberry%20PFE%20team%20blog%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Farchive%2Fblogs%2Fcanberrapfe%2Fissues-with-perfmon-reporting-turning-etl-into-html%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EIssues%20with%20Perfmon%20reporting%20-%20Turning%20ETL%20into%20HTML%3C%2FA%3E%2C%20the%20Directory%20Services%20Team%20blog%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Farchive%2Fblogs%2Faskds%2Fare-your-dcs-too-busy-to-be-monitored-ad-data-collector-set-solutions-for-long-report-compile-times-or-report-data-deletion%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EAre%20your%20DCs%20too%20busy%20to%20be%20monitored%3F%3A%20AD%20Data%20Collector%20Set%20solutions%20for%20long%20report%20compile%20times%20or%20report%20data%20deletion%3C%2FA%3E%20and%20the%20Core%20Infrastructure%20and%20Security%20blog%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fcore-infrastructure-and-security%2Ftaming-perfmon-data-collector-sets%2Fba-p%2F255521%22%20target%3D%22_blank%22%3ETaming%20Perfmon%3A%20Data%20Collector%20Sets%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20spending%20a%20little%20bit%20of%20your%20time%20with%20me.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-Dave%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1302545%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20trying%20to%20track%20down%20an%20elusive%20Active%20Directory%20performance%20problem%2C%20gathering%20stats%20using%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fprevious-versions%2Fwindows%2Fit-pro%2Fwindows-server-2008-R2-and-2008%2Fcc749249(v%3Dws.11)%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EActive%20Directory%20Diagnostics%20Data%20Collector%20Set%3C%2FA%3E%20is%20the%20best%20method%20for%20insight%20as%20to%20what%20the%20Domain%20Controller%20is%20doing.%20However%2C%20having%20super%20busy%20DCs%20and%20not%20knowing%20exactly%20when%20the%20problem%20is%20going%20to%20occur%20can%20make%20capturing%20the%20data%20and%20generating%20a%20useful%20report%20harder.%26nbsp%3B%20There%20are%20also%20limitations%20with%20the%20Data%20Collector%20Sets%20that%20we%20have%20to%20take%20into%20consideration%20to%20come%20up%20with%20a%20solution%20that%20really%20works.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1302545%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDavidLoder%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Hello everyone, my name is still David Loder, and I'm still PFE out of Detroit, Michigan. And I have a confession to make. What you are about to read took me three revisions back and forth with my customer until we came up with a solution that worked. Each time I thought I was giving them full guidance on how to solve their problem, we hit another roadblock with things not working like we thought they should. Enjoy reading about the right way to solve this particular problem and keep challenging your PFEs!

 

When trying to track down an elusive Active Directory performance problem, gathering stats using the Active Directory Diagnostics Data Collector Set is the best method for insight as to what the Domain Controller is doing. However, having super busy DCs and not knowing exactly when the problem is going to occur can make capturing the data and generating a useful report harder.  There are also limitations with the Data Collector Sets that we have to take into consideration to come up with a solution that really works.

 

Let me start with explaining how, and more importantly when, the various features of the Data Collector Sets work.

 

The first thing to know is that you cannot change the properties of the built-in System Data Collector Sets.  You must create a custom User Defined Data Collector Set to be able to change its behavior. Create a new Data Collector Set by right-clicking the User Defined node and select New > Data Collector Set. Give it a name, create it from an existing template. Use the Active Directory Diagnostics as the template. Finish the wizard.

NewDataCollectorSet.png

 

The DCS has settings that can be used to keep the collection from consuming too much disk capacity. Right-click the new DCS and select Data Manager Settings.  The Resource Policy of Delete Oldest causes older folders to be deleted to keep from growing too large. You can adjust the size or folder count as needed. However, two things have to occur to have the data purging trigger.  First, the “Enable data management and report generation” property has to be selected.  It should be selected by default.  But second, these Data Manager rules don’t trigger until the DCS stops.  That’s an important distinction for the next set of DCS properties.

 

DCSSize.png


Now right-click the DCS, select Properties and switch to the Stop Condition tab. The Overall duration, which defaults to 5 minutes, controls when the DCS will automatically stop. Overall duration is the only setting that causes the DCS to stop on its own. The Limits section can be used to force the DCS to start using a new folder with new files for its collection, but setting a limit does not stop the DCS and therefore does not trigger the data purging configuration that is set in the Data Manager section.

 

DCSStopNoRestart.png

 

The final feature of a DCS to explain is the report feature. Like data purging, report generation also only occurs when the DCS stops. Only the collection folder that was active when the DCS was stopped is used as the input source for the report. If you configure a limit and end up with multiple source folders for a single execution, only the last folder is used. Also, the size of the collected data in the collection folder determines how long the report generation will take.  Larger source data results in longer report generation times. While the report is being generated, all data collection has stopped and that same DCS cannot be restarted. Other than the report name in the Data Manager section, there is no GUI for managing report definitions.

 

With this explanation for how a DCS works complete, I have a problem I had been trying to solve for a customer of mine. They had an elusive Active Directory performance problem that they couldn’t predict when it would happen, couldn’t cause it to happen on demand and it could be many days before it reoccurred. But they could tell when it had happened and wanted more diagnostic data for what the Domain Controller was doing at that time.

 

So, we needed our DCS to behave with the following characteristics:

 

  • Continuously capture data over several days without gaps
  • Do not save more data than the DC capacity
  • Generate a report against an identified collection

The first problem to solve is how to collect data without gaps yet still allow purging to run. The solution is to allow the DCS to stop, so purging can happen, but not run a report when it does stop so we don’t waste capture time running a report against a time period that likely didn’t include the event we were trying to capture.  There’s no GUI for the report definition.  It’s located in the XML of the DCS itself. Right-click your custom DCS and select Save Template. Open the XML in notepad and find the ReportSchema node. You’ll see there are nine report definitions that are included. Delete all the Imports except one and change the file to a non-existent filename. Having one invalid Import for the report causes the smallest possible report to be generated, which finishes in a fraction of a second, minimizing the amount of time we’re not collecting data. Having zero Report Imports causes a default set of reports to run, which we want to avoid since they take time to finish. Save the edited content to a new XML file.

 

That section of XML should now look something like this:

 

<ReportSchema>
    <Report name="wpdcAdvisor" version="1" threshold="9999">
        <Import file="%systemroot%\pla\reports\NoReport.xml">
        </Import>
    </Report>
< /ReportSchema>

 

With this change to the XML complete, create a new DCS from a template, but this time browse to the edited XML file instead of selecting from the list.

 

For this new DCS, set the Data Manager purging rules as needed and clear the Overall duration checkbox for the Stop Condition. Now we have a DCS that we can start and when we stop it, it quickly stops, creates a very small, useless report and purges the oldest data. By clearing the Overall duration checkbox, this DCS will run until stopped by another method (manual or scripted). It will not stop on its own.

 

On my customer’s busy DCs we can’t let the collection run too long, otherwise there’s a chance a report can never be generated so our plan is to stop and start the DCS once an hour. The built-in scheduler on the DCS properties isn’t that great so we’ll use Task Manager instead.  We created a small batch file with these commands:

 

logman.exe stop AD_DCS_NoReport
logman.exe start AD_DCS_NoReport

 

Then we created a task that ran under the SYSTEM account that ran that batch file once an hour.

 

After the event reoccurred, we knew what collection set the data should be in, so we needed to generate a report for that particular 1 hour block, which we have to do manually. In each DCS collection folder, you should see four files: Active Directory.etl, AD Registry.xml, NtKernel.etl and Performance Counter.blg. There is a fifth file that we need to generate the report. We will manually create it. Create a new text file in the folder called reportdefinition.txt. In that text file, add the following XML and save it.

 

<Report name="wpdcAdvisor" version="1" threshold="9999"><Import file="%systemroot%\pla\reports\Report.System.Common.xml"/><Import file="%systemroot%\pla\reports\Report.System.Summary.xml"/><Import file="%systemroot%\pla\reports\Report.System.Performance.xml"/><Import file="%systemroot%\pla\reports\Report.System.CPU.xml"/><Import file="%systemroot%\pla\reports\Report.System.Network.xml"/><Import file="%systemroot%\pla\reports\Report.System.Disk.xml"/><Import file="%systemroot%\pla\reports\Report.System.Memory.xml"/><Import file="%systemroot%\pla\reports\Report.System.Configuration.xml"/><Import file="%systemroot%\pla\Reports\Report.AD.xml"/></Report>

 

You may recognize that these are the same files that show up in the XML that we edited.

Finally, execute the following command line from within the capture directory you want to use for the report.

 

tracerpt.exe *.blg *.etl -df reportdefinition.txt -report report.html -f html

 

If everything went right, you should end up with a normal DCS diagnostic report that you can review which covers the time period from when the event occurred.

As a neat trick, if you need to see more than the top 25 items that the report defaults to, you can run the following command to get full XML output:

 

tracerpt.exe –lr "Active Directory.etl"

 

For additional reading on similar issues that led me to this solution, I offer up the Canberry PFE team blog Issues with Perfmon reporting - Turning ETL into HTML, the Directory Services Team blog Are your DCs too busy to be monitored?: AD Data Collector Set solutions for long report compile time... and the Core Infrastructure and Security blog Taming Perfmon: Data Collector Sets.

 

Thanks for spending a little bit of your time with me.

 

-Dave