CTU-IIG / thermobench

Tools and benchmarks for measuring thermal properties of SoCs running Linux
GNU General Public License v2.0
3 stars 2 forks source link

can not read "/sys/devices/virtual/powercap/intel-rapl/intel-rapl\:0/intel-rapl\:0\:0/energy_uj" #55

Closed Maor545 closed 2 years ago

Maor545 commented 2 years ago

On intel platform, thermobench can not read

/sys/devices/virtual/powercap/intel-rapl/intel-rapl\:0/intel-rapl\:0\:0/energy_uj  

gives error?

thermobench: Error while opening sensor file: /sys/devices/virtual/powercap/intel-rapl/intel-rapl\:0/intel-rapl\:0\:0/energy_uj: No such file or directory

following command returns its contents just fine

 cat  /sys/devices/virtual/powercap/intel-rapl/intel-rapl\:0/intel-rapl\:0\:0/energy_uj
 4208122283
wentasah commented 2 years ago

Just remove the backslashes. They are not a part of file name. See:

cat  /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:0/energy_uj
246498392

Shell replaces \X with X even if X has special meaning for shell (space, $, ...). Colon does not have special meaning for most shells so it's not necessary to use \: instead of :.