luci-app-statistics: cpufreq: tweak graphs
authorHannu Nyman <hannu.nyman@iki.fi>
Wed, 14 Aug 2019 15:53:03 +0000 (18:53 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Wed, 14 Aug 2019 16:03:27 +0000 (19:03 +0300)
* Frequency usage percentage stats are by kHz instead of Hz.
  Correct the labels. (Linux natively uses kHz for CPU frequency stats,
  but collectd scales the current frequency stats item to Hz.)

* Show frequency usage percentage graph before the transition counts,
  as it is more descriptive.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 24c0e7ca4c9d9fbffc94133e710facdb039fedab)

applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua

index d3596637b22330223f4abf5ea138527b30ccd48b..cb7ae53afa6c76c20bb699ccf90ba24a3458e089 100644 (file)
@@ -48,12 +48,12 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                data = {
                        types = { "percent" },
                        options = {
-                               percent = { title = "%di Hz", negweight = true },
+                               percent = { title = "%di kHz", negweight = true },
                        }
                }
        }
 
-       return { cpufreq, transitions, percentage }
+       return { cpufreq, percentage, transitions }
     else
        return { cpufreq }
     end