luci/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua
Hannu Nyman 4343b2f13d luci-app-statistics: tweak 'cpufreq' number formatting
Adjust number formatting to display >1GHz values better.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-11-08 22:54:44 +02:00

25 lines
750 B
Lua

-- 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 = "%3.2lf%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