高通android设备themal读取cpu温度

news/2024/10/20 0:37:17/

以msm8953的themal分布信息,主要是下图的位置:

这其中 cpu相关的themal的位置有:

读取thermal 温度数据可以通过以下几个步骤:

获取sensor_info

 
  1. root@msm8953_64:/ # cat /sys/module/msm_thermal/sensor_info

  2. tsens:tsens_tz_sensor0::10

  3. tsens:tsens_tz_sensor1::10

  4. tsens:tsens_tz_sensor2:pop_mem:10

  5. tsens:tsens_tz_sensor3::10

  6. tsens:tsens_tz_sensor4:cpu4:10

  7. tsens:tsens_tz_sensor5:cpu5:10

  8. tsens:tsens_tz_sensor6:cpu6:10

  9. tsens:tsens_tz_sensor7:cpu7:10

  10. tsens:tsens_tz_sensor8:L2_cache_1:10

  11. tsens:tsens_tz_sensor9:cpu0:10

  12. tsens:tsens_tz_sensor10:cpu1:10

  13. tsens:tsens_tz_sensor11:cpu2:10

  14. tsens:tsens_tz_sensor12:cpu3:10

  15. tsens:tsens_tz_sensor13:L2_cache_0:10

  16. tsens:tsens_tz_sensor14::10

  17. tsens:tsens_tz_sensor15:gpu:10

  18. alarm:pm8953_tz::1000

  19. adc:pa_therm0::1

  20. adc:pa_therm1::1

  21. adc:xo_therm::1

  22. adc:xo_therm_buf::1

  23. adc:case_therm::1

在/sys/class/thermal/ 路径下可以看到所有的thermal_zone
 

 
  1. msm8953_64:/sys/class/thermal # ls

  2. thermal_zone0 thermal_zone11 thermal_zone14 thermal_zone17 thermal_zone2 thermal_zone22 thermal_zone4 thermal_zone7

  3. thermal_zone1 thermal_zone12 thermal_zone15 thermal_zone18 thermal_zone20 thermal_zone23 thermal_zone5 thermal_zone8

  4. thermal_zone10 thermal_zone13 thermal_zone16 thermal_zone19 thermal_zone21 thermal_zone3 thermal_zone6 thermal_zone9

那么怎么知道具体的温度信息就需要结合上面的sensor_info来对比分析了。

先获取所有的tmpe信息:
 

 
  1. msm8953_64:/sys/class/thermal # cat */temp

  2. 25000

  3. -40

  4. 309

  5. 309

  6. 313

  7. 322

  8. 309

  9. 306

  10. 309

  11. 319

  12. 313

  13. 303

  14. 31

  15. 306

  16. 32636

  17. 30

  18. 25000

  19. 30

  20. 7

  21. 24612

  22. 306

  23. 306

  24. 306

  25. 322

  26. bms

每个节点对应的type

 
  1. msm8953_64:/sys/class/thermal # cat */type

  2. bms

  3. pa_therm1

  4. tsens_tz_sensor5

  5. tsens_tz_sensor6

  6. tsens_tz_sensor7

  7. tsens_tz_sensor8

  8. tsens_tz_sensor9

  9. tsens_tz_sensor10

  10. tsens_tz_sensor11

  11. tsens_tz_sensor12

  12. tsens_tz_sensor13

  13. tsens_tz_sensor14

  14. xo_therm

  15. tsens_tz_sensor15

  16. pm8953_tz

  17. pa_therm0

  18. battery

  19. xo_therm_buf

  20. case_therm

  21. chg_temp

  22. tsens_tz_sensor1

  23. tsens_tz_sensor2

  24. tsens_tz_sensor3

  25. tsens_tz_sensor4

这3者信息相结合,即可得到该thermal的温度信息;

举一个例子:

thermal_zone10 –> tsens_tz_sensor5 -> 309

在sensor_info中这个节点的信息是tsens:tsens_tz_sensor5:cpu5:10

最后的10 表示比例是1:10,也就是表示309是表示cpu5的温度是30.9摄氏度。

高通android设备themal读取cpu温度_android 获取cpu温度-CSDN博客


http://www.ppmy.cn/news/1342344.html

相关文章

ANN(MLP) 三种预测

目录 介绍: 一、Mlp for binary classification 数据: 模型: 预测: 二、Mlp for Multiclass Classification 数据: 模型: 预测: 三、MLP for Regression 数据: 模型&a…

Springboot 自定义参数配置化,密钥,密码,文件保存路径

application.properties 和 application.yml 都是一样的配置方法,只是格式不一样 定义配置文件 server.port8080 image.save.pathE:\ #自定义文件保存路径读取配置文件 Value("${image.save.path}")private String filePath;//E:\优化配置文件 如果我参…

【MySQL】——数据定义

🎃个人专栏: 🐬 算法设计与分析:算法设计与分析_IT闫的博客-CSDN博客 🐳Java基础:Java基础_IT闫的博客-CSDN博客 🐋c语言:c语言_IT闫的博客-CSDN博客 🐟MySQL&#xff1a…

【日志记录】——主MCU 通过私有协议更新从MCU程序固件

一:需求分析 在一些系统较为复杂的嵌入式设备中,往往不止一片MCU或者处理模块,通常为一片主MCU负责应用逻辑处理和对外网络通信,其他从MCU负责实时采集处理高频数据,在设备运营过程中,往往伴随新需求或者bu…

ElementUI Form:InputNumber 计数器

ElementUI安装与使用指南 InputNumber 计数器 点击下载learnelementuispringboot项目源码 效果图 el-radio.vue &#xff08;InputNumber 计数器&#xff09;页面效果图 项目里el-input-number.vue代码 <script> export default {name: el_input_number,data() {re…

数据库指定某个列的某个值优先排序

有时候接到这么一个需求&#xff0c;就是指定某个商品某个品牌优先展示&#xff0c;那么数据库SQL该怎么实现呢&#xff1f; 比如商品表&#xff08;goods&#xff09;&#xff0c;有个品牌字段&#xff08;brand&#xff09;&#xff0c;公司要求优先展示【华为】品牌的商品&…

[C语言]结构体初识

结构体定义 结构体是一些值的集合,被成为成员变量,结构的每个成员可以是不同类型的变量 声明: 定义了一个结构体比如以张蓝图,不占据内存,当你创建了一个结构体变量时,才占空间. #include<stdio.h>//struct 为结构体关键字, student 自定义结构体名称 struct student …

node 版本管理器 --- Volta

前言 在我们的日常开发中经常会遇到这种情况:手上有好几个项目,每个项目的需求不同,然而不同项目必须依赖不同版的 NodeJS 运行环境。 基于这种情况,我们一般会使用 nvm 来安装和切换NodeJs。 最近发现了一个更好用的 node 版本管理器 — Volta ,相比于 nvm , Volta 更…