summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/luasrc/model/cbi
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2016-11-08 22:24:56 +0200
committerHannu Nyman <hannu.nyman@iki.fi>2016-11-08 22:24:56 +0200
commitdf3c8728b995026a6df13efaf9a782b486de9ec5 (patch)
treee82d0a96f2f6fd80bf114822787ca415edbb6975 /applications/luci-app-statistics/luasrc/model/cbi
parent3936e79cf8d5d6df7c2c529dd1daacbd8d5ed31b (diff)
luci-app-statistics: add support for CPU frequency scaling stats
Add support for 'cpufreq' plugin in collectd, which monitors the CPU cores' frequencies. Some platforms enable dynamic frequency scaling according to CPU load. 'cpufreq' plugin can currently be built for x86 and mvebu. (and it should likely be enabled also for ipq806x) Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'applications/luci-app-statistics/luasrc/model/cbi')
-rw-r--r--applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpufreq.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpufreq.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpufreq.lua
new file mode 100644
index 0000000000..d1116630b4
--- /dev/null
+++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpufreq.lua
@@ -0,0 +1,14 @@
+-- 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
+
+return m