Lua 関数の GetSample は、指定した文字列に基づく使用率を数値で返します。
この例では、各使用率をテーブルに保存し、その内容を表示しています。
return function()
-- Gather the sample information in a table
local sample = {}
sample["MEMORY"] = GetSample("MEMORY")
sample["CPU"] = GetSample("CPU")
sample["CPUTEMP"] = GetSample("CPUTEMP")
sample["GPUTEMP"] = GetSample("GPUTEMP")
sample["SYSTEMP"] = GetSample("SYSTEMP")
sample["FANRPM"] = GetSample("FANRPM")
-- Print the collected data
Printf("Memory ; ".. sample["MEMORY"])
Printf("CPU ; ".. sample["CPU"])
Printf("CPU temperature ; ".. sample["CPUTEMP"])
Printf("GPU temperature ; ".. sample["GPUTEMP"])
Printf("System temperature ; ".. sample["SYSTEMP"])
Printf("Fan RPM ; ".. sample["FANRPM"])
end