鱼C论坛

 找回密码
 立即注册
查看: 4454|回复: 8

[已解决]怎么实时获取win 的 cpu温度

[复制链接]
发表于 2022-4-19 11:36:08 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
如题
我百度到的都是 获取 固定的值
最佳答案
2022-4-29 10:14:15
城中城 发表于 2022-4-28 16:39
我其实试过  这个 是开机监测一次  后面不够怎么调用 都是固定的温度

???  你到底怎么试过?还是说你的系统是有什么特殊之处???
PS C:\Users\Administrator> typeperf "\Thermal Zone Information(*)\Temperature"

"(PDH-CSV 4.0)","\\SC-202008030352\Thermal Zone Information(\_TZ.TZ01)\Temperature"
"04/29/2022 10:11:02.029","338.000000"
"04/29/2022 10:11:03.030","331.000000"
"04/29/2022 10:11:04.031","330.000000"
"04/29/2022 10:11:05.032","329.000000"
"04/29/2022 10:11:06.032","327.000000"
"04/29/2022 10:11:07.034","327.000000"
"04/29/2022 10:11:08.035","328.000000"
"04/29/2022 10:11:09.036","327.000000"
"04/29/2022 10:11:10.037","327.000000"
"04/29/2022 10:11:11.038","327.000000"
"04/29/2022 10:11:12.038","327.000000"
"04/29/2022 10:11:13.039","328.000000"
"04/29/2022 10:11:14.042","360.000000"      # 开启多个大软件后,温度就上来了
"04/29/2022 10:11:15.043","360.000000"
"04/29/2022 10:11:16.044","358.000000"
"04/29/2022 10:11:17.052","363.000000"
"04/29/2022 10:11:18.057","363.000000"
"04/29/2022 10:11:19.057","363.000000"
"04/29/2022 10:11:20.060","363.000000"
"04/29/2022 10:11:21.061","363.000000"
"04/29/2022 10:11:22.061","361.000000"
"04/29/2022 10:11:23.069","360.000000"
"04/29/2022 10:11:24.071","363.000000"
"04/29/2022 10:11:25.078","363.000000"
"04/29/2022 10:11:26.092","363.000000"
"04/29/2022 10:11:27.095","363.000000"
"04/29/2022 10:11:28.095","363.000000"
"04/29/2022 10:11:29.096","363.000000"
"04/29/2022 10:11:30.096","363.000000"
"04/29/2022 10:11:31.096","364.000000"
"04/29/2022 10:11:32.097","363.000000"
"04/29/2022 10:11:33.097","364.000000"
"04/29/2022 10:11:34.098","363.000000"
"04/29/2022 10:11:35.098","363.000000"
"04/29/2022 10:11:36.101","364.000000"
"04/29/2022 10:11:37.105","358.000000"

命令成功结束。
PS C:\Users\Administrator>
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-4-19 13:18:58 From FishC Mobile | 显示全部楼层
实时获取得有定时器啊
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-4-19 19:43:07 From FishC Mobile | 显示全部楼层
每秒获取一次不就可以了,或者自己设定频率
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-4-19 19:43:44 From FishC Mobile | 显示全部楼层
所谓的实时其实也不是实时
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-4-19 20:54:33 From FishC Mobile | 显示全部楼层
定时刷新不就好了,每秒获取一次
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-4-21 11:30:42 | 显示全部楼层
那我换一个问题  是 怎么动态获取 win10 cpu温度
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-4-21 17:54:46 | 显示全部楼层
本帖最后由 阿奇_o 于 2022-4-21 17:56 编辑
城中城 发表于 2022-4-21 11:30
那我换一个问题  是 怎么动态获取 win10 cpu温度


涉及操作系统和硬件的东西,那用它官方的最可靠,所以 可以用win10自带的 Powershell命令,比如  
typeperf "\Thermal Zone Information(*)\Temperature"
然后,用python的subprocess调用该命令,并解析它的 stdout,即可

ps: 这温度是 开尔文单位哦,需要自己转换一下~
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-4-28 16:39:20 | 显示全部楼层
阿奇_o 发表于 2022-4-21 17:54
涉及操作系统和硬件的东西,那用它官方的最可靠,所以 可以用win10自带的 Powershell命令,比如  

...

我其实试过  这个 是开机监测一次  后面不够怎么调用 都是固定的温度
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-4-29 10:14:15 | 显示全部楼层    本楼为最佳答案   
城中城 发表于 2022-4-28 16:39
我其实试过  这个 是开机监测一次  后面不够怎么调用 都是固定的温度

???  你到底怎么试过?还是说你的系统是有什么特殊之处???
PS C:\Users\Administrator> typeperf "\Thermal Zone Information(*)\Temperature"

"(PDH-CSV 4.0)","\\SC-202008030352\Thermal Zone Information(\_TZ.TZ01)\Temperature"
"04/29/2022 10:11:02.029","338.000000"
"04/29/2022 10:11:03.030","331.000000"
"04/29/2022 10:11:04.031","330.000000"
"04/29/2022 10:11:05.032","329.000000"
"04/29/2022 10:11:06.032","327.000000"
"04/29/2022 10:11:07.034","327.000000"
"04/29/2022 10:11:08.035","328.000000"
"04/29/2022 10:11:09.036","327.000000"
"04/29/2022 10:11:10.037","327.000000"
"04/29/2022 10:11:11.038","327.000000"
"04/29/2022 10:11:12.038","327.000000"
"04/29/2022 10:11:13.039","328.000000"
"04/29/2022 10:11:14.042","360.000000"      # 开启多个大软件后,温度就上来了
"04/29/2022 10:11:15.043","360.000000"
"04/29/2022 10:11:16.044","358.000000"
"04/29/2022 10:11:17.052","363.000000"
"04/29/2022 10:11:18.057","363.000000"
"04/29/2022 10:11:19.057","363.000000"
"04/29/2022 10:11:20.060","363.000000"
"04/29/2022 10:11:21.061","363.000000"
"04/29/2022 10:11:22.061","361.000000"
"04/29/2022 10:11:23.069","360.000000"
"04/29/2022 10:11:24.071","363.000000"
"04/29/2022 10:11:25.078","363.000000"
"04/29/2022 10:11:26.092","363.000000"
"04/29/2022 10:11:27.095","363.000000"
"04/29/2022 10:11:28.095","363.000000"
"04/29/2022 10:11:29.096","363.000000"
"04/29/2022 10:11:30.096","363.000000"
"04/29/2022 10:11:31.096","364.000000"
"04/29/2022 10:11:32.097","363.000000"
"04/29/2022 10:11:33.097","364.000000"
"04/29/2022 10:11:34.098","363.000000"
"04/29/2022 10:11:35.098","363.000000"
"04/29/2022 10:11:36.101","364.000000"
"04/29/2022 10:11:37.105","358.000000"

命令成功结束。
PS C:\Users\Administrator>
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-11-18 14:53

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表