There are many questions similar to this but I haven't found solution there.
How can I get CPU temperature in C or C++ on Linux Ubuntu 12.10 without call to sensors
? I can of course just read it from file, however I cannot find where it is stored in 12.10. And is simple reading a text file only possibility or maybe I can query the kernel using system call or signal?
Content of my folder /proc/acpi/ is just
event wakeup
No THEMP0 there or anything like this. sensors
application however can display a temperature on my machine.
no /sys/class/thermal/thermal_zone0/
directory
in /sys/class/thermal
I have
cooling_device0@ cooling_device1@ cooling_device2@ cooling_device3@
I'm trying to browse lm-sensors source code in search for how it retrieves temperature, to no avail so far, however I am close. The file is
http://lm-sensors.org/browser/lm-sensors/trunk/lib/sysfs.c
in particular:
line 846:
846 int sensors_read_sysfs_attr(const sensors_chip_name *name,
847 const sensors_subfeature *subfeature,
848 double *value)