Our app is using custom performance counters working with MS perfmon.exe for performance monitoring/logging. So I take a quick look at msdn about this domain classes for overview.
System. Diagnostics namespace
TheSystem. DiagnosticsNamespace 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 when SS 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 want 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.