I-8 Accessing Power and Performance DataPROCESSOR UTILIZATIONTo collect the utilization of processors, use Win32_PerfFormattedData_PerfOS_Processor classprovided with the Windows OS.Shown below is a sample file created by Visual Basic Script (e.g. Proc.vbs).In this script, the processor utilization is collected every 30 seconds.' Start ScriptstrComputer = "."Set objWMIService = GetObject("winmgmts:" _& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")set objRefresher = CreateObject("WbemScripting.Swbemrefresher")Set objProcessor = objRefresher.AddEnum _(objWMIService, "Win32_PerfFormattedData_PerfOS_Processor").objectSetobjRefresher.RefreshDim firstfirst = trueDoFor each intProcessorUse in objProcessorIf first ThenIf intProcessorUse.Name = "_Total" Thenfirst = falseEnd IfelseWscript.Echo "Proc" & intProcessorUse.Name & " : " & _"PercentProcessorTime=" & _intProcessorUse.PercentProcessorTimeEnd IfNextWscript.Sleep 30*1000 'sleep 30 * 1000msobjRefresher.RefreshLoop' End ScriptCommand Line (Example)C:\VBS> cscript //nologo Proc.vbs