Редагувати

Поділитися через


LogFiles object

Use this class to manage a collection of one or more log files that contain performance counter data.

To retrieve this object, call SystemMonitor.LogFiles.

Members

The LogFiles object has these types of members:

Methods

The LogFiles object has these methods.

Method Description
Add Adds a LogFileItem instance to the collection.
Remove Removes a LogFileItem instance from the collection.

Properties

The LogFiles object has these properties.

Property Description
Count
Retrieves the number of LogFileItem instances in the collection.
Item
Retrieves the specified LogFileItem instance from the collection.

Remarks

To have SYSMON display performance counters from a log file, set SystemMonitor.DataSourceType to DataSourceTypeConstants.sysmonLogFiles. After adding the log files to the collection, use the Counters collection to specify the counters data that you want to read from the log files. Note that if SystemMonitor.DataSourceType is set to DataSourceTypeConstants.sysmonLogFiles, SYSMON will resample the log files each time you add a log file or counter to their respective collections.

Prior to Windows Vista: You cannot add log files to the log file collection if the value of SystemMonitor.DataSourceType is set to DataSourceTypeConstants.sysmonLogFiles. First, set SystemMonitor.DataSourceType to DataSourceTypeConstants.sysmonNullDataSource, add your log files and counters, and then set SystemMonitor.DataSourceType to DataSourceTypeConstants.sysmonLogFiles.

The SystemMonitor.LogViewStart and SystemMonitor.LogViewStop properties specify the range of sampled values from the log files to graph. SYSMON graphs only one view worth of data from the log file (the graph view does not scroll as it does when graphing the current activity of the computer). If the sampled data exceeds what can be shown on a single graph view, SYSMON compresses the sampled data (each graphed point represents the average of multiple sampled values) to fit all the sampled data from the log files on the graph.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Isysmon.h
DLL
Sysmon.ocx