diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2016-11-08 22:24:56 +0200 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2016-11-08 22:24:56 +0200 |
commit | df3c8728b995026a6df13efaf9a782b486de9ec5 (patch) | |
tree | e82d0a96f2f6fd80bf114822787ca415edbb6975 /applications/luci-app-statistics/luasrc/statistics | |
parent | 3936e79cf8d5d6df7c2c529dd1daacbd8d5ed31b (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/statistics')
-rw-r--r-- | applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua new file mode 100644 index 0000000000..6e63630109 --- /dev/null +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua @@ -0,0 +1,25 @@ +-- Licensed to the public under the Apache License 2.0. + +module("luci.statistics.rrdtool.definitions.cpufreq",package.seeall) + +function rrdargs( graph, plugin, plugin_instance, dtype ) + + return { + title = "%H: Processor frequency", + alt_autoscale = true, + vlabel = "Frequency (Hz)", + number_format = "%4.0lf%s", + data = { + instances = { + cpufreq = { "3", "2", "1", "0" } + }, + options = { + cpufreq_0 = { color = "ff0000", title = "Core 0", noarea=true, overlay=true }, + cpufreq_1 = { color = "0000ff", title = "Core 1", noarea=true, overlay=true }, + cpufreq_2 = { color = "00ff00", title = "Core 2", noarea=true, overlay=true }, + cpufreq_3 = { color = "00ffff", title = "Core 3", noarea=true, overlay=true } + } + } + } +end + |