简体   繁体   中英

Ubuntu how to check current CPU temperature in C++

I'm running Ubuntu 14.04. I want to write a c++ program that would give me the current CPU temperature. Is there a system call to get this data? I want to do it periodically, and pretty frequently. What is the best way to do it? Thanks

It appears this would do what you require: package lm_sensors and libsensors (to access it from your programs without reading the values from the sys/ files)

https://en.wikipedia.org/wiki/Lm_sensors

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM