1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
4 module("luci.statistics.rrdtool.definitions.cpu",package.seeall)
6 local uci = require("luci.model.uci").cursor()
7 local reportbystate = uci:get("luci_statistics", "collectd_cpu", "ReportByState") or "0"
10 return luci.i18n.translate("Processor")
13 function rrdargs( graph, plugin, plugin_instance, dtype )
16 local title = "%H: Processor usage"
17 if #plugin_instance > 0 then
18 title = "%H: Processor usage on core #%pi"
21 if reportbystate == "1" then
25 alt_autoscale_max = true,
27 number_format = "%5.1lf",
81 alt_autoscale_max = true,
83 number_format = "%5.1lf%%",
102 percent_interrupt = {
134 local types = graph.tree:data_types( plugin, plugin_instance )
136 for _, t in ipairs(types) do
141 if t == "percent" then
149 alt_autoscale_max = true,
151 number_format = "%5.1lf%%",