summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/luasrc/statistics/rrdtool
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-statistics/luasrc/statistics/rrdtool')
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua25
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua20
2 files changed, 45 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..25a72d2285
--- /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 = "%3.2lf%s",
+ data = {
+ sources = {
+ cpufreq = { "" }
+ },
+ 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
+
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua
new file mode 100644
index 0000000000..532246465e
--- /dev/null
+++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua
@@ -0,0 +1,20 @@
+-- Licensed to the public under the Apache License 2.0.
+
+module("luci.statistics.rrdtool.definitions.thermal",package.seeall)
+
+function rrdargs( graph, plugin, plugin_instance, dtype )
+
+ return {
+ title = "%H: Temperature of %pi",
+ alt_autoscale = true,
+ vlabel = "Celsius",
+ number_format = "%3.1lf%s",
+ data = {
+ types = { "temperature" },
+ options = {
+ temperature = { color = "ff0000", title = "Temperature", noarea=true },
+ }
+ }
+ }
+end
+