網(wǎng)站首頁 編程語言 正文
Linux命令行如何查看cpu和顯卡溫度
lm_sensors,是一款基于linux系統(tǒng)的硬件監(jiān)控的軟件??梢员O(jiān)控主板,CPU的工作電壓,溫度等數(shù)據(jù)。
實際上sensors命令只是讀取了/sys/class/hwmon/目錄下關于CPU等傳感器溫度參數(shù)并直觀的展示給我們,我們不安裝lm_sensors模塊下也可以查看CPU溫度。
在Linux下可以通過lm_sensors來查看CPU的溫度(當然你的硬件首先要支持),且使用這個功能要有內(nèi)核相關模塊(比如I2C)的支持
默認情況下,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
補充知識點:
linux服務器如何查看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
檢測傳感器:#?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(風扇) 的轉速操作如下:
1、安裝 lm_sensors 軟件包 (如果已安裝了此軟件了,1和2步都跳過吧):$ sudo yum install lm_sensors
$ sudo apt-get install lm_sensors
2、手動配置下(一路yes或enter就行了):$ sudo sensors-detect
3、最后打開終端輸入:$ sensors
這樣就輸出各傳感器的溫度及風扇轉速了
原文鏈接:https://blog.csdn.net/inthat/article/details/128324752
相關推薦
- 2022-10-30 移動web開發(fā)技能之touch事件詳解_IOS
- 2024-07-22 Linux 中運行的top命令 怎么退出?
- 2023-03-26 WPF實現(xiàn)頁面的切換的示例代碼_C#教程
- 2022-12-29 Kotlin數(shù)據(jù)存儲方式全面總結講解_Android
- 2023-03-01 pyinstaller打包后偶爾出現(xiàn)黑窗口一閃而過的問題及解決_python
- 2023-01-30 Python中String模塊示例詳解_python
- 2022-04-28 sql?server?累計求和實現(xiàn)代碼_MsSql
- 2024-01-11 redis開啟密碼驗證
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細win安裝深度學習環(huán)境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結構-簡單動態(tài)字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支