Netdata Community

How to see energy rate

I’m using ubuntu 20.04 with docker.
Do i have a way to enable in the config “power”, “current now” like so:
batter power = yes
batter voltage_now = yes

Supported metrics according to proc.plugin · Netdata Agent | Learn Netdata :

  1. Capacity: The power supply capacity expressed as a percentage.
  • capacity_now
  1. Charge: The charge for the power supply, expressed as amphours.
  • charge_full_design
  • charge_full
  • charge_now
  • charge_empty
  • charge_empty_design
  1. Energy: The energy for the power supply, expressed as watthours.
  • energy_full_design
  • energy_full
  • energy_now
  • energy_empty
  • energy_empty_design
  1. Voltage: The voltage for the power supply, expressed as volts.
  • voltage_max_design
  • voltage_max
  • voltage_now
  • voltage_min
  • voltage_min_design

Do you think we should extend exposed metrics and add power and current?

It might be Ubuntu 20.04 but something is definitely missing here.
Do i have a way to print the current/voltage value from terminal?
I want to test if it makes sense.
What about upower? upower/src at master · freedesktop/upower · GitHub

I found it installed in ubuntu and it is reporting everything, maybe a plugin for it?

You can simply run cat /host/sys/class/power_supply/BAT0/voltage_now.

By using

path="/host/sys/class/power_supply/BAT0"; value=$(echo "scale=1; $(cat ${path}/current_now) * $(cat ${path}/voltage_now) / 10^12" | bc); [[ $value == "0" ]] && echo "" || echo "${value}W"

i do get a reasonable value so my answer is yes, “current_now”, “voltage_now” and its product in “Watts” shall be supported by this plugin so that we can have a clear overview especially when “energy” is not supported (which is strange)