disk.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
  3. * Licensed to the public under the Apache License 2.0.
  4. */
  5. 'use strict';
  6. 'require baseclass';
  7. return baseclass.extend({
  8. title: _('Disk Usage'),
  9. rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
  10. return [{
  11. title: "%H: Disk I/O operations on %pi",
  12. vlabel: "Operations/s",
  13. number_format: "%5.1lf%sOp/s",
  14. data: {
  15. types: [ "disk_ops" ],
  16. sources: {
  17. disk_ops: [ "read", "write" ],
  18. },
  19. options: {
  20. disk_ops__read: {
  21. title: "Reads",
  22. color: "00ff00",
  23. flip : false
  24. },
  25. disk_ops__write: {
  26. title: "Writes",
  27. color: "ff0000",
  28. flip : true
  29. }
  30. }
  31. }
  32. }, {
  33. title: "%H: Disk I/O bandwidth on %pi",
  34. vlabel: "Bytes/s",
  35. number_format: "%5.1lf%sB/s",
  36. detail: true,
  37. data: {
  38. types: [ "disk_octets" ],
  39. sources: {
  40. disk_octets: [ "read", "write" ]
  41. },
  42. options: {
  43. disk_octets__read: {
  44. title: "Read",
  45. color: "00ff00",
  46. flip : false
  47. },
  48. disk_octets__write: {
  49. title: "Write",
  50. color: "ff0000",
  51. flip : true
  52. }
  53. }
  54. }
  55. }];
  56. }
  57. });