* [lm-sensors] Using libsensors in custom application
@ 2007-07-05 21:52 John Beavers
2007-07-14 19:47 ` Jean Delvare
0 siblings, 1 reply; 2+ messages in thread
From: John Beavers @ 2007-07-05 21:52 UTC (permalink / raw)
To: lm-sensors
[-- Attachment #1.1: Type: text/plain, Size: 801 bytes --]
Hello,
I'm trying to develop an application that can get the temperature of the CPU
/ MB and send it to another machine on the network for remote temperature
monitoring. I've managed to compile and run a program that successfully
sends test data over the network, reads chip data like sensors (using the
same code), but I cannot get it to do both together. Basically, I cannot
tell where / how sensors is getting the information it is outputting to the
screen. I've tracked it down to m->fn(&name); in the do_a_print() function,
but I cannot see how that line prints out the chip information. My question
is, is there a tutorial of how to use libsensors in an application
somewhere, or can you give me a brief explanation of how to get the CPU &
MB temp from libsensors?
Thanks,
John Beavers
[-- Attachment #1.2: Type: text/html, Size: 1597 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [lm-sensors] Using libsensors in custom application
2007-07-05 21:52 [lm-sensors] Using libsensors in custom application John Beavers
@ 2007-07-14 19:47 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2007-07-14 19:47 UTC (permalink / raw)
To: lm-sensors
Hi John,
On Thu, 5 Jul 2007 16:52:52 -0500, John Beavers wrote:
> I'm trying to develop an application that can get the temperature of the CPU
> / MB and send it to another machine on the network for remote temperature
> monitoring. I've managed to compile and run a program that successfully
> sends test data over the network, reads chip data like sensors (using the
> same code), but I cannot get it to do both together. Basically, I cannot
> tell where / how sensors is getting the information it is outputting to the
> screen. I've tracked it down to m->fn(&name); in the do_a_print() function,
> but I cannot see how that line prints out the chip information.
The callback function (m->fn) is chip-specific. The "matches" array
gives the correspondence between a chip name and its printing function.
All the printing functions are in a different source file (chips.c).
Yes, it's a mess.
> My question
> is, is there a tutorial of how to use libsensors in an application
> somewhere,
sensors' source code is the tutorial. And you have the libsensors man
page for reference, too.
> or can you give me a brief explanation of how to get the CPU &
> MB temp from libsensors?
libsensors can't give you that, because it has no knowledge of what
sensor measures what. In its current incarnation, it doesn't even
know which sensors are temperature sensors, and which are, say, fan
sensors. This will be much better in the next (major) version, but for
now, libsensors is heavily chip-specific.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-14 19:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-05 21:52 [lm-sensors] Using libsensors in custom application John Beavers
2007-07-14 19:47 ` Jean Delvare
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.