Performance Counter touch

Source: Internet
Author: User

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.

  1. 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.

  2. 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.

  3. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.