毎時または毎日の消費電力または平均消費電力

毎時または毎日の消費電力または平均消費電力

私は電力消費を減らすことについての多くの記事を読んでいますが、それが私がここにいる理由ではありません。

装置を年中無休で24時間稼働するための費用を見積もるために、毎日または時間ごとの電気使用量統計を取得したいと思います。

どうすればいいですか? ?

正確な値は必要なく、適切な見積もりを受け入れることができます。

調べてみましたが、powertop正しく/sys/class/powercap/*/energy_uj読んでいるかわかりません。たとえば、次のようになります。

Powertopは、60秒のサンプリングに351Jを使用すると言います。

$ powertop -t 60 -C powertop.csv ; cat powertop.csv | grep 'The power consumed was'
modprobe cpufreq_stats failedLoaded 65 prior measurements
RAPL device for cpu 0
RAPL Using PowerCap Sysfs : Domain Mask d
RAPL device for cpu 0
RAPL Using PowerCap Sysfs : Domain Mask d
Devfreq not enabled
glob returned GLOB_ABORTED
Preparing to take measurements
To show power estimates do 250 measurement(s) connected to battery only
Taking 1 measurement(s) for a duration of 60 second(s) each.
 the port is sda
PowerTOP outputing using base filename powertop.csv
The power consumed was :  351  J;

同じ60秒間隔の間、すべてのEnergy_ujファイルはまったく異なる値を提供します。

$ v0=$(cat /sys/class/powercap/intel-rapl\:0/energy_uj); \
  v00=$(cat /sys/class/powercap/intel-rapl\:0\:0/energy_uj); \
  v01=$(cat /sys/class/powercap/intel-rapl\:0\:1/energy_uj); \
  sleep 60; \
  v1=$(cat /sys/class/powercap/intel-rapl\:0/energy_uj); \
  v10=$(cat /sys/class/powercap/intel-rapl\:0\:0/energy_uj); \
  v11=$(cat /sys/class/powercap/intel-rapl\:0\:1/energy_uj); \
  echo "(($v1 - $v0) + ($v10 - $v00) + ($v11 -$v01)) / 1000000" | bc -l
132.10661700000000000000

みんなありがとうございます!

ベストアンサー1

おすすめ記事