Click to Rate and Give Feedback
TechNet
TechNet Library

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
System.Diagnostics Namespace

The System.Diagnostics namespace provides classes that allow you to interact with system processes, event logs, and performance counters.

  • The EventLog component provides functionality to write to event logs, read event log entries, and create and delete event logs and event sources on the network. The EntryWrittenEventHandler provides a way to interact with event logs asynchronously. Supporting classes provide access to more detailed control, including: permission restrictions, the ability to specify event log types (which controls the type of default data that is written with an event log entry), and iterate through collections of event log entries. For more information about these tasks, see the EventLogPermission, EventLogEntryType, and EventLogEntryCollection classes.

  • The Process class provides functionality to monitor system processes across the network, and to start and stop local system processes. In addition to retrieving lists of running processes (by specifying either the computer, the process name, or the process id) or viewing information about the process that currently has access to the processor, you can get detailed knowledge of process threads and modules both through the Process class itself, and by interacting with the ProcessThread and ProcessModule classes. The ProcessStartInfo class enables you to specify a variety of elements with which to start a new process, such as input, output, and error streams, working directories, and command line verbs and arguments. These give you fine control over the behavior of your processes. Other related classes let you specify window styles, process and thread priorities, and interact with collections of threads and modules.

  • The PerformanceCounter class enables you to monitor system performance, while the PerformanceCounterCategory class provides a way to create new custom counters and categories. You can write to local custom counters and read from both local and remote counters (system as well as custom). You can sample counters using the PerformanceCounter class, and calculate results from successive performance counter samples using the CounterSample class. The CounterCreationData class enables you to create multiple counters in a category and specify their types. Other classes associated with the performance counter component provide access to collections of counters, counter permission, and counter types.

The System.Diagnostics namespace also provides classes that allow you to debug your application and to trace the execution of your code. For more information, see the Trace and Debug classes.

  ClassDescription
Public classBooleanSwitch Provides a simple on/off switch that controls debugging and tracing output.
Public classConditionalAttribute Indicates to compilers that a method call or attribute should be ignored unless a specified conditional compilation symbol is defined.
Public classConsoleTraceListener Directs tracing or debugging output to either the standard output or the standard error stream.
Public classCorrelationManager Correlates traces that are part of a logical transaction.
Public classCounterCreationData Defines the counter type, name, and Help string for a custom counter.
Public classCounterCreationDataCollectionProvides a strongly typed collection of CounterCreationData objects.
Public classCounterSampleCalculator Provides a set of utility functions for interpreting performance counter data.
Public classDataReceivedEventArgs Provides data for the OutputDataReceived and ErrorDataReceived events.
Public classDebugProvides a set of methods and properties that help debug your code. This class cannot be inherited.
Public classDebuggableAttribute Modifies code generation for runtime just-in-time (JIT) debugging. This class cannot be inherited.
Public classDebugger Enables communication with a debugger. This class cannot be inherited.
Public classDebuggerBrowsableAttribute Determines if and how a member is displayed in the debugger variable windows. This class cannot be inherited.
Public classDebuggerDisplayAttribute Determines how a class or field is displayed in the debugger variable windows.
Public classDebuggerHiddenAttribute Specifies the DebuggerHiddenAttribute. This class cannot be inherited.
Public classDebuggerNonUserCodeAttribute Identifies a type or member that is not part of the user code for an application.
Public classDebuggerStepperBoundaryAttribute Indicates the code following the attribute is to be executed in run, not step, mode.
Public classDebuggerStepThroughAttribute Specifies the DebuggerStepThroughAttribute. This class cannot be inherited.
Public classDebuggerTypeProxyAttribute Specifies the display proxy for a type.
Public classDebuggerVisualizerAttribute Specifies that the type has a visualizer. This class cannot be inherited.
Public classDefaultTraceListener Provides the default output methods and behavior for tracing.
Public classDelimitedListTraceListener Directs tracing or debugging output to a text writer, such as a stream writer, or to a stream, such as a file stream.
Public classDiagnosticsConfigurationHandlerInfrastructure. Obsolete. Handles the diagnostics section of configuration files.
Public classEntryWrittenEventArgs Provides data for the EntryWritten event.
Public classEventInstance Represents language-neutral information for an event log entry.
Public classEventLog Provides interaction with Windows event logs.
Public classEventLogEntry Encapsulates a single record in the event log. This class cannot be inherited.
Public classEventLogEntryCollection Defines size and enumerators for a collection of EventLogEntry instances.
Public classEventLogInstaller Allows you to install and configure an event log that your application reads from or writes to when running.
Public classEventLogPermission Allows control of code access permissions for event logging.
Public classEventLogPermissionAttribute Allows declaritive permission checks for event logging.
Public classEventLogPermissionEntry Defines the smallest unit of a code access security permission that is set for an EventLog.
Public classEventLogPermissionEntryCollection Contains a strongly typed collection of EventLogPermissionEntry objects.
Public classEventLogTraceListenerProvides a simple listener that directs tracing or debugging output to an EventLog.
Public classEventSchemaTraceListener Directs tracing or debugging output of end-to-end events to an XML-encoded, schema-compliant log file.
Public classEventSourceCreationData Represents the configuration settings used to create an event log source on the local computer or a remote computer.
Public classEventTypeFilter Indicates whether a listener should trace based on the event type.
Public classFileVersionInfo Provides version information for a physical file on disk.
Public classInstanceData Holds instance data associated with a performance counter sample.
Public classInstanceDataCollection Provides a strongly typed collection of InstanceData objects.
Public classInstanceDataCollectionCollection Provides a strongly typed collection of InstanceDataCollection objects.
Public classMonitoringDescriptionAttribute Specifies a description for a property or event.
Public classPerformanceCounter Represents a Windows NT performance counter component.
Public classPerformanceCounterCategory Represents a performance object, which defines a category of performance counters.
Public classPerformanceCounterInstaller Specifies an installer for the PerformanceCounter component.
Public classPerformanceCounterManagerInfrastructure. Obsolete. Prepares performance data for the performance.dll the system loads when working with performance counters.
Public classPerformanceCounterPermission Allows control of code access permissions for PerformanceCounter.
Public classPerformanceCounterPermissionAttribute Allows declaritive performance counter permission checks.
Public classPerformanceCounterPermissionEntry Defines the smallest unit of a code access security permission that is set for a PerformanceCounter.
Public classPerformanceCounterPermissionEntryCollection Contains a strongly typed collection of PerformanceCounterPermissionEntry objects.
Public classPresentationTraceSourcesProvides debug tracing support that is specifically targeted for Windows Presentation Foundation (WPF) applications. This is an abstract class.
Public classProcessProvides access to local and remote processes and enables you to start and stop local system processes.
Public classProcessModule Represents a.dll or .exe file that is loaded into a particular process.
Public classProcessModuleCollection Provides a strongly typed collection of ProcessModule objects.
Public classProcessStartInfo Specifies a set of values that are used when you start a process.
Public classProcessThread Represents an operating system process thread.
Public classProcessThreadCollection Provides a strongly typed collection of ProcessThread objects.
Public classSourceFilter Indicates whether a listener should trace a message based on the source of a trace.
Public classSourceSwitch Provides a multilevel switch to control tracing and debug output without recompiling your code.
Public classStackFrameProvides information about a StackFrame, which represents a function call on the call stack for the current thread.
Public classStackTrace Represents a stack trace, which is an ordered collection of one or more stack frames.
Public classStopwatch Provides a set of methods and properties that you can use to accurately measure elapsed time.
Public classSwitch Provides an abstract base class to create new debugging and tracing switches.
Public classSwitchAttribute Identifies a switch used in an assembly, class, or member.
Public classSwitchLevelAttribute Identifies the level type for a switch.
Public classTextWriterTraceListener Directs tracing or debugging output to a TextWriter or to a Stream, such as FileStream.
Public classTraceProvides a set of methods and properties that help you trace the execution of your code. This class cannot be inherited.
Public classTraceEventCache Provides trace event data specific to a thread and a process.
Public classTraceFilter Provides the base class for trace filter implementations.
Public classTraceListener Provides the abstract base class for the listeners who monitor trace and debug output.
Public classTraceListenerCollection Provides a thread-safe list of TraceListener objects.
Public classTraceSource Provides a set of methods and properties that enable applications to trace the execution of code and associate trace messages with their source.
Public classTraceSwitch Provides a multilevel switch to control tracing and debug output without recompiling your code.
Public classUnescapedXmlDiagnosticData Provides unescaped XML data for the logging of user-provided trace data.
Public classXmlWriterTraceListener Directs tracing or debugging output as XML-encoded data to a TextWriter or to a Stream, such as a FileStream.
  StructureDescription
