memory.lua 899 B

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