statistics: cpu graph - add label definitions, add softirq and interrupt stats
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / cpu.lua
1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
3
4 module("luci.statistics.rrdtool.definitions.cpu",package.seeall)
5
6 function rrdargs( graph, plugin, plugin_instance, dtype )
7
8         return {
9                 title = "%H: Processor usage on core #%pi",
10                 y_min = "0",
11                 vlabel = "Percent",
12                 number_format = "%5.1lf%%",
13                 data = {
14                         instances = { 
15                                 cpu = { "idle", "user", "nice", "system", "softirq", "interrupt" }
16                         },
17
18                         options = {
19                                 cpu_idle      = { color = "ffffff", title = "Idle" },
20                                 cpu_nice      = { color = "00e000", title = "Nice" },
21                                 cpu_user      = { color = "0000ff", title = "User" },
22                                 cpu_wait      = { color = "ffb000", title = "Wait" },
23                                 cpu_system    = { color = "ff0000", title = "System" },
24                                 cpu_softirq   = { color = "ff00ff", title = "Softirq" },
25                                 cpu_interrupt = { color = "a000a0", title = "Interrupt" },
26                                 cpu_steal     = { color = "000000", title = "Steal" }
27                         }
28                 }
29         }
30 end