Re: CPU temperature monitoring in C++?
- From: Rui Maciel <rui.maciel@xxxxxxxxx>
- Date: Sat, 30 Jun 2007 09:27:25 +0100
kimiraikkonen wrote:
Seems that you did not read my previous message of this topic. I know
some programs which monitors temp. I just want to know how they're
coded and how i can write a basic cpu temp reader code.
That depends on your platform. With linux that information is available
through a file interface in the /proc directory tree. So in effect the only
thing anyone needs to do to get the system temperature is read a plain text
file. The same thing applies to other system properties.
Here is a small example. The cat program simply reads the file and outputs
it's content to the standard output.
<example>
rui@ubuntu:~$ cat /proc/acpi/thermal_zone/THRC/temperature
temperature: 50 C
rui@ubuntu:~$ cat /proc/acpi/thermal_zone/THRS/temperature
temperature: 41 C
</example>
Rui Maciel
.
- References:
- CPU temperature monitoring in C++?
- From: kimiraikkonen
- Re: CPU temperature monitoring in C++?
- From: Jim Langston
- Re: CPU temperature monitoring in C++?
- From: kimiraikkonen
- Re: CPU temperature monitoring in C++?
- From: Rui Maciel
- Re: CPU temperature monitoring in C++?
- From: kimiraikkonen
- CPU temperature monitoring in C++?
- Prev by Date: Re: Efficient Vector Comparison
- Next by Date: Re: Application programming language of choice
- Previous by thread: Re: CPU temperature monitoring in C++?
- Next by thread: Efficient Vector Comparison
- Index(es):