導航:首頁 > 編程系統 > 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測試相關的資料

熱點內容
網路中接電源是什麼意思 瀏覽:233
哪個app可以刮刮樂 瀏覽:999
cad清理命令能丟文件直接嗎 瀏覽:75
ug編程怎麼安排 瀏覽:889
有什麼搭配衣服的app男生 瀏覽:553
win10降級雙系統 瀏覽:365
專線怎麼查詢網路質量 瀏覽:952
如何使pdf文件順序顛倒 瀏覽:477
爆菊工具身邊的 瀏覽:537
桌面軟體怎麼打開變成文件 瀏覽:385
怎麼查看加密文件 瀏覽:58
蘋果系統在線安裝教程 瀏覽:221
哪些數據需要存入緩存 瀏覽:584
c300升級 瀏覽:817
win8怎麼刪除文件 瀏覽:71
差退稅是用什麼app 瀏覽:928
有什麼在線提問的app 瀏覽:42
三星手機怎麼切換網路 瀏覽:33
win10系統重置激活 瀏覽:866
華為怎麼更換賬戶密碼忘記了 瀏覽:151

友情鏈接