加入收藏 | 设为首页 | 会员中心 | 我要投稿 云计算网_泰州站长网 (http://www.0523zz.com/)- 视觉智能、AI应用、CDN、行业物联网、智能数字人!
当前位置: 首页 > 服务器 > 搭建环境 > Windows > 正文

PowerTOP:在Linux上监视电量使用和改善笔记本电池寿命

发布时间:2019-02-26 14:15:27 所属栏目:Windows 来源:Vinoth Kumar
导读:副标题#e# 我们都知道,现在几乎都从 PC 机换到了笔记本电脑了。但是使用笔记本有个问题,我们希望电池耐用,我们可以使用到每一点电量。所以,我们需要知道电量都去哪里了,是不是浪费了。 你可以使用 PowerTOP 工具来查看没有接入电源线时电量都用在了何
副标题[/!--empirenews.page--]

PowerTOP:在Linux上监视电量使用和改善笔记本电池寿命

我们都知道,现在几乎都从 PC 机换到了笔记本电脑了。但是使用笔记本有个问题,我们希望电池耐用,我们可以使用到每一点电量。所以,我们需要知道电量都去哪里了,是不是浪费了。

你可以使用 PowerTOP 工具来查看没有接入电源线时电量都用在了何处。你需要在终端中使用超级用户权限来运行 PowerTOP 工具。它可以访问该电池硬件并测量电量使用情况。

什么是 PowerTOP

PowerTOP 是一个 Linux 工具,用于诊断电量消耗和电源管理的问题。

它是由 Intel 开发的,可以在内核、用户空间和硬件中启用各种节电模式。

除了作为一个一个诊断工具之外,PowweTop 还有一个交互模式,可以让你实验 Linux 发行版没有启用的各种电源管理设置。

它也能监控进程,并展示其中哪个正在使用 CPU,以及从休眠状态页将其唤醒,也可以找出电量消耗特别高的应用程序。

如何安装 PowerTOP

PowerTOP 软件包在大多数发行版的软件库中可用,使用发行版的 包管理器 安装即可。

对于 Fedora 系统,使用 DNF 命令 来安装 PowerTOP。

  1. $ sudo dnf install powertop

对于 Debian/Ubuntu 系统,使用 APT-GET 命令 或 APT 命令 来安装 PowerTOP。

  1. $ sudo apt install powertop

对于基于 Arch Linux 的系统,使用 Pacman 命令 来安装 PowerTOP。

  1. $ sudo pacman -S powertop

对于 RHEL/CentOS 系统,使用 YUM 命令 来安装 PowerTOP。

  1. $ sudo yum install powertop

对于 openSUSE Leap 系统,使用 Zypper 命令 来安装 PowerTOP。

  1. $ sudo zypper install powertop

如何使用 PowerTOP

PowerTOP 需要超级用户权限,所以在 Linux 系统中以 root 身份运行 PowerTOP 工具。

默认情况下其显示 “概览” 页,在这里我们可以看到所有设备的电量消耗情况,也可以看到系统的唤醒秒数。

  1. $ sudo powertop
  2.  
  3. PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunables
  4.  
  5. The battery reports a discharge rate of 12.6 W
  6. The power consumed was 259 J
  7. The estimated remaining time is 1 hours, 52 minutes
  8.  
  9. Summary: 1692.9 wakeups/second, 0.0 GPU ops/seconds, 0.0 VFS ops/sec and 54.9% CPU use
  10.  
  11. Usage Events/s Category Description
  12. 9.3 ms/s 529.4 Timer tick_sched_timer
  13. 378.5 ms/s 139.8 Process [PID 2991] /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 8314 -prefMapSize 173895 -schedulerPrefs 00
  14. 7.5 ms/s 141.7 Timer hrtimer_wakeup
  15. 3.3 ms/s 102.7 Process [PID 1527] /usr/lib/firefox/firefox --new-window
  16. 11.6 ms/s 69.1 Process [PID 1568] /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 173895 -schedulerPrefs 0001,
  17. 6.2 ms/s 59.0 Process [PID 1496] /usr/lib/firefox/firefox --new-window
  18. 2.1 ms/s 59.6 Process [PID 2466] /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
  19. 1.8 ms/s 52.3 Process [PID 2052] /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
  20. 1.8 ms/s 50.8 Process [PID 3034] /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 8314 -prefMapSize 173895 -schedulerPrefs 00
  21. 3.6 ms/s 48.4 Process [PID 3009] /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 8314 -prefMapSize 173895 -schedulerPrefs 00
  22. 7.5 ms/s 46.2 Process [PID 2996] /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 8314 -prefMapSize 173895 -schedulerPrefs 00
  23. 25.2 ms/s 33.6 Process [PID 1528] /usr/lib/firefox/firefox --new-window
  24. 5.7 ms/s 32.2 Interrupt [7] sched(softirq)
  25. 2.1 ms/s 32.2 Process [PID 1811] /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
  26. 19.7 ms/s 25.0 Process [PID 1794] /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
  27. 1.9 ms/s 31.5 Process [PID 1596] /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 173895 -schedulerPrefs 0001,
  28. 3.1 ms/s 29.9 Process [PID 1535] /usr/lib/firefox/firefox --new-window
  29. 7.1 ms/s 28.2 Process [PID 1488] /usr/lib/firefox/firefox --new-window
  30. 1.8 ms/s 29.5 Process [PID 1762] /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
  31. 8.8 ms/s 23.3 Process [PID 1121] /usr/bin/gnome-shell
  32. 1.2 ms/s 21.8 Process [PID 1657] /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 920 -prefMapSize 173895 -schedulerPrefs 000
  33. 13.3 ms/s 13.9 Process [PID 1746] /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
  34. 2.7 ms/s 11.1 Process [PID 3410] /usr/lib/gnome-terminal-server
  35. 3.8 ms/s 10.8 Process [PID 1057] /usr/lib/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty
  36. 3.1 ms/s 9.8 Process [PID 1629] /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 920 -prefMapSize 173895 -schedulerPrefs 000
  37. 0.9 ms/s 6.7 Interrupt [136] xhci_hcd
  38. 278.0 us/s 6.4 Process [PID 414] [irq/141-iwlwifi]
  39. 128.7 us/s 5.7 Process [PID 1] /sbin/init
  40. 118.5 us/s 5.2 Process [PID 10] [rcu_preempt]
  41. 49.0 us/s 4.7 Interrupt [0] HI_SOFTIRQ
  42. 459.3 us/s 3.1 Interrupt [142] i915
  43. 2.1 ms/s 2.3 Process [PID 3451] powertop
  44. 8.4 us/s 2.7 kWork intel_atomic_helper_free_state_
  45. 1.2 ms/s 1.8 kWork intel_atomic_commit_work
  46. 374.2 us/s 2.1 Interrupt [9] acpi
  47. 42.1 us/s 1.8 kWork intel_atomic_cleanup_work
  48. 3.5 ms/s 0.25 kWork delayed_fput
  49. 238.0 us/s 1.5 Process [PID 907] /usr/lib/upowerd
  50. 17.7 us/s 1.5 Timer intel_uncore_fw_release_timer
  51. 26.4 us/s 1.4 Process [PID 576] [i915/signal:0]
  52. 19.8 us/s 1.3 Timer watchdog_timer_fn
  53. 1.1 ms/s 0.00 Process [PID 206] [kworker/7:2]
  54. 2.4 ms/s 0.00 Interrupt [1] timer(softirq)
  55. 13.4 us/s 0.9 Process [PID 9] [ksoftirqd/0]
  56.  
  57. Exit | / Navigate |

(编辑:云计算网_泰州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读