How can I get the CPU and Memory usage of a particular process using the .NET PerformanceCounter
class? And also what is the difference between
Processor\% Processor Time
and Process\% Processor Time
?
I am a bit confused between these two.
This question is related to
c#
memory-management
cpu-usage
performancecounter
Pelo Hyper-V:
private PerformanceCounter theMemCounter = new PerformanceCounter(
"Hyper-v Dynamic Memory VM",
"Physical Memory",
Process.GetCurrentProcess().ProcessName);
Source: Stackoverflow.com