diff options
author | Christian Schoenebeck <christian.schoenebeck@gmail.com> | 2015-08-24 09:49:11 +0200 |
---|---|---|
committer | Christian Schoenebeck <christian.schoenebeck@gmail.com> | 2015-08-24 09:49:11 +0200 |
commit | 5f3dadeb8d6cb40c5d27663091932ba241600558 (patch) | |
tree | c7c57342261924ef306a40368b73b4eabea86814 | |
parent | 37f6bd557d56dec0c98a4e25a1acd111203cb3b8 (diff) | |
parent | 9a06498dbdf5f5878d2ce86a4b9ac8abc9173bdc (diff) |
Merge pull request #450 from hnyman/stat-memory
statistics: support better autoscaling in rrdtool, improve memory graph's y-axis
-rw-r--r-- | applications/luci-app-statistics/luasrc/statistics/rrdtool.lua | 6 | ||||
-rw-r--r-- | applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua index 1f8f4ff88b..d8317a8177 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua @@ -457,6 +457,12 @@ function Graph._generic( self, opts, plugin, plugin_instance, dtype, index ) _ti ( _args, "-X" ) _ti ( _args, opts.units_exponent ) end + if opts.alt_autoscale then + _ti ( _args, "-A" ) + end + if opts.alt_autoscale_max then + _ti ( _args, "-M" ) + end -- store additional rrd options if opts.rrdopts then diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua index a1c65f56d7..53d559c599 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua @@ -17,6 +17,8 @@ function rrdargs( graph, plugin, plugin_instance, dtype ) title = "%H: Memory usage", vlabel = "MB", number_format = "%5.1lf%s", + y_min = "0", + alt_autoscale_max = true, data = { instances = { memory = { "free", "buffered", "cached", "used" } |