adc3f284b2446de35eb5950393775f945365fbfb
[project/luci.git] / applications / luci-statistics / luasrc / statistics / rrdtool / definitions / cpu.lua
1 --[[
2
3 Luci statistics - cpu plugin diagram definition
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id: cpu.lua 2274 2008-06-03 23:15:16Z jow $
13
14 ]]--
15
16 module("luci.statistics.rrdtool.definitions.cpu",package.seeall)
17
18 function rrdargs( graph, plugin, plugin_instance, dtype )
19
20         return {
21                 title = "%H: Processor usage on core #%pi",
22                 vlabel = "Percent",
23                 number_format = "%5.1lf%%",
24                 data = {
25                         instances = { 
26                                 cpu = { "idle", "user", "system", "nice" }
27                         },
28
29                         options = {
30                                 cpu_idle      = { color = "ffffff" },
31                                 cpu_nice      = { color = "00e000" },
32                                 cpu_user      = { color = "0000ff" },
33                                 cpu_wait      = { color = "ffb000" },
34                                 cpu_system    = { color = "ff0000" },
35                                 cpu_softirq   = { color = "ff00ff" },
36                                 cpu_interrupt = { color = "a000a0" },
37                                 cpu_steal     = { color = "000000" }
38                         }
39                 }
40         }
41 end