-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel A. Ramaley wrote:
> The lines in sensorsd.conf start with "hw.sensors.N" (where N is a small 
> natural number). How do i determine N for each sensor? Is there a list 
> somewhere that tells what is what? Or is there a command i can run to 
> generate a list?

`sysctl hw.sensors` will show you the list of all the sensors and their
appropriate number (and current value). As I found out a couple of days
ago, sysctl(8) does this by just trying all possible N's for 1 to 256
and then checks what each sensor is. AFAICT, that's the only facility
the kernel offers to find them.

> Secondly, is it possible to read the current values of sensors? For 
> example, say i have configured a sensor to monitor the CPU temperature. 
> Is there a way to find out what the current temperature is?

sysctl(8), again. If CPU temp is hw.sensors.4, then sysctl hw.sensors.4
will tell you. Sensorsd is more for watching for threshholds and
boundary readings, rather than a real-time display of the current reading.

If you're programming, you can also use sysctl(3); it would be something
like sysctl({CTL_HW, HW_SENSORS, 4}, 3, &some_allocated_buffer,
length_of_that_buffer, NULL, 0);
some_allocated_buffer will then hold the struct sensor containing its
current state.

Weldon Goree
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEtnuvixcispFzVm8RAttkAJ95eFTvJaaqn4R1Tkf1Kpo9c1KtuwCfS5aG
0ET6NQe4/KoC6iUw2w6qipk=
=PTNG
-----END PGP SIGNATURE-----

Reply via email to