www.goodsgy.com
PerformanceCounter控件的属性设为捕捉处理器时间百分比,可以用代码设置,也可以在IDE中的属性栏里设置,在本例中,是在属性栏里设置,如下图所示: www.goodsgy.com
图4:Performance Counter控件属性www.goodsgy.com
www.goodsgy.com
上图中,属性CategoryName被设为“Processor”,属性CounterName被设为“% Processor Time”,且InstanceName设为“_Total”。如果要监控单个处理器的状态,属性InstanceName需设为指向某个特定的处理器(比如说0或1)。www.goodsgy.com
上一页 [1] [2] [3] [4] 下一页