luci/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpufreq.lua
Hannu Nyman e6f30bb7f3 luci-app-statistics: cpufreq: changes in data structure
Collectd 5.9.0 changed the data structure of the cpufreq plugin:
CPU cores are now handled as separate plugin instances.

There are also new data items per core:
 * time spent at each frequency
 * amount of frequency transitions

Enable these new data items, but initially hide them behind
a new config option "ExtraItems" (default: disabled), as
the amount of graphs in multi-core systems could be rather large.

Note that the frequencies are not (yet) sorted, so the
information value of the time-spent graph is semi-random.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2019-07-30 20:47:02 +03:00

20 lines
703 B
Lua

-- Licensed to the public under the Apache License 2.0.
m = Map("luci_statistics",
translate("CPU Frequency Plugin Configuration"),
translate("This plugin collects statistics about the processor frequency scaling."))
-- collectd_cpufreq config section
s = m:section( NamedSection, "collectd_cpufreq", "luci_statistics" )
-- collectd_cpufreq.enable
enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_cpufreq.extraitems
extraitems = s:option( Flag, "ExtraItems", translate("Extra items"), translate("More details about frequency usage and transitions"))
extraitems.default = "0"
extraitems.optional = true
extraitems:depends( "enable", 1 )
return m