Merge pull request #1818 from dibdot/lxc_fix
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / memory.lua
1 --[[
2
3 (c) 2011 Manuel Munz <freifunk at somakoma dot de>
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9         http://www.apache.org/licenses/LICENSE-2.0
10 ]]--
11
12 module("luci.statistics.rrdtool.definitions.memory",package.seeall)
13
14 function rrdargs( graph, plugin, plugin_instance, dtype )
15
16         return {
17                 title = "%H: Memory usage",
18                 vlabel = "MB",
19                 number_format = "%5.1lf%s",
20                 y_min = "0",
21                 alt_autoscale_max = true,
22                 data = {
23                         instances = { 
24                                 memory = { "free", "buffered", "cached", "used" }
25                         },
26
27                         options = {
28                                 memory_buffered = { color = "0000ff", title = "Buffered" },
29                                 memory_cached   = { color = "ff00ff", title = "Cached" },
30                                 memory_used     = { color = "ff0000", title = "Used" },
31                                 memory_free     = { color = "00ff00", title = "Free" }
32                         }
33                 }
34         }
35 end