This is an aparent solution only sintaxis "Processor" By
import win32pdh, time, win32pdhutil path = win32pdh.MakeCounterPath( (None,"Processor","_Total", None, -1, "% Processor Time") ) #Idle, _Total print path # open the query, and add the counter to the query #print win32pdhutil.GetPerformanceAttributes("Process(_Total)","% Processor Time") base = win32pdh.OpenQuery() print base counter = win32pdh.AddCounter(base, path) print counter # collect the data for the query object. We need to collect the query data # twice to be able to calculate the % Processor Time win32pdh.CollectQueryData(base) time.sleep(1) win32pdh.CollectQueryData(base) # Get the formatted value of the counter print "Uso de procesador al", (win32pdh.GetFormattedCounterValue(counter, win32pdh.PDH_FMT_LONG)[1]), "%" _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32