代码收藏
// constants used to select the performance counter.
private const string CategoryName = "Processor";
private const string CounterName = "% Processor Time";
private const string InstanceName = "_Total";
PerformanceCounter pc = new PerformanceCounter(CategoryName,CounterName,InstanceName);
Response.Write(pc.CounterType+"<br>"+pc.CounterHelp+"<br>"+pc.NextValue());
private const string CategoryName = "Processor";
private const string CounterName = "% Processor Time";
private const string InstanceName = "_Total";
PerformanceCounter pc = new PerformanceCounter(CategoryName,CounterName,InstanceName);
Response.Write(pc.CounterType+"<br>"+pc.CounterHelp+"<br>"+pc.NextValue());
浙公网安备 33010602011771号