Advertisement
Guest User

pmu_bananian.conf

a guest
Oct 23rd, 2014
703
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ########################################################################
  2. # Extract PMU information
  3. # Page: 1
  4. # Information Status Statistics
  5. # - pmu usb voltage - no - yes
  6. # - pmu pwr voltage - no - yes
  7. # - pmu usb current - no - yes
  8. # - pmu pwr current - no - yes
  9. # - PWR consumption - yes - no
  10. # - USB consumption - yes - no
  11. #
  12. # logo from http://www.apkdad.com/wp-content/uploads/2013/01/Battery-Icon1.png
  13. ########################################################################
  14. dynamic.1.name=pmu_usb_voltage
  15. dynamic.1.source=/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/usb/voltage_now
  16. dynamic.1.regexp=(.*)
  17. dynamic.1.postprocess=$1/1000000
  18. dynamic.1.rrd=GAUGE
  19.  
  20. dynamic.2.name=pmu_ac_voltage
  21. dynamic.2.source=/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/voltage_now
  22. dynamic.2.regexp=(.*)
  23. dynamic.2.postprocess=$1/1000000
  24. dynamic.2.rrd=GAUGE
  25.  
  26. dynamic.3.name=pmu_usb_current
  27. dynamic.3.source=/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/usb/current_now
  28. dynamic.3.regexp=(.*)
  29. dynamic.3.postprocess=$1/1000
  30. dynamic.3.rrd=GAUGE
  31.  
  32. dynamic.4.name=pmu_ac_current
  33. dynamic.4.source=/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/current_now
  34. dynamic.4.regexp=(.*)
  35. dynamic.4.postprocess=$1/1000
  36. dynamic.4.rrd=GAUGE
  37.  
  38. dynamic.5.name=pmu_usb_consumption
  39. dynamic.5.source=/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/usb/current_now
  40. dynamic.5.regexp=(.*)
  41. dynamic.5.postprocess=$this->{'dynamic'}->{'pmu_usb_voltage'} * $1 / 1000
  42. dynamic.5.rrd=GAUGE
  43.  
  44. dynamic.6.name=pmu_ac_consumption
  45. dynamic.6.source=/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/current_now
  46. dynamic.6.regexp=(.*)
  47. dynamic.6.postprocess=$this->{'dynamic'}->{'pmu_ac_voltage'} * $1 / 1000
  48. dynamic.6.rrd=GAUGE
  49.  
  50. dynamic.7.name=pmu_cur_temp
  51. dynamic.7.source=/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input
  52. dynamic.7.regexp=(.*)
  53. dynamic.7.postprocess=$1/1000
  54. dynamic.7.rrd=GAUGE
  55.  
  56. web.status.1.content.1.name=Consumption
  57. web.status.1.content.1.icon=pmu.png
  58. web.status.1.content.1.line.1="PWR in: <b>" + data.pmu_ac_consumption + " mW</b> USB OTG in: <b>" + data.pmu_usb_consumption + " mW</b>"
  59.  
  60. web.statistics.1.content.1.name=PMU current/voltage
  61. web.statistics.1.content.1.graph.1=pmu_ac_voltage
  62. web.statistics.1.content.1.graph.2=pmu_usb_voltage
  63. web.statistics.1.content.1.graph.3=pmu_ac_current
  64. web.statistics.1.content.1.graph.4=pmu_usb_current
  65. web.statistics.1.content.1.ds_graph_options.pmu_ac_voltage.label=Voltage PWR in (V)
  66. web.statistics.1.content.1.ds_graph_options.pmu_usb_voltage.label=Voltage USB in (V)
  67. web.statistics.1.content.1.ds_graph_options.pmu_ac_current.label=Current PWR in (mA)
  68. web.statistics.1.content.1.ds_graph_options.pmu_usb_current.label=Current USB in (mA)
  69. web.statistics.1.content.1.ds_graph_options.pmu_ac_voltage.yaxis=1
  70. web.statistics.1.content.1.ds_graph_options.pmu_usb_voltage.yaxis=1
  71. web.statistics.1.content.1.ds_graph_options.pmu_ac_current.yaxis=2
  72. web.statistics.1.content.1.ds_graph_options.pmu_usb_current.yaxis=2
  73. web.statistics.1.content.1.graph_options.y1axis={ position: "left", min: 4.5, max: 5.5 }
  74. web.statistics.1.content.1.graph_options.y2axis={ position: "right" }
  75.  
  76. web.statistics.1.content.2.name=Consumption / temperature
  77. web.statistics.1.content.2.graph.1=pmu_ac_consumption
  78. web.statistics.1.content.2.graph.2=pmu_usb_consumption
  79. web.statistics.1.content.2.graph.3=pmu_cur_temp
  80. web.statistics.1.content.2.ds_graph_options.pmu_ac_consumption.label=Consumption (W)
  81. web.statistics.1.content.2.ds_graph_options.pmu_usb_consumption.label=USB devices (W)
  82. web.statistics.1.content.2.ds_graph_options.pmu_cur_temp.label="Current PMU temp (&#176;C)"
  83. web.statistics.1.content.2.ds_graph_options.pmu_cur_temp.yaxis=2
  84. web.statistics.1.content.2.graph_options.y2axis={ position: "right" }
Advertisement
RAW Paste Data Copied
Advertisement