PerformanceCounter
private PerformanceCounter cpuCounter = null; cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total", machineName); //ramCounter = new PerformanceCounter("Memory", "Available MBytes", String.Empty, machineName); ramCounter = new PerformanceCounter("Memory", "% Committed Bytes In Use", String.Empty, machineName); pageCounter = new PerformanceCounter("Paging File", "% Usage", "_Total", machineName); // there can be multiple network interfaces nicCounters = GetNICCounters(); // for each nic card, create a corresponding status bar label for (int i = 0; i < nicCounters.Length; i++) { ssStatusBar.Items.Add(GetNICLabel(nicCounters[i], i)); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)