Show Table of Contents
2.4. 电池寿命工具组件
Red Hat Enterprise Linux 7 添加了电池寿命工具组件(Battery Life Tool Kit,简称 BLTK),这是一套用来模仿、分析电池寿命和性能的测试程序。BLTK 通过执行一系列模拟特定用户组的任务,并将结果形成报告,来达到这一目的。尽管 BLTK 是为检测笔记本电脑的性能设计的,如果启动时使用
-a 选项,BLTK 也能报告台式电脑的性能。
BLTK 能生成和真实的计算机使用中非常相似的工作负荷。例如:
office 负荷写入一个文本,再加以校正,并将同样的程序应用到电子表格中。运行带 PowerTOP 或者任何其它审核或分析工具的 BLTK,就可以测试当计算机处于活跃状态,而不是仅仅处于闲置状态时,您的优化是否有效。因为您可以在不同设置中多次运行同样的负荷,并比较不同设置下得到的结果。
使用以下命令安装 BLTK:
yum install bltk
使用以下命令运行 BLTK:
bltk workload options
例如:运行
idle(闲置)负荷 120 秒:
bltk -I -T 120
默认可用的工作负荷有:
-I,--idle- 系统闲置,将其作为与其它负载进行比较的基准
-R,--reader- 模拟读取文件(默认使用 Firefox)
-P,--player- 模拟观看 CD 或者 DVD 驱动器中的多媒体文件(默认使用 mplayer)
-O,--office- 使用 OpenOffice.org 套件模拟编辑文件
其它可让您指定的选项:
-a,--ac-ignore- 忽略 AC 电源是否可用(台式计算机需使用)
-T number_of_seconds,--time number_of_seconds- 测试时间(以秒为单位),此选项需与
idle负荷一起使用 -F filename,--file filename- 指定特定负荷使用的文件,例如不访问 CD 或者 DVD 驱动器,而是指定别的文件供
player负荷使用 -W application,--prog application- 指定特定负载使用的应用程序,例如:不使用 Firefox ,而是指定其它的浏览器供
reader负载使用
BLTK 支持大量更具体的选项。详情请参考
bltk 的 man page。
BLTK 会将产生的结果保存在
/etc/bltk.conf 配置文件指定的目录中,默认为 ~/.bltk/workload.results.number/。例如:~/.bltk/reader.results.002/ 目录中会保存第三次 reader 负荷测试的结果(第一次不计数)。所有的结果会分散存在几个文本文件中。要将这些结果压缩成方便读取的格式,请运行:
bltk_report path_to_results_directory
结果会显示在结果目录下的
Report 文件中。如需在终端模拟器中查看结果,请使用 -o 选项:
bltk_report -o path_to_results_directory
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.