CPUPowerとlibCpuPower

CPUPowerとlibCpuPower

時々、次のエラーはcpupowerを実行しません。

cpupower: error while loading shared libraries: libcpupower.so.0: cannot open shared object file: No such file or directory

私のワークステーションのソースから最後のcpupowerツールをコンパイルしてインストールしました。

Makefileのインストールコマンドは/usr/local/libにライブラリをインストールし、それに応じてLD_LIBRARY_PATHを設定しました。

syl@WorkStation-T3500:~$ echo $LD_LIBRARY_PATH 
:/usr/local/lib/

lrwxrwxrwx  1 root root     20 juin  26 11:46 libcpupower.so -> libcpupower.so.0.0.1
lrwxrwxrwx  1 root root     20 juin  26 11:46 libcpupower.so.0 -> libcpupower.so.0.0.1

-rwxr-xr-x 1 root root 77048 juin 26 11:46 libcpupower.so.0.0.1 l

単純なCPU電力情報クエリがうまく機能します。

syl@WorkStation-T3500:~$ cpupower frequency-info
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency:  Cannot determine or is not supported.
hardware limits: 1.20 GHz - 3.20 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 1.20 GHz and 3.20 GHz.
              The governor "powersave" may decide which speed to use
              within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 1.20 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes

それにもかかわらず、いくつかのポリシーを作成しようとすると、次のことが起こります。

syl@WorkStation-T3500:~$ sudo cpupower frequency-set --governor userspace
cpupower: error while loading shared libraries: libcpupower.so.0: cannot open shared object file: No such file or directory

この奇妙な問題についてのアドバイスを少し考えてください。

みんな一番いい

シルバン

ベストアンサー1

LD_LIBRARY_PATHを適切に初期化するだけでは十分ではないことがわかりました。 libパスを/etc/ld.so.conf.d/x86_64-linux-gnu.confに追加する必要がありました:

syl@WorkStation-T3500:~$ sudo vim /etc/ld.so.conf.d/x86_64-linux-gnu.conf

# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/loca/lib/

それから:

syl@WorkStation-T3500:~$ sudo ldconfig

これは問題を解決しますが、理解できません。

 syl@WorkStation-T3500:~$ sudo cpupower frequency-set --governor userspace Setting cpu: 0
Error setting new values. Common errors:
- Do you have proper administration rights? (super-user?)
- Is the governor you requested available and modprobed?
- Trying to set an invalid policy?
- Trying to set a specific frequency, but userspace governor is not available,
for example because of hardware which cannot be set to a specific frequency or because the userspace governor isn't loaded?

まあ、このコマンドがうまくいかない理由を理解する以外には何もありません...

乾杯!

シルバン

おすすめ記事