網(wǎng)站首頁 編程語言 正文
Linux命令行如何查看cpu和顯卡溫度
lm_sensors,是一款基于linux系統(tǒng)的硬件監(jiān)控的軟件。可以監(jiān)控主板,CPU的工作電壓,溫度等數(shù)據(jù)。
實(shí)際上sensors命令只是讀取了/sys/class/hwmon/目錄下關(guān)于CPU等傳感器溫度參數(shù)并直觀的展示給我們,我們不安裝lm_sensors模塊下也可以查看CPU溫度。
在Linux下可以通過lm_sensors來查看CPU的溫度(當(dāng)然你的硬件首先要支持),且使用這個(gè)功能要有內(nèi)核相關(guān)模塊(比如I2C)的支持
默認(rèn)情況下,Ubuntu LInux沒有安裝Lm_Sensors
apt-get install lm-sensors -y
sh -c "yes|sensors-detect"
watch -n 2 sensors
watch保證讀數(shù)每2秒更新一次
使用watch和nvidia-smi:
watch -n 2 nvidia-smi
補(bǔ)充知識(shí)點(diǎn):
linux服務(wù)器如何查看cpu溫度,在LINUX下面如何查看CPU的溫度
1.
[root@bogon redmine-3.3.0-0]# cat /proc/acpi/thermal_zone/TZ00/temperature
temperature: ? ? ? ? ? ? 28 C
[root@bogon redmine-3.3.0-0]# cat /proc/acpi/thermal_zone/TZ01/temperature
temperature: ? ? ? ? ? ? 30 C
[root@bogon redmine-3.3.0-0]#
2.
如果沒有安裝就先安裝一下
# yum -y install lm_sensors
檢測(cè)傳感器:#?sh -c "yes|sensors-detect"
如果以上步驟沒有問題,執(zhí)行下面的命令就可以查看CPU的溫度了:# sensors
# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: ? ? ? +27.8°C ?(crit = +105.0°C)
temp2: ? ? ? +29.8°C ?(crit = +105.0°C)
nouveau-pci-0100
Adapter: PCI adapter
temp1: ? ? ? +44.0°C ?(high = +95.0°C, hyst = ?+3.0°C)
(crit = +105.0°C, hyst = ?+5.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +39.0°C ?(high = +80.0°C, crit = +100.0°C)
Core 0: ? ? ? ?+33.0°C ?(high = +80.0°C, crit = +100.0°C)
Core 1: ? ? ? ?+35.0°C ?(high = +80.0°C, crit = +100.0°C)
Core 2: ? ? ? ?+36.0°C ?(high = +80.0°C, crit = +100.0°C)
Core 3: ? ? ? ?+39.0°C ?(high = +80.0°C, crit = +100.0°C)
CentOS下如何查看自己本本的 CPU 和 GPU 的溫度及 Fan(風(fēng)扇) 的轉(zhuǎn)速操作如下:
1、安裝 lm_sensors 軟件包 (如果已安裝了此軟件了,1和2步都跳過吧):$ sudo yum install lm_sensors
$ sudo apt-get install lm_sensors
2、手動(dòng)配置下(一路yes或enter就行了):$ sudo sensors-detect
3、最后打開終端輸入:$ sensors
這樣就輸出各傳感器的溫度及風(fēng)扇轉(zhuǎn)速了
原文鏈接:https://blog.csdn.net/inthat/article/details/128324752
相關(guān)推薦
- 2023-01-21 Python中的二維列表使用及說明_python
- 2022-08-05 Python時(shí)間操作之pytz模塊使用詳解_python
- 2022-02-20 Spring Boot 打包報(bào)錯(cuò)Failed to execute goal org.apache.
- 2022-07-03 C#?Winform中DataGridView導(dǎo)出為Excel的實(shí)現(xiàn)示例_C#教程
- 2023-03-21 Python代碼模擬CPU工作原理_python
- 2022-11-27 Oracle?中檢查臨時(shí)表空間的方法_oracle
- 2024-03-28 存儲(chǔ)過程整合springboot
- 2022-07-03 C語言中二級(jí)指針解析(指向指針的指針)_C 語言
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運(yùn)行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲(chǔ)小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運(yùn)算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯(cuò)誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實(shí)現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡(jiǎn)單動(dòng)態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對(duì)象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊(duì)列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支