SHARE
TWEET

axp209_template_battery.conf

a guest Jan 28th, 2016 179 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ########################################################################
  2. # Extract A10/A20/A13/R8/AXP209 information
  3. #  Page: 1
  4. #  Information               Status     Statistics
  5. #  - cpu frequency           - yes      - yes
  6. #  - cpu load 1, 5, 15       - yes      - yes
  7. #  - cpu scaling governor    - yes      - no
  8. #  - power in voltage        - yes      - yes
  9. #  - power in consumption    - yes      - yes
  10. #  - USB OTG voltage         - yes      - yes
  11. #  - USB OTG consumption     - yes      - yes
  12. #  - battery voltage         - yes      - yes
  13. #  - battery consumption     - yes      - yes
  14. #  - battery capacity (in %) - yes      - yes
  15. #  - total consumption       - yes      - yes
  16. #  - power in current        - yes      - yes
  17. #  - USB OTG current         - yes      - yes
  18. #  - battery current         - yes      - yes
  19. #  - soc temperature         - yes      - yes
  20. #  - pmic temperature        - yes      - yes
  21. #  
  22. ########################################################################
  23. dynamic.1.name=cpu_frequency
  24. dynamic.1.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
  25. dynamic.1.regexp=(.*)
  26. dynamic.1.postprocess=$1/1000
  27. dynamic.1.rrd=GAUGE
  28.  
  29. dynamic.2.name=load1,load5,load15
  30. dynamic.2.source=/proc/loadavg
  31. dynamic.2.regexp=^(\S+)\s(\S+)\s(\S+)
  32. dynamic.2.postprocess=
  33. dynamic.2.rrd=GAUGE
  34.  
  35. dynamic.3.name=scaling_governor
  36. dynamic.3.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  37. dynamic.3.regexp=(.*)
  38. dynamic.3.postprocess=
  39. dynamic.3.rrd=
  40.  
  41. dynamic.4.name=ac_voltage
  42. dynamic.4.source=/etc/armbianmonitor/datasources/ac_voltage
  43. dynamic.4.regexp=(.*)
  44. dynamic.4.postprocess=sprintf("%.2f", $1/1000000)
  45. dynamic.4.rrd=GAUGE
  46.  
  47. dynamic.5.name=ac_consumption
  48. dynamic.5.source=/etc/armbianmonitor/datasources/ac_current
  49. dynamic.5.regexp=(.*)
  50. dynamic.5.postprocess=sprintf("%.2f", $1/1000000 * $this->{'dynamic'}->{'ac_voltage'})
  51. dynamic.5.rrd=GAUGE
  52.  
  53. dynamic.6.name=usb_voltage
  54. dynamic.6.source=/etc/armbianmonitor/datasources/usb_voltage
  55. dynamic.6.regexp=(.*)
  56. dynamic.6.postprocess=sprintf("%.2f", $1/1000000)
  57. dynamic.6.rrd=GAUGE
  58.  
  59. dynamic.7.name=usb_consumption
  60. dynamic.7.source=/etc/armbianmonitor/datasources/usb_current
  61. dynamic.7.regexp=(.*)
  62. dynamic.7.postprocess=sprintf("%.2f", $1/1000000 * $this->{'dynamic'}->{'usb_voltage'})
  63. dynamic.7.rrd=GAUGE
  64.  
  65. dynamic.8.name=battery_voltage
  66. dynamic.8.source=/etc/armbianmonitor/datasources/battery_voltage
  67. dynamic.8.regexp=(.*)
  68. dynamic.8.postprocess=sprintf("%.2f", $1/1000000)
  69. dynamic.8.rrd=GAUGE
  70.  
  71. dynamic.9.name=battery_consumption
  72. dynamic.9.source=/etc/armbianmonitor/datasources/battery_current
  73. dynamic.9.regexp=(.*)
  74. dynamic.9.postprocess=sprintf("%.2f", $1/1000000 * $this->{'dynamic'}->{'battery_voltage'})
  75. dynamic.9.rrd=GAUGE
  76.  
  77. dynamic.10.name=total_consumption
  78. dynamic.10.source=/etc/armbianmonitor/datasources/ac_current
  79. dynamic.10.regexp=(.*)
  80. dynamic.10.postprocess=sprintf("%.2f", $1/1000000 * $this->{'dynamic'}->{'ac_voltage'} + $this->{'dynamic'}->{'battery_consumption'} + $this->{'dynamic'}->{'usb_consumption'})
  81. dynamic.10.rrd=GAUGE
  82.  
  83. dynamic.11.name=usb_current
  84. dynamic.11.source=/etc/armbianmonitor/datasources/usb_current
  85. dynamic.11.regexp=(.*)
  86. dynamic.11.postprocess=sprintf("%.2f", $1/1000000)
  87. dynamic.11.rrd=GAUGE
  88.  
  89. dynamic.12.name=ac_current
  90. dynamic.12.source=/etc/armbianmonitor/datasources/ac_current
  91. dynamic.12.regexp=(.*)
  92. dynamic.12.postprocess=sprintf("%.2f", $1/1000000)
  93. dynamic.12.rrd=GAUGE
  94.  
  95. dynamic.13.name=battery_current
  96. dynamic.13.source=/etc/armbianmonitor/datasources/battery_current
  97. dynamic.13.regexp=(.*)
  98. dynamic.13.postprocess=sprintf("%.2f", $1/1000000)
  99. dynamic.13.rrd=GAUGE
  100.  
  101. dynamic.14.name=pmic_temp
  102. dynamic.14.source=/etc/armbianmonitor/datasources/pmictemp
  103. dynamic.14.regexp=(.*)
  104. dynamic.14.postprocess=sprintf("%.1f", $1/1000)
  105. dynamic.14.rrd=GAUGE
  106.  
  107. dynamic.15.name=soc_temp
  108. dynamic.15.source=/etc/armbianmonitor/datasources/soctemp
  109. dynamic.15.regexp=(.*)
  110. dynamic.15.postprocess=sprintf("%.1f", $1/1000)
  111. dynamic.15.rrd=GAUGE
  112.  
  113. dynamic.16.name=battery_percent
  114. dynamic.16.source=/etc/armbianmonitor/datasources/battery_percent
  115. dynamic.16.regexp=(.*)
  116. dynamic.16.postprocess=
  117. dynamic.16.rrd=GAUGE
  118.  
  119. dynamic.17.name=charger_current
  120. dynamic.17.source=/etc/armbianmonitor/datasources/charger_current
  121. dynamic.17.regexp=(.*)
  122. dynamic.17.postprocess=sprintf("%.2f", $1/1000000)
  123. dynamic.17.rrd=GAUGE
  124.  
  125. dynamic.18.name=battery_charging
  126. dynamic.18.source=/etc/armbianmonitor/datasources/battery_charging
  127. dynamic.18.regexp=(.*)
  128.  
  129. dynamic.19.name=battery_charged
  130. dynamic.19.source=/etc/armbianmonitor/datasources/battery_charging
  131. dynamic.19.regexp=(.*)
  132. dynamic.19.postprocess=$1 + $this->{'dynamic'}->{'battery_current'}
  133.  
  134. dynamic.20.name=battery_connected
  135. dynamic.20.source=/etc/armbianmonitor/datasources/battery_connected
  136. dynamic.20.regexp=(.*)
  137.  
  138. web.status.1.content.1.name=CPU
  139. web.status.1.content.1.icon=cpu.png
  140. web.status.1.content.1.line.1="Loads: <b>" + data.load1 + "</b> [1min] - <b>" + data.load5 + "</b> [5min] - <b>" + data.load15 + "</b> [15min]"
  141. web.status.1.content.1.line.2="CPU frequency: <b>" + data.cpu_frequency + "MHz</b> &nbsp;Governor: <b>" + data.scaling_governor + "</b>"
  142.  
  143. # Board powered through battery
  144. web.status.1.content.2.name=PMU
  145. web.status.1.content.2.icon=pmu.png
  146. web.status.1.content.2.line.1="Reported PMU Consumption: <b>" + data.total_consumption + " W</b> &nbsp;"+Label(data.battery_current,">0","Battery Discharging","label-warning")+Label(data.battery_charging,"==1","Battery Charging","label-success")+Label(data.battery_charged,"==0","Battery Charged","label-default")
  147. web.status.1.content.2.line.2="DC-IN in: <b>" + data.ac_consumption + " W</b> USB OTG in: <b>" + data.usb_consumption + " W</b> BATT in: <b>" + data.battery_consumption + " W</b>"
  148. web.status.1.content.2.line.3=JustGageBar("Battery Capacity", "%",0, data.battery_percent , 100,100,80,percentColors,1000,1000)+" "+JustGageBar("Battery Voltage", "V",3, data.battery_voltage , 5,100,80,percentColors,1000,1000)+" "+JustGageBar("Battery Amperage", "A",0, data.battery_current , 2,100,80,percentColors,1000,1000)
  149. web.status.1.content.2.visibility=data.battery_current
  150.  
  151. # Board powered through DC-IN
  152. web.status.1.content.3.name=PMU
  153. web.status.1.content.3.icon=pmu.png
  154. web.status.1.content.3.line.1="Reported PMU Consumption: <b>" + data.total_consumption + " W</b> &nbsp;"+Label(data.battery_current,">0","Battery Discharging","label-warning")+Label(data.battery_charging,"==1","Battery Charging","label-success")+Label(data.battery_charged,"==0","Battery Charged","label-default")
  155. web.status.1.content.3.line.2="DC-IN in: <b>" + data.ac_consumption + " W</b> USB OTG in: <b>" + data.usb_consumption + " W</b> BATT in: <b>" + data.battery_consumption + " W</b>"
  156. web.status.1.content.3.line.3=JustGageBar("Battery Capacity", "%",0, data.battery_percent , 100,100,80,percentColors,1000,1000)+" "+JustGageBar("DC-IN Voltage", "V",3, data.ac_voltage , 5,100,80,percentColors,1000,1000)+" "+JustGageBar("DC-IN Amperage", "A",0, data.ac_current , 2,100,80,percentColors,1000,1000)
  157. web.status.1.content.3.visibility=data.ac_current
  158.  
  159. # Board powered through USB OTG
  160. web.status.1.content.4.name=PMU
  161. web.status.1.content.4.icon=pmu.png
  162. web.status.1.content.4.line.1="Reported PMU Consumption: <b>" + data.total_consumption + " W</b> &nbsp;"+Label(data.battery_current,">0","Battery Discharging","label-warning")+Label(data.battery_charging,"==1","Battery Charging","label-success")+Label(data.battery_charged,"==0","Battery Charged","label-default")
  163. web.status.1.content.4.line.2="DC-IN in: <b>" + data.ac_consumption + " W</b> USB OTG in: <b>" + data.usb_consumption + " W</b> BATT in: <b>" + data.battery_consumption + " W</b>"
  164. web.status.1.content.4.line.3=JustGageBar("Battery Capacity", "%",0, data.battery_percent , 100,100,80,percentColors,1000,1000)+" "+JustGageBar("USB OTG Voltage", "V",3, data.usb_voltage , 5,100,80,percentColors,1000,1000)+" "+JustGageBar("USB OTG Amperage", "A",0, data.usb_current , 2,100,80,percentColors,1000,1000)
  165. web.status.1.content.4.visibility=data.usb_current
  166.  
  167. web.status.1.content.5.name=Temperature
  168. web.status.1.content.5.icon=cpu_temp.png
  169. web.status.1.content.5.line.1=JustGageBar("SoC", "°C",0, data.soc_temp , 100,100,80,percentColors,50,60)+" "+JustGageBar("PMU", "°C",0, data.pmic_temp , 100,100,80,percentColors,45,55)
  170.  
  171. web.statistics.1.content.1.name=Load / cpufreq / Consumption
  172. web.statistics.1.content.1.graph.1=load1
  173. web.statistics.1.content.1.graph.2=load5
  174. web.statistics.1.content.1.graph.3=load15
  175. web.statistics.1.content.1.graph.4=total_consumption
  176. web.statistics.1.content.1.graph.5=cpu_frequency
  177. web.statistics.1.content.1.ds_graph_options.load1.label=Load 1 min
  178. web.statistics.1.content.1.ds_graph_options.load5.label=Load 5 min
  179. web.statistics.1.content.1.ds_graph_options.load15.label=Load 15 min
  180. web.statistics.1.content.1.ds_graph_options.total_consumption.label=Consumption (W)
  181. web.statistics.1.content.1.ds_graph_options.cpu_frequency.label=Clock speed (MHz)
  182. web.statistics.1.content.1.ds_graph_options.cpu_frequency.yaxis=2
  183. web.statistics.1.content.1.graph_options.y2axis={ position: "right" }
  184.  
  185. web.statistics.1.content.2.name=PMU current/voltage
  186. web.statistics.1.content.2.graph.1=ac_voltage
  187. web.statistics.1.content.2.graph.2=usb_voltage
  188. web.statistics.1.content.2.graph.3=battery_voltage
  189. web.statistics.1.content.2.graph.4=ac_current
  190. web.statistics.1.content.2.graph.5=usb_current
  191. web.statistics.1.content.2.graph.6=battery_current
  192. web.statistics.1.content.2.ds_graph_options.ac_voltage.label=Voltage DC-IN (V)
  193. web.statistics.1.content.2.ds_graph_options.usb_voltage.label=Voltage USB OTG (V)
  194. web.statistics.1.content.2.ds_graph_options.battery_voltage.label=Voltage LiPo (V)
  195. web.statistics.1.content.2.ds_graph_options.ac_current.label=Current DC-IN (A)
  196. web.statistics.1.content.2.ds_graph_options.usb_current.label=Current USB OTG (A)
  197. web.statistics.1.content.2.ds_graph_options.battery_current.label=Current LiPo (A)
  198. web.statistics.1.content.2.ds_graph_options.ac_voltage.yaxis=1
  199. web.statistics.1.content.2.ds_graph_options.usb_voltage.yaxis=1
  200. web.statistics.1.content.2.ds_graph_options.battery_voltage.yaxis=1
  201. web.statistics.1.content.2.ds_graph_options.ac_current.yaxis=2
  202. web.statistics.1.content.2.ds_graph_options.usb_current.yaxis=2
  203. web.statistics.1.content.2.ds_graph_options.battery_current.yaxis=2
  204. web.statistics.1.content.2.graph_options.y1axis={ position: "left", min: 1.5, max: 11 }
  205. web.statistics.1.content.2.graph_options.y2axis={ position: "right" }
  206.  
  207. web.statistics.1.content.3.name=Temperature / Consumption
  208. web.statistics.1.content.3.graph.1=pmic_temp
  209. web.statistics.1.content.3.graph.2=soc_temp
  210. web.statistics.1.content.3.graph.3=total_consumption
  211. web.statistics.1.content.3.ds_graph_options.pmic_temp.label=PMU temperature (°C)
  212. web.statistics.1.content.3.ds_graph_options.soc_temp.label=SoC temperature (°C)
  213. web.statistics.1.content.3.ds_graph_options.total_consumption.label=Consumption (W)
  214. web.statistics.1.content.3.ds_graph_options.total_consumption.yaxis=2
  215. web.statistics.1.content.3.graph_options.y1axis={ position: "left", min: 0, max: 70 }
  216. web.statistics.1.content.3.graph_options.y2axis={ position: "right" }
  217.  
  218. web.statistics.1.content.4.name=Battery
  219. web.statistics.1.content.4.graph.1=battery_voltage
  220. web.statistics.1.content.4.graph.2=battery_current
  221. web.statistics.1.content.4.graph.3=charger_current
  222. web.statistics.1.content.4.graph.4=ac_current
  223. web.statistics.1.content.4.graph.5=battery_percent
  224. web.statistics.1.content.4.ds_graph_options.battery_voltage.label=Battery Voltage (V)
  225. web.statistics.1.content.4.ds_graph_options.battery_current.label=Battery Amperage (A)
  226. web.statistics.1.content.4.ds_graph_options.charger_current.label=Charger Amperage (A)
  227. web.statistics.1.content.4.ds_graph_options.ac_current.label=DC-IN Amperage (A)
  228. web.statistics.1.content.4.ds_graph_options.battery_percent.label=Percentage (%)
  229. web.statistics.1.content.4.ds_graph_options.battery_voltage.yaxis=1
  230. web.statistics.1.content.4.ds_graph_options.battery_current.yaxis=1
  231. web.statistics.1.content.4.ds_graph_options.charger_current.yaxis=1
  232. web.statistics.1.content.4.ds_graph_options.ac_current.yaxis=1
  233. web.statistics.1.content.4.ds_graph_options.battery_percent.yaxis=2
  234. web.statistics.1.content.4.graph_options.y1axis={ position: "left" }
  235. web.statistics.1.content.4.graph_options.y2axis={ position: "right", min: 1, max: 100 }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top