Globally reduce copyright headers
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / processes.lua
1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
2 -- Licensed to the public under the Apache License 2.0.
3
4 module("luci.statistics.rrdtool.definitions.processes", package.seeall)
5
6 function rrdargs( graph, plugin, plugin_instance, dtype )
7
8 return {
9 {
10 title = "%H: Processes",
11 vlabel = "Processes/s",
12 data = {
13 instances = {
14 ps_state = {
15 "sleeping", "running", "paging", "blocked", "stopped", "zombies"
16 }
17 },
18
19 options = {
20 ps_state_sleeping = { color = "0000ff" },
21 ps_state_running = { color = "008000" },
22 ps_state_paging = { color = "ffff00" },
23 ps_state_blocked = { color = "ff5000" },
24 ps_state_stopped = { color = "555555" },
25 ps_state_zombies = { color = "ff0000" }
26 }
27 }
28 },
29
30 {
31 title = "%H: CPU time used by %pi",
32 vlabel = "Jiffies",
33 data = {
34 sources = {
35 ps_cputime = { "syst", "user" }
36 },
37
38 options = {
39 ps_cputime__user = {
40 color = "0000ff",
41 overlay = true
42 },
43
44 ps_cputime__syst = {
45 color = "ff0000",
46 overlay = true
47 }
48 }
49 }
50 },
51
52 {
53 title = "%H: Threads and processes belonging to %pi",
54 vlabel = "Count",
55 detail = true,
56 data = {
57 sources = {
58 ps_count = { "threads", "processes" }
59 },
60
61 options = {
62 ps_count__threads = { color = "00ff00" },
63 ps_count__processes = { color = "0000bb" }
64 }
65 }
66 },
67
68 {
69 title = "%H: Page faults in %pi",
70 vlabel = "Pagefaults",
71 detail = true,
72 data = {
73 sources = {
74 ps_pagefaults = { "minflt", "majflt" }
75 },
76
77 options = {
78 ps_pagefaults__minflt = { color = "ff0000" },
79 ps_pagefaults__majflt = { color = "ff5500" }
80 }
81 }
82 },
83
84 {
85 title = "%H: Virtual memory size of %pi",
86 vlabel = "Bytes",
87 detail = true,
88 number_format = "%5.1lf%sB",
89 data = {
90 types = { "ps_rss" },
91
92 options = {
93 ps_rss = { color = "0000ff" }
94 }
95 }
96 }
97 }
98 end