f2b4c0f06af9ae1441baff6ae9e2b801fcc86736
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / disk.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.disk", package.seeall)
5
6 function rrdargs( graph, plugin, plugin_instance, dtype )
7         return {
8                 {
9                         title = "%H: Disk I/O operations on %pi",
10                         vlabel = "Operations/s",
11                         number_format = "%5.1lf%sOp/s",
12
13                         data = {
14                                 types = { "disk_ops" },
15                                 sources = {
16                                         disk_ops = { "read", "write" },
17                                 },
18
19                                 options = {
20                                         disk_ops__read = {
21                                                 title = "Reads",
22                                                 color = "00ff00",
23                                                 flip  = false
24                                         },
25
26                                         disk_ops__write = {
27                                                 title = "Writes",
28                                                 color = "ff0000",
29                                                 flip  = true
30                                         }
31                                 }
32                         }
33                 },
34
35                 {
36                         title = "%H: Disk I/O bandwidth on %pi",
37                         vlabel = "Bytes/s",
38                         number_format = "%5.1lf%sB/s",
39
40                         detail = true,
41
42                         data = {
43                                 types = { "disk_octets" },
44                                 sources = {
45                                         disk_octets = { "read", "write" }
46                                 },
47                                 options = {
48                                         disk_octets__read = {
49                                                 title = "Read",
50                                                 color = "00ff00",
51                                                 flip  = false
52                                         },
53                                         disk_octets__write = {
54                                                 title = "Write",
55                                                 color = "ff0000",
56                                                 flip  = true
57                                         }
58                                 }
59                         }
60                 }
61         }
62 end