KlausT / ccminer

Software for mining various cryptocoins
GNU General Public License v3.0
403 stars 312 forks source link

Read CPU Freq from scaling_cur_freq #183

Closed nazerim closed 6 years ago

nazerim commented 6 years ago

Propose changing this to scaling_cur_freq as by default cpuinfo_cur_freq is only readable by root user.

Running as non-root user, cpuinfo_cur_freq is not readable and will cause ccminer to segfault. It is probably not the best practice to chmod 444 cpuinfo_cur_freq or to run ccminer as root/sudo

Refer to the following for difference between cpuinfo_cur_freq and scaling_cur_feq: https://www.kernel.org/doc/Documentation/cpu-freq/pcc-cpufreq.txt