Powertop中的ms / s单位是多少?如何以瓦特为单位获得功耗?

当我使用powertop命令时,我得到以下结果:

 Summary: 1089.0 wakeups/second, 0.0 GPU ops/seconds, 0.0 VFS ops/sec and 27.2% CPU use Usage Events/s Category Description 182.5 ms/s 330.0 Process /usr/lib/firefox-esr/firefox-esr --sm-config-prefix /firefox-esr-klqqqA/ --sm-client-id 1012e4d86df26338ae1472160 2.7 ms/s 139.4 Timer hrtimer_wakeup 0.8 ms/s 126.7 kWork od_dbs_timer 4.0 ms/s 95.6 Interrupt PS/2 Touchpad / Keyboard / Mouse 6.4 ms/s 67.4 Process /usr/bin/pulseaudio --start 21.3 ms/s 46.1 Process gnome-shell --sm-client-id 106a72cd31b552c96146814382785334200000065240000 1.7 ms/s 62.6 Process /opt/teamviewer/tv_bin/teamviewerd -d 1.5 ms/s 59.0 Timer tick_sched_timer 0.7 ms/s 47.7 Process [rcu_sched] 20.7 ms/s 22.7 Process /usr/bin/Xorg :0 -novtswitch -background none -noreset -verbose 3 -auth /var/run/gdm3/auth-for-Debian-gdm-y51QIr/ 437.3 µs/s 16.5 Process /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-er 0.8 ms/s 12.2 Interrupt [48] nouveau 6.1 ms/s 6.3 kWork nouveau_fence_work_handler 0.9 ms/s 7.5 Process ovs-vswitchd unix:/var/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --no-chdir --lo 2.1 ms/s 5.9 Interrupt [6] tasklet(softirq) 619.4 µs/s 5.9 Interrupt [9] RCU(softirq) 181.4 µs/s 5.0 Interrupt [4] block(softirq) 96.6 µs/s 4.3 kWork ieee80211_iface_work 319.2 µs/s 3.7 Process /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session 421.4 µs/s 3.4 kWork ttm_bo_delayed_workqueue 1.1 ms/s 2.1 Process /usr/bin/python /usr/bin/guake 1.7 ms/s 1.0 Interrupt [42] hpet4 146.5 µs/s 1.1 Process nm-applet 15.8 µs/s 1.3 Timer watchdog_timer_fn 94.4 µs/s 1.2 Process /usr/lib/speech-dispatcher-modules/sd_flite /etc/speech-dispatcher/modules/flite.conf 696.9 µs/s 0.9 Interrupt [7] sched(softirq) 1.7 ms/s 0.3 Interrupt [43] hpet5 1.7 µs/s 0.9 kWork blk_delay_work 1.1 ms/s 0.3 Interrupt [41] hpet3 42.3 µs/s 0.7 Process [ksoftirqd/0] 236.3 µs/s 0.6 kWork _brcms_timer 88.7 µs/s 0.6 Process /usr/bin/totem 61.3 µs/s 0.6 Process ovs-vswitchd 51.3 µs/s 0.6 Process /usr/lib/speech-dispatcher-modules/sd_dummy /etc/speech-dispatcher/modules/dummy.conf 1.7 ms/s 0.00 Process top 1.3 µs/s 0.6 kWork cfq_kick_queue 93.6 µs/s 0.6 kWork cache_reap 43.0 µs/s 0.6 Process /usr/lib/speech-dispatcher-modules/sd_espeak /etc/speech-dispatcher/modules/espeak.conf 33.4 µs/s 0.6 Process /usr/lib/speech-dispatcher-modules/sd_cicero /etc/speech-dispatcher/modules/cicero.conf 

一些’使用’统计数据以ms / s为单位,其他则为μs/ s。 我想知道它们是什么,以及如何将它们转换为瓦特来确定功耗。

如果您的笔记本电脑可以使用电池运行,则在概览选项卡上以默认交互模式(使用sudo powertop启动),第一列显示以mW(毫瓦)或μW(微瓦)为单位的估计功耗

使用列中的单位是ms / s(毫秒/秒)和μs/ s(每秒微秒),表示处理器每秒花费多少时间(因此它们无法转换为瓦特)

 PowerTOP 2.8 Overview Idle stats Frequency stats Device stats Tunables The battery reports a discharge rate of 3.51 W The estimated remaining time is 9 hours, 32 minutes Summary: 1017.3 wakeups/second, 7.0 GPU ops/seconds, 0.0 VFS ops/sec and 3.8% CPU use Power est. Usage Events/s Category Description 1.97 W 50.0% Device Display backlight 980 mW 3.5 pkts/s Device Network interface: wlan0 (brcmfmac_sdio) 100 mW 100.0% Device radio:hci0 43.3 mW 1.1 ms/s 559.1 Interrupt [1] timer(softirq) 22.6 mW 0.8 ms/s 290.8 Timer intel_pstate_timer_func 10.8 mW 15.3 ms/s 31.5 Process /usr/lib/firefox/firefox 9.62 mW 433.2 µs/s 14.6 Process marco 3.79 mW 6.9 ms/s 0.00 Interrupt [7] sched(softirq) 2.22 mW 204.1 µs/s 27.6 Interrupt [6] tasklet(softirq) 2.01 mW 3.6 ms/s 0.05 Process [khugepaged] 1.72 mW 459.2 µs/s 19.2 Process /usr/lib/mate-panel/wnck-applet 1.27 mW 2.2 ms/s 0.9 Process /usr/lib/xorg/Xorg -nolisten tcp :1 vt1 -keeptty -auth /tmp/serverauth.JdmwHkcqKp 1.12 mW 1.0 ms/s 3.4 Process mate-terminal 819 µW 0.7 ms/s 5.5 Process [mmcqd/0] 

powertop的man页似乎表明电源使用(第一列)仅在使用电池运行时可用。 但是,我发现情况并非如此 – 它总是向我显示我的Ubuntu机器上的列,这是一台带有健康电池的笔记本电脑

然而, @ edwinksl非常有帮助地指出,“仅需要至少270次测量”才能使用电池进行电力使用估算。 这是用于校准。

因此,似乎您需要在电池上运行powertop一段时间才能提供功耗统计数据。

如果在没有电池的台式机或笔记本电脑上运行,这些信息将永远不可用。 我用无电池笔记本电脑(运行Arch)尝试过,并没有电源使用列的迹象。

用户指南中的另一个警告 – /var/cache/powertop必须为空,以显示功耗估算值。