local pdh = require "pdh"
assert(not pdh.disabled())
local query = pdh.query()
local path = pdh.translate_path([[\Processor(_Total)\% Processor Time]])
local counter = query:add_counter(path)
query:collect()
pdh.sleep(1)
while true do
query:collect()
print(path, " => ", math.floor(counter:as_double()))
pdh.sleep(1000)
end
-
Notifications
You must be signed in to change notification settings - Fork 4
Lua binding to Microsoft Performance Data Helper (PDH) library.
License
moteus/lua-pdh
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Lua binding to Microsoft Performance Data Helper (PDH) library.
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published