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?
You could use the find command:
find /sys/class/ -name '*energy_uj*' -ls
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.