disk.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
  2. -- Licensed to the public under the Apache License 2.0.
  3. module("luci.statistics.rrdtool.definitions.disk", package.seeall)
  4. function rrdargs( graph, plugin, plugin_instance, dtype )
  5. return {
  6. {
  7. title = "%H: Disk I/O operations on %pi",
  8. vlabel = "Operations/s",
  9. number_format = "%5.1lf%sOp/s",
  10. data = {
  11. types = { "disk_ops" },
  12. sources = {
  13. disk_ops = { "read", "write" },
  14. },
  15. options = {
  16. disk_ops__read = {
  17. title = "Reads",
  18. color = "00ff00",
  19. flip = false
  20. },
  21. disk_ops__write = {
  22. title = "Writes",
  23. color = "ff0000",
  24. flip = true
  25. }
  26. }
  27. }
  28. },
  29. {
  30. title = "%H: Disk I/O bandwidth on %pi",
  31. vlabel = "Bytes/s",
  32. number_format = "%5.1lf%sB/s",
  33. detail = true,
  34. data = {
  35. types = { "disk_octets" },
  36. sources = {
  37. disk_octets = { "read", "write" }
  38. },
  39. options = {
  40. disk_octets__read = {
  41. title = "Read",
  42. color = "00ff00",
  43. flip = false
  44. },
  45. disk_octets__write = {
  46. title = "Write",
  47. color = "ff0000",
  48. flip = true
  49. }
  50. }
  51. }
  52. }
  53. }
  54. end