Public structureCounterSample Defines a structure that holds the raw data for a performance counter.
  InterfaceDescription
Public interfaceICollectDataInfrastructure. Prepares performance data for the performance DLL the system loads when working with performance counters.
  DelegateDescription
Public delegateDataReceivedEventHandler Represents the method that will handle the OutputDataReceived event or ErrorDataReceived event of a Process.
Public delegateEntryWrittenEventHandler Represents the method that will handle the EntryWritten event of an EventLog.
  EnumerationDescription
Public enumerationDebuggableAttribute..::.DebuggingModes Specifies the debugging mode for the just-in-time (JIT) compiler.
Public enumerationDebuggerBrowsableState Provides display instructions for the debugger.
Public enumerationEventLogEntryType Specifies the event type of an event log entry.
Public enumerationEventLogPermissionAccess Defines access levels used by EventLog permission classes.
Public enumerationOverflowAction Specifies how to handle entries in an event log that has reached its maximum file size.
Public enumerationPerformanceCounterCategoryType Indicates whether the performance counter category can have multiple instances.
Public enumerationPerformanceCounterInstanceLifetime Specifies the lifetime of a performance counter instance.
Public enumerationPerformanceCounterPermissionAccess Defines access levels used by PerformanceCounter permission classes.
Public enumerationPerformanceCounterType Specifies the formula used to calculate the NextValue method for a PerformanceCounter instance.
Public enumerationPresentationTraceLevel Describes the level of detail to trace about a particular object.
Public enumerationProcessPriorityClass Indicates the priority that the system associates with a process. This value, together with the priority value of each thread of the process, determines each thread's base priority level.
Public enumerationProcessWindowStyle Specified how a new window should appear when the system starts a process.
Public enumerationSourceLevels Specifies the levels of trace messages filtered by the source switch and event type filter.
Public enumerationThreadPriorityLevel Specifies the priority level of a thread.
Public enumerationThreadState Specifies the current execution state of the thread.
Public enumerationThreadWaitReason Specifies the reason a thread is waiting.
Public enumerationTraceEventType Identifies the type of event that has caused the trace.
Public enumerationTraceLevel Specifies what messages to output for the Debug, Trace and TraceSwitch classes.
Public enumerationTraceLogRetentionOption Specifies the file structure that will be used for the EventSchemaTraceListener log.
Public enumerationTraceOptions Specifies trace data options to be written to the trace output.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker