Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Thanks to: Wims
- alias cpuload {
- .comopen a wbemScripting.swbemLocator
- .comclose a $com(a,connectserver,3,bstr,.,bstr,root\cimv2,dispatch* b)
- .comclose b $com(b,execquery,3,bstr,SELECT * FROM Win32_PerfFormattedData_PerfOS_Processor WHERE Name = '_Total' ,dispatch* c)
- var %b = $comval(c,0)
- while (%b) {
- var %r = %r $comval(c,%b,PercentProcessorTime)
- dec %b
- }
- .comclose c
- return $iif(%r,$v1,0)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement