luci-app-statistics: add support for CPU frequency scaling stats
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / cpufreq.lua
1 -- Licensed to the public under the Apache License 2.0.
2
3 module("luci.statistics.rrdtool.definitions.cpufreq",package.seeall)
4
5 function rrdargs( graph, plugin, plugin_instance, dtype )
6
7         return {
8                 title = "%H: Processor frequency",
9                 alt_autoscale = true,
10                 vlabel = "Frequency (Hz)",
11                 number_format = "%4.0lf%s",
12                 data = {
13                         instances = {
14                                 cpufreq = { "3", "2", "1", "0" }
15                         },
16                         options = {
17                                 cpufreq_0 = { color = "ff0000", title = "Core 0", noarea=true, overlay=true },
18                                 cpufreq_1 = { color = "0000ff", title = "Core 1", noarea=true, overlay=true },
19                                 cpufreq_2 = { color = "00ff00", title = "Core 2", noarea=true, overlay=true },
20                                 cpufreq_3 = { color = "00ffff", title = "Core 3", noarea=true, overlay=true }
21                         }
22                 }
23         }
24 end
25