# File lib/windows/sys/cpu.rb, line 110 def self.load_avg(cpu_num = 0, host = Socket.gethostname) cs = BASE_CS + "//#{host}/root/cimv2:Win32_Processor='cpu#{cpu_num}'" begin wmi = WIN32OLE.connect(cs) rescue WIN32OLERuntimeError => e raise Error, e else return wmi.LoadPercentage end end