1
0

cpu.lua 1008 B

12345678910111213141516171819202122232425262728293031
  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.cpu",package.seeall)
  4. function rrdargs( graph, plugin, plugin_instance, dtype )
  5. return {
  6. title = "%H: Processor usage on core #%pi",
  7. y_min = "0",
  8. alt_autoscale_max = true,
  9. vlabel = "Percent",
  10. number_format = "%5.1lf%%",
  11. data = {
  12. instances = {
  13. cpu = { "user", "nice", "system", "softirq", "interrupt" }
  14. },
  15. options = {
  16. cpu_idle = { color = "ffffff", title = "Idle" },
  17. cpu_nice = { color = "00e000", title = "Nice" },
  18. cpu_user = { color = "0000ff", title = "User" },
  19. cpu_wait = { color = "ffb000", title = "Wait" },
  20. cpu_system = { color = "ff0000", title = "System" },
  21. cpu_softirq = { color = "ff00ff", title = "Softirq" },
  22. cpu_interrupt = { color = "a000a0", title = "Interrupt" },
  23. cpu_steal = { color = "000000", title = "Steal" }
  24. }
  25. }
  26. }
  27. end