Record skype CPU usage
Var processorCounter = new PerformanceCounter
{
CategoryName = "Process ",
CounterName = "% Processor Time ",
InstanceName = "skype ",
MachineName = "."
};
ProcessorCounter. NextValue ()
Record skype memory usage
Var memoryCounter = new PerformanceCounter
{
CategoryName = "Process ",
CounterName = "Working Set-Private ",
InstanceName = "skype ",
MachineName = "."
};
MemoryCounter. RawValue returns bytes as the unit of measurement.
Obtains the cpu and memory usage of the current computing computer.
Counter = new PerformanceCounter ("Processor", "% Processor Time", "_ total ");
Counter. NextValue () cpu usage
ComputerInfo = new ComputerInfo ();
ComputerInfo. TotalPhysicalMemory-ComputerInfo. AvailablePhysicalMemory memory usage
Note: If the instanceName does not exist when Counter is used, an exception occurs.
From JustRun1983