Data Collector Sets (Perfmon)

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
Logman-query.jpg

A Data Collector Set is the building block of performance monitoring and reporting in Windows Performance Monitor. It organizes multiple data collection points into a single component that can be used to review or log performance. A Data Collector Set can be created and then recorded individually, grouped with other Data Collector Set and incorporated into logs, viewed in Performance Monitor, configured to generate alerts when thresholds are reached, or used by other non-Microsoft applications. It can be associated with rules of scheduling for data collection at specific times. Windows Management Interface (WMI) tasks can be configured to run upon the completion of Data Collector Set collection.


Data Collector Sets can contain the following types of data collectors:

  • Performance counters
  • Event trace data
  • System configuration information (registry key values)


Control Data Collector Sets with PowerShell (Logman alternative)

#This will create a powershell com object.
$datacollectorset = New-Object -COM Pla.DataCollectorSet
#This is the name of the predefined DCS collector.  It's read-only and Default Counters are always under System\<something>
$name = "<Data Collector Set Name>" #For example: "Perfmon_Basic_Cluster-Counters"
#If you make the second param $null it will be the local machine.
$datacollectorset.Query($name,"<Hostname>") 
 
#Status ReturnCodes: 0=stopped 1=running 2=compiling 3=queued (legacy OS) 4=unknown (usually autologger)
$datacollectorset.status
 
#Start the DCS Collector
$datacollectorset.start($false)
 
#Stop the DCS Collector
$datacollectorset.stop($false)



More Information: https://technet.microsoft.com/en-us/library/cc749337(v=ws.11).aspx