代码收藏

// 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());

posted on 2006-08-24 18:54  Mat  阅读(250)  评论(0)    收藏  举报

导航