# How to see energy rate

**URL:** <https://community.netdata.cloud/t/how-to-see-energy-rate/1121>\
**Category:** Help\
**Tags:** agent\
**Created:** [March 29, 2021, 11:57am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121 "2021-03-29T11:57:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxdd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/maxdd/32/633_2.png) [@maxdd](https://community.netdata.cloud/u/maxdd)\
**Post date:** [March 29, 2021, 11:57am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/1 "2021-03-29T11:57:48Z")

</div>

Hi everyone,  
i was used to use either

`upower -i /org/freedesktop/UPower/devices/battery_BAT0`

or (when AC is connected)

`path="/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"`

to see my laptop power consumption till i have find this amazing netdata tool.  
Unfortunately my “Sensors” tab is only reporting voltages while my “Power Supply” tab is only showing current charge %.  
Is there a way to have access to the actual Watts or Wh?  
I’m using docker with the latest container.

Regards,

---

<div class="post-metadata">

**Author:** ![vlvkobal](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/vlvkobal/32/219_2.png) [@vlvkobal](https://community.netdata.cloud/u/vlvkobal)\
**Post date:** [March 29, 2021, 12:42pm UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/2 "2021-03-29T12:42:23Z")

</div>

You should enable the charts you need in Netdata [configuration](https://learn.netdata.cloud/docs/agent/collectors/proc.plugin#configuration-5)

```auto
[plugin:proc:/sys/class/power_supply]
	battery energy = yes

```

---

<div class="post-metadata">

**Author:** ![maxdd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/maxdd/32/633_2.png) [@maxdd](https://community.netdata.cloud/u/maxdd)\
**Post date:** [March 29, 2021, 1:12pm UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/3 "2021-03-29T13:12:57Z")

</div>

So if i make a copy of the conf from e.g. [http://localhost:19999/netdata.conf](http://localhost:19999/netdata.conf) and paste it with that command enabled in “./netdataconfig/” then according to docker command `-v ./netdataconfig:/etc/netdata` i should be good to go?  
Also is there a way to make a Gauge with such value in the “Overview of the key system metrics.”

EDIT:  
It seems that if i use ./netdataconfig:/etc/netdata:ro (e.g. local folder in order to copy/paste the new conf) as suggested for docker-compose, the tab “Sensor” disappears. I might open an issue on github soon

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [March 29, 2021, 2:38pm UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/4 "2021-03-29T14:38:59Z")

</div>

@maxdd check [Install Netdata with Docker | Learn Netdata](https://learn.netdata.cloud/docs/agent/packaging/docker#host-editable-configuration)

---

<div class="post-metadata">

**Author:** ![maxdd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/maxdd/32/633_2.png) [@maxdd](https://community.netdata.cloud/u/maxdd)\
**Post date:** [March 29, 2021, 2:52pm UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/5 "2021-03-29T14:52:38Z")

</div>

That’s the guide i’ve followed but without luck, the “Sensor” tab is disappearing without even touching the config itself. I might look into it tomorrow but i’ve double checked going back to default volumes and “Sensor” tab came back again

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [March 29, 2021, 4:15pm UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/6 "2021-03-29T16:15:54Z")

</div>

> [@maxdd](#):
>
> the “Sensor” tab is disappearing without even touching the config itself. I

Well, that indicates that there is a problem, lets check logs

> docker logs NAME 2\>&1 | grep -E -i “sensor|charts.d”

---

<div class="post-metadata">

**Author:** ![maxdd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/maxdd/32/633_2.png) [@maxdd](https://community.netdata.cloud/u/maxdd)\
**Post date:** [March 30, 2021, 6:33am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/7 "2021-03-30T06:33:11Z")

</div>

Here is the command

```
~/docker/netstat$ docker logs netdata 2>&1 | grep -E -i "sensor|charts.d"
    2021-03-30 06:38:11: netdata INFO : PLUGINSD[charts.d] : thread created with task id 150
    2021-03-30 06:38:11: netdata INFO : PLUGINSD[charts.d] : set name of thread 150 to PLUGINSD[charts
    2021-03-30 06:38:12: freeipmi.plugin ERROR : MAIN : ipmi_monitoring_sensor_readings_by_record_id(): internal syste m error (errno 2, No such file or directory)
    2021-03-30 06:38:13: netdata INFO : PLUGINSD[charts.d] : connected to '/usr/libexec/netdata/plugins.d/charts.d.pl ugin' running on pid 239
    2021-03-30 06:38:13: charts.d: INFO: main: started from '/usr/libexec/netdata/plugins.d/charts.d.plugin' with options: 1
    2021-03-30 06:38:13: charts.d: INFO: main: Configuration file '/usr/lib/netdata/conf.d/charts.d.conf' loaded.
    2021-03-30 06:38:13: charts.d: WARNING: main: Configuration file '/etc/netdata/charts.d.conf' not found.
    2021-03-30 06:38:13: charts.d: INFO: example: is disabled. Add a line with example=force in '/etc/netdata/charts.d.conf' to enable it (or remove the line that disables it).
    2021-03-30 06:38:13: charts.d: INFO: sensors: is disabled. Add a line with sensors=force in '/etc/netdata/charts.d.conf' to enable it (or remove the line that disables it).
    2021-03-30 06:38:13: go.d ERROR: prometheus[pcsensor_temper_exporter_local] Get "http://127.0.0.1:9204/metrics": dial tcp 127.0.0.1:9204: connect: connection refused
    2021-03-30 06:38:13: go.d ERROR: prometheus[pcsensor_temper_exporter_local] check failed
    2021-03-30 06:38:13: charts.d: WARNING: ap: command 'iw' is not found in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin.
    2021-03-30 06:38:13: charts.d: ERROR: ap: module's 'ap' check() function reports failure.
    2021-03-30 06:38:13: charts.d: WARNING: apcupsd: command 'apcaccess' is not found in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin.
    2021-03-30 06:38:13: charts.d: ERROR: apcupsd: module's 'apcupsd' check() function reports failure.
    2021-03-30 06:38:13: charts.d: WARNING: libreswan: command 'ipsec' is not found in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin.
    2021-03-30 06:38:13: charts.d: ERROR: libreswan: module's 'libreswan' check() function reports failure.
    2021-03-30 06:38:13: charts.d: : nut: command 'upsc -l ' failed with code 127:
    2021-03-30 06:38:13: charts.d: ERROR: nut: Cannot find UPSes - please set nut_ups='ups_name' in /nut.conf
    2021-03-30 06:38:13: charts.d: ERROR: nut: module's 'nut' check() function reports failure.
    2021-03-30 06:38:13: charts.d: WARNING: opensips: command 'opensipsctl' is not found in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin.
    2021-03-30 06:38:13: charts.d: ERROR: opensips: module's 'opensips' check() function reports failure.
    2021-03-30 06:38:13: charts.d: FATAL: main: No charts to collect data from.
    2021-03-30 06:38:13: netdata INFO : PLUGINSD[charts.d] : called DISABLE. Disabling it.
    2021-03-30 06:38:13: netdata INFO : PLUGINSD[charts.d] : PARSER ended
    2021-03-30 06:38:13: netdata ERROR : PLUGINSD[charts.d] : '/usr/libexec/netdata/plugins.d/charts.d.plugin' (pid 239) disconnected after 0 successful data collections (ENDs). (errno 22, Invalid argument)
    2021-03-30 06:38:13: netdata INFO : PLUGINSD[charts.d] : '/usr/libexec/netdata/plugins.d/charts.d.plugin' (pid 239) does not generate useful output but it reports success (exits with 0). Will not start it again - it is now disabled..
    2021-03-30 06:38:13: go.d ERROR: prometheus[pms5003_particulate_matter_sensor_exporter_local] Get "http://127.0.0.1:9662/metrics": dial tcp 127.0.0.1:9662: connect: connection refused
    2021-03-30 06:38:13: go.d ERROR: prometheus[pms5003_particulate_matter_sensor_exporter_local] check failed
    2021-03-30 06:38:14: python.d INFO: plugin[main] : [sensors] built 1 job(s) configs
    2021-03-30 06:38:14: python.d INFO: plugin[main] : [w1sensor] built 1 job(s) configs
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'curr1_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'in0_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'curr1_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'in0_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'curr1_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'in0_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'curr1_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'in0_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'curr1_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'in0_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'curr1_input': Can't read
    2021-03-30 06:38:15: python.d ERROR: sensors[sensors] : b'in0_input': Can't read
    2021-03-30 06:38:16: python.d ERROR: sensors[sensors] : b'curr1_input': Can't read
    2021-03-30 06:38:16: python.d ERROR: sensors[sensors] : b'in0_input': Can't read
    2021-03-30 06:38:16: python.d INFO: plugin[main] : sensors[sensors] : check success
    2021-03-30 06:38:16: python.d ERROR: w1sensor[w1sensor] : [Errno 2] No such file or directory: '/sys/bus/w1/devices/'
    2021-03-30 06:38:16: python.d INFO: plugin[main] : w1sensor[w1sensor] : check failed

```

But i have noticed that after few minutes the “Sensors” tab appears again (i retyped the command but the result has been the same)

i have added in the config the command above and by browsing it via URL i see the following

```
# section 'plugin:proc:/sys/class/power_supply' is not used.
[plugin:proc:/sys/class/power_supply]
	battery energy = yes

```

Moreover i’ve noticed that if the AC is connected (e.g. battery charging) i can see the current (not the energy) and when there is only BAT0 i can see only the voltage (i can always see the temperature otherwise)

---

<div class="post-metadata">

**Author:** ![vlvkobal](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/vlvkobal/32/219_2.png) [@vlvkobal](https://community.netdata.cloud/u/vlvkobal)\
**Post date:** [March 30, 2021, 7:06am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/8 "2021-03-30T07:06:03Z")

</div>

> [@maxdd](#):
>
> `# section 'plugin:proc:/sys/class/power_supply' is not used.`

Please check if

```auto
[plugin:proc]
	/sys/class/power_supply = yes

```

---

<div class="post-metadata">

**Author:** ![maxdd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/maxdd/32/633_2.png) [@maxdd](https://community.netdata.cloud/u/maxdd)\
**Post date:** [March 30, 2021, 7:35am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/9 "2021-03-30T07:35:40Z")

</div>

It is as such (with # in front)

`# /sys/class/power_supply = yes`

am i wrong in thinking that the default behavior is “yes” when it is written a such?

Anyway i’ve changed it and now the config is shown as such

```
[plugin:proc:/sys/class/power_supply]
	battery energy = yes
	# battery capacity = yes
	# battery charge = no
	# power supply voltage = no
	# keep files open = auto
	# directory to monitor = /host/sys/class/power_supply

```

but yet i can’t see it.  
Powersupply → BAT0 is only showing capacity  
Sensors is only showing voltage

---

<div class="post-metadata">

**Author:** ![maxdd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/maxdd/32/633_2.png) [@maxdd](https://community.netdata.cloud/u/maxdd)\
**Post date:** [April 2, 2021, 6:43am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/10 "2021-04-02T06:43:54Z")

</div>

Any help? @ilyam8 @vlvkobal

---

<div class="post-metadata">

**Author:** ![vlvkobal](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/vlvkobal/32/219_2.png) [@vlvkobal](https://community.netdata.cloud/u/vlvkobal)\
**Post date:** [April 2, 2021, 8:23am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/11 "2021-04-02T08:23:03Z")

</div>

> [@maxdd](#):
>
> Powersupply → BAT0 is only showing capacity

What are the contents of `/host/sys/class/power_supply/BAT0`?

---

<div class="post-metadata">

**Author:** ![vlvkobal](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/vlvkobal/32/219_2.png) [@vlvkobal](https://community.netdata.cloud/u/vlvkobal)\
**Post date:** [April 2, 2021, 8:26am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/12 "2021-04-02T08:26:30Z")

</div>

> [@maxdd](#):
>
> am i wrong in thinking that the default behavior is “yes” when it is written a such?

You are right. It’s very weird you get the message “section is not used” by default.

---

<div class="post-metadata">

**Author:** ![maxdd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/maxdd/32/633_2.png) [@maxdd](https://community.netdata.cloud/u/maxdd)\
**Post date:** [April 2, 2021, 8:46am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/13 "2021-04-02T08:46:21Z")

</div>

Where do i see the content of host/sys/class/power\_supply/BAT0 ? you mean from the webpage or the conf? or what?

---

<div class="post-metadata">

**Author:** ![vlvkobal](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/vlvkobal/32/219_2.png) [@vlvkobal](https://community.netdata.cloud/u/vlvkobal)\
**Post date:** [April 2, 2021, 8:48am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/14 "2021-04-02T08:48:29Z")

</div>

From the inside of the container. `ls -al host/sys/class/power_supply/BAT0`.

---

<div class="post-metadata">

**Author:** ![maxdd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/maxdd/32/633_2.png) [@maxdd](https://community.netdata.cloud/u/maxdd)\
**Post date:** [April 2, 2021, 9:11am UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/15 "2021-04-02T09:11:33Z")

</div>

bash-5.0# ls -al host/sys/class/power\_supply/BAT0  
lrwxrwxrwx 1 root root 0 Mar 31 08:03 host/sys/class/power\_supply/BAT0 → …/…/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power\_supply/BAT0

---

<div class="post-metadata">

**Author:** ![vlvkobal](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/vlvkobal/32/219_2.png) [@vlvkobal](https://community.netdata.cloud/u/vlvkobal)\
**Post date:** [April 2, 2021, 12:42pm UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/16 "2021-04-02T12:42:27Z")

</div>

Well, it’s not the information I wanted to see. Please do `ls -alL` instead of `ls -al`.

---

<div class="post-metadata">

**Author:** ![maxdd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/maxdd/32/633_2.png) [@maxdd](https://community.netdata.cloud/u/maxdd)\
**Post date:** [April 2, 2021, 12:55pm UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/17 "2021-04-02T12:55:09Z")

</div>

```
total 0
drwxr-xr-x 4 root root 0 Mar 31 08:03 .
drwxr-xr-x 3 root root 0 Mar 31 08:03 ..
-rw-r--r-- 1 root root 4096 Apr 2 12:54 alarm
-r--r--r-- 1 root root 4096 Mar 31 08:03 capacity
-r--r--r-- 1 root root 4096 Apr 2 12:54 capacity_level
-r--r--r-- 1 root root 4096 Mar 31 08:03 charge_full
-r--r--r-- 1 root root 4096 Mar 31 08:03 charge_full_design
-r--r--r-- 1 root root 4096 Mar 31 08:03 charge_now
-r--r--r-- 1 root root 4096 Mar 31 08:03 current_now
-r--r--r-- 1 root root 4096 Apr 2 12:54 cycle_count
drwxr-xr-x 5 root root 0 Mar 31 08:03 device
drwxr-xr-x 3 root root 0 Mar 31 08:03 hwmon2
-r--r--r-- 1 root root 4096 Mar 31 08:03 manufacturer
-r--r--r-- 1 root root 4096 Mar 31 08:03 model_name
drwxr-xr-x 2 root root 0 Apr 2 12:54 power
-r--r--r-- 1 root root 4096 Mar 31 08:03 present
-r--r--r-- 1 root root 4096 Mar 31 08:03 serial_number
-r--r--r-- 1 root root 4096 Mar 31 08:03 status
drwxr-xr-x 2 root root 0 Mar 31 08:03 subsystem
-r--r--r-- 1 root root 4096 Mar 31 08:03 technology
-r--r--r-- 1 root root 4096 Mar 31 08:03 type
-rw-r--r-- 1 root root 4096 Mar 31 08:03 uevent
-r--r--r-- 1 root root 4096 Mar 31 08:03 voltage_min_design
-r--r--r-- 1 root root 4096 Mar 31 08:03 voltage_now

```

current\_now , voltage\_now and power might be good, but i believe without AC current is 0.  
How do i check their value?

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [April 2, 2021, 1:03pm UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/18 "2021-04-02T13:03:07Z")

</div>

> That’s the guide i’ve followed but without luck, the “Sensor” tab is disappearing

Just realized that we are discussing two collectors:

- Sensors ([bash](https://github.com/netdata/netdata/tree/master/collectors/charts.d.plugin/sensors), [python](https://github.com/netdata/netdata/tree/master/collectors/python.d.plugin/sensors))
- [Linux Power Supply](https://github.com/netdata/netdata/tree/master/collectors/proc.plugin#linux-power-supply)

Let’s don’t mix them up and try to figure out what is missing/why doesn’t work (?) Linux Power Supply.

> <https://github.com/netdata/netdata/tree/master/collectors/proc.plugin#linux-power-supply>
>
> //github.com/netdata/netdata/tree/master/collectors/proc.plugin

---

<div class="post-metadata">

**Author:** ![maxdd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/maxdd/32/633_2.png) [@maxdd](https://community.netdata.cloud/u/maxdd)\
**Post date:** [April 2, 2021, 1:41pm UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/19 "2021-04-02T13:41:39Z")

</div>

makes sense to me, Linux Power Supply is only showing battery capacity then

---

<div class="post-metadata">

**Author:** ![vlvkobal](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/vlvkobal/32/219_2.png) [@vlvkobal](https://community.netdata.cloud/u/vlvkobal)\
**Post date:** [April 2, 2021, 1:42pm UTC](https://community.netdata.cloud/t/how-to-see-energy-rate/1121/20 "2021-04-02T13:42:27Z")

</div>

There are no `energy_*` files in the directory. That’s why you don’t see the corresponding charts in the dashboard.

[Next page](https://community.netdata.cloud/t/how-to-see-energy-rate/1121.md?page=2)
