How to get power reading on an Intel RAPL focal appliance?

Viewed 46

I am working on a bash script to get power reading. The line of code uj=$(cat /sys/class/powercap/intel-rapl/intel-rapl:0/energy_uj) in the script produce the error: No such file or directory.

The CPU supports RAPL, but the path to the /intel/rapl in the /usr/ directory does not contain the energy_uj file. Does anyone know the path to get the power reading?

1 Answers

You could use the find command:

find /sys/class/ -name '*energy_uj*' -ls
Related