Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arloor/intel_cpu_temperature
操作MSR寄存器,实现对CPU温度、功耗的读取、控制
https://github.com/arloor/intel_cpu_temperature
Last synced: 10 days ago
JSON representation
操作MSR寄存器,实现对CPU温度、功耗的读取、控制
- Host: GitHub
- URL: https://github.com/arloor/intel_cpu_temperature
- Owner: arloor
- Created: 2019-01-08T14:58:17.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-09T06:27:00.000Z (12 months ago)
- Last Synced: 2024-10-20T06:27:07.007Z (about 1 month ago)
- Language: C
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# c语言 读取Intel cpu MSR寄存器,以读取cpu温度
## 编译
```bash
yum install -y zlib-devel gcc # debian系自行修改
gcc main.c -lm -o to
mv to /usr/local/bin/to
```## 运行
运行需要sudo权限!!
运行结果:
```bash
$ sudo ./mo
cpu max temp= 100
cpu temps= 47 47 46 47 47 48 46 47
cpu temps= 47 48 46 47 47 48 46 47
cpu temps= 47 47 46 47 47 47 46 47
cpu temps= 47 47 46 47 47 47 46 47
cpu temps= 47 47 47 48 47 47 47 48
cpu temps= 69 68 68 67 69 68 68 67
cpu temps= 78 75 76 74 78 75 76 74
cpu temps= 50 50 49 50 50 50 49 50
cpu temps= 51 50 49 50 51 50 49 50
cpu temps= 51 57 52 53 51 57 52 53
cpu temps= 79 75 74 75 79 75 74 75
cpu temps= 76 73 74 73 76 73 74 73
cpu temps= 81 79 81 79 81 79 81 79
cpu temps= 84 81 83 81 84 81 83 81
cpu temps= 59 58 58 58 59 58 58 58
cpu temps= 57 57 56 56 57 57 56 56
cpu temps= 56 55 55 55 56 55 55 55
cpu temps= 54 56 54 54 54 56 54 55
cpu temps= 54 54 53 54 54 54 53 54
cpu temps= 53 53 52 53 53 53 52 53
cpu temps= 52 53 51 52 52 53 51 52
cpu temps= 52 52 51 52 52 52 51 52
cpu temps= 51 51 50 51 51 51 50 51
cpu temps= 51 51 50 51 51 50 50 51
cpu temps= 51 50 50 50 51 50 50 50
cpu temps= 50 50 49 50 50 50 49 50
cpu temps= 51 50 50 50 51 50 50 50
cpu temps= 50 50 49 50 50 50 49 50
```# 目标:
下一步写MSR寄存器,来设置cpu的功耗墙、温度墙。
# c语言语法使用参见
[我的C_study](https://github.com/arloor/C_study)
# python原项目:
[lenovo-throttling-fix](https://github.com/erpalma/lenovo-throttling-fix)