Use C # To monitor and Display CPU status information

Source: Internet
Author: User


Use C #Monitor and Display CPUStatus information
 
 
Introduction
This article describes a simple method to display the CPU status information. The example shows how to display the CPU consumed processor time percentage by configuring a performance counter, use a standard progress bar control and label control to periodically round the processor time percentage.
 

Figure 1: CPU processor time
 
This example can also be used to monitor multiple processors on a single computer and obtain the number of CPUs (System. environment. processorCount can return this value), and dynamically Add the Performance Monitor control so that it can Monitor each CPU.
You can also extend the methods in this article, as shown in the following example, A Dundas is used. the. NET Gauge Control displays the program of the Intel-central-dual-core processor. Although this example is not included in the article, the idea is the same.
 

Figure 2: monitor each processor in a dual-core system
 
 
Start Project
& Nbs

Related Article

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.