导航:首页 > 编程系统 > linuxcpu测试

linuxcpu测试

发布时间:2025-02-16 01:46:22

『壹』 如何在Ubuntu linux中获取CPU温度

Lm_sensors是一个 命令 行工具,用于显示所有芯片传感器数据的当前读数,包括CPU温度。默认情况下,Ubuntu LInux没有安装Lm_Sensors,因此,我们必须自己安装它们。

bob@bob-PC:~$ sudo apt install lm-sensors

检测硬件

接下来,我们需要检测安装在电脑上的硬件监控芯片。现在我们可以开始检测电脑的硬件传感器了:

bob@bob-PC:~$ sudo sensors-detect

# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)

# System: VMware, Inc. VMware Virtual Platform [None]

# Board: Intel Corporation 440BX Desktop Reference Platform

# Kernel: 4.15.0-30Ubuntu-generic x86_64

# Processor: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (6/158/10)

This program will help you determine which kernel moles you need

to load to use lm_sensors most effectively. It is generally safe

and recommended to accept the default answers to all questions,

unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.

Do you want to scan for them? This is totally safe. (YES/no): yes

Silicon Integrated Systems SIS5595...                      No

VIA VT82C686 Integrated Sensors...                          No

VIA VT8231 Integrated Sensors...                            No

AMD K8 thermal sensors...                                  No

AMD Family 10h thermal sensors...                          No

AMD Family 11h thermal sensors...                          No

AMD Family 12h and 14h thermal sensors...                  No

AMD Family 15h thermal sensors...                          No

AMD Family 16h thermal sensors...                          No

AMD Family 17h thermal sensors...                          No

AMD Family 15h power sensors...                            No

AMD Family 16h power sensors...       贺缺                     No

Intel digital thermal sensor...                     腔迟       Success!

    (driver `coretemp'禅圆辩)

Intel AMB FB-DIMM thermal sensor...                        No

Intel 5500/5520/X58 thermal sensor...                      No

VIA C7 thermal sensor...                                    No

VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded sensors. We have to write to

standard I/O ports to probe them. This is usually safe.

Do you want to scan for Super I/O sensors? (YES/no): yes

..................

显示cpu温度

可以通过一下命令查看温度数据了:

bob@bob-PC:~$ sensors

iwlwifi_1-virtual-0

Adapter: Virtual device

temp1:        +33.0°C 

pch_skylake-virtual-0

Adapter: Virtual device

temp1:        +38.5°C 

BAT0-acpi-0

Adapter: ACPI interface

in0:        +12.45 V 

coretemp-isa-0000

Adapter: ISA adapter

Package id 0:  +39.0°C  (high = +100.0°C, crit = +100.0°C)

Core 0:        +39.0°C  (high = +100.0°C, crit = +100.0°C)

Core 1:        +38.0°C  (high = +100.0°C, crit = +100.0°C)

thinkpad-isa-0000

Adapter: ISA adapter

fan1:          0 RPM

temp1:        +38.0°C 

temp2:            N/A 

temp3:        +0.0°C 

temp4:        +0.0°C 

temp5:        +0.0°C 

temp6:        +0.0°C 

temp7:        +0.0°C 

temp8:        +0.0°C 

BAT1-acpi-0

Adapter: ACPI interface

in0:        +12.49 V 

acpitz-acpi-0

Adapter: ACPI interface

temp1:        +38.0°C  (crit = +128.0°C)

还可以使用watch命令实时关注:

bob@bob-PC:~$ watch sensors

使用图形化工具psensor显示cpu温度

使用Psensor,您可以检查以下各项:

主板、CPU传感器和NVidia GPU的温度

硬盘驱动器的温度

风扇的转速

监视CPU使用情况

最新版本的Psensor还为Ubuntu提供了一个applet指示器,因此在Ubuntu上更容易监控硬件温度。您可以选择在顶部面板中显示温度。它甚至可以在温度超过极限时发送桌面通知。

我们可以使用下面的命令安装Psensor:

bob@bob-PC:~/Desktop$ sudo apt install -y psensor

打开ubuntu的launchpad,在里面找到psensor,打开该应用就可以看到多个传感器:

使用图形化工具hardinfo

Hardinfo是Linux中用于在图形化界面中显示硬件信息的工具。可以使用它检测cpu的温度。以下命令安装hardinfo:

bob@bob-PC:~/Desktop$ sudo apt install hardinfo

# 运行一下命令打开hardinfo

bob@bob-PC:~/Desktop$ sudo hardinfo

总结

在本教程中,我们将学习如何从命令行和桌面获取Ubuntu Linux上的CPU温度。

『贰』 如何用linux查看日志、磁盘、cpu、内存使用情况

在服务器运维中,了解磁盘IO性能至关重要,它直接影响服务器响应速度与处理能力。使用dd命令可有效查看此性能。dd命令强大且多功能,适用于文件复制、格式转换与数据备份等。
为测试磁盘IO性能,首先使用dd命令创建测试文件,如dd if=/dev/zero of=b.txt bs=1G count=1,生成1GB全零文件。接着执行dd命令,如dd if=b.txt of=/dev/null bs=1024 count=10240 iflag=direct oflag=direct,测试文件读取速度。执行后使用tail查看结果,单位为KBps,数值越大表示IO性能越好。
在测试磁盘IO时,结合/proc/diskstats文件获取统计信息,通过grep筛选测试文件相关数据,使用awk提取所需信息,最后显示测试结果。定期通过脚本执行dd命令,便于持续监控磁盘性能。
dd命令不仅能查看磁盘IO性能,还能用于数据备份、文件格式转换等任务,是服务器运维中不可或缺的工具。通过合理运用,可显著提升服务器性能与稳定性。

阅读全文

与linuxcpu测试相关的资料

热点内容
光明日报图文数据库在哪里 浏览:940
photoshop临时文件夹 浏览:250
手机里为何找不到微信文件夹 浏览:220
cad块文件另存为dwg 浏览:787
photoshop合成两个pdf文件 浏览:354
保密文件如何外借 浏览:763
手机无线密码怎么查看 浏览:821
如何删除己下载未安装的文件 浏览:806
招商银行app怎么登陆二类卡 浏览:508
谷歌浏览器的debug调试工具 浏览:163
哪个数控编程是免费的 浏览:368
苹果7plus玫瑰金报价 浏览:800
杭州自行车系统微信号 浏览:352
网络语偷猪是什么意思 浏览:309
三星i9300线刷教程图解 浏览:248
编程竞赛特训哪里好 浏览:28
提取驱动文件 浏览:102
如何压缩wps文件 浏览:314
ps转ico文件 浏览:303
无编程计算器是指哪些 浏览:852

友情链接