3.2.4.6 IPerformanceCounterDataCollector
The IPerformanceCounterDataCollector interface is used to specify the performance counters to query and the log file to which the counter data is written.
The following properties MUST be implemented by the objects that implement the IPerformanceCounterDataCollector interface.
Property |
Read/write |
Description |
---|---|---|
DataSourceName |
RW |
The data source name if the log file is an SQL log file. |
LogFileFormat |
RW |
The format in which data MUST be stored. The format is specified by the FileFormat enumeration. |
PerformanceCounters |
RW |
List of performance counters to be collected. |
SampleInterval |
RW |
The time, in seconds, between two consecutive samples. The default is 15 seconds. The minimum interval is 1 second. There is no maximum interval. |
SegmentMaxRecords |
RW |
Maximum number of samples to log in a segment. If set to 0, there is no segment record limit. Any unsigned long is a valid value for this property. |
A data collector can be represented as an XML file, which can be used to serialize (using Xml (Get) 3.2.4.5.21) and deserialize (using SetXml 3.2.4.5.22) it. The format of the XML that defines a performance counter data collector is as follows(the full XML specification of the data collector set XML is in section 3.2.4.19):
-
<PerformanceCounterDataCollector> <!-- elements for DataCollectorType --> <DataSourceName/> <SampleInterval/> <SegmentMaxRecords/> <LogFileFormat/> <Counter/> <CounterDisplayName/> </PerformanceCounterDataCollector>
The XML given above does not show the property elements inherited from IDataCollector that also need to be specified.
Methods in RPC Opnum Order
Method |
Description |
---|---|
Retrieves the DataSourceName property. Opnum: 32 |
|
Sets the DataSourceName property. Opnum: 33 |
|
Retrieves the PerformanceCounters property. Opnum: 34 |
|
Sets the PerformanceCounters property. Opnum: 35 |
|
Retrieves the LogFileFormat property. Opnum: 36 |
|
Sets the LogFileFormat property. Opnum: 37 |
|
Retrieves the SampleInterval property. Opnum: 38 |
|
Sets the SampleInterval property. Opnum: 39 |
|
Retrieves the SegmentMaxRecords property. Opnum: 40 |
|
Sets the SegmentMaxRecords property. Opnum: 41 |
Opnums 0, 1, and 2 are reserved for the IUnknown interface. Opnums 3, 4, 5, and 6 are reserved for the IDispatch interface. Opnums 7–31 are used by IDataCollector.