Topic: other BSD's equivalent to NetBSD's envstat

Hello BSD geeks,

Notice at least in the online manual pages that open, free, and dragonfly don't have "envstat".
So, for these three OSes how would you get the cpu temperature?

Re: other BSD's equivalent to NetBSD's envstat

On FreeBSD you can use sysctl hw.acpi.thermal.

Trust me, I know what I'm doing.

Re: other BSD's equivalent to NetBSD's envstat

Thanks Carpetsmoker wink
Could you give example output.  So i can see I to parse it to get at the information that I wish to keep.

Now OpenBSD and DragonFlyBSD users don't be shy hmm

Last edited by Bitweiler (2008-03-23 19:38:44)

Re: other BSD's equivalent to NetBSD's envstat

On my system:

[~]# sysctl hw.acpi.thermal
hw.acpi.thermal.min_runtime: 0
hw.acpi.thermal.polling_rate: 10
hw.acpi.thermal.user_override: 0
hw.acpi.thermal.tz0.temperature: 46.5C
hw.acpi.thermal.tz0.active: -1
hw.acpi.thermal.tz0.passive_cooling: 1
hw.acpi.thermal.tz0.thermal_flags: 0
hw.acpi.thermal.tz0._PSV: 80.0C
hw.acpi.thermal.tz0._HOT: -1
hw.acpi.thermal.tz0._CRT: 100.0C
hw.acpi.thermal.tz0._ACx: 80.0C -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz0._TC1: 4
hw.acpi.thermal.tz0._TC2: 3
hw.acpi.thermal.tz0._TSP: 60

The CPU temperature being hw.acpi.thermal.tz0.temperature.
Note that output differs from system to system, and some systems may not have this at all.

Trust me, I know what I'm doing.

Re: other BSD's equivalent to NetBSD's envstat

OpenBSD 4.2

$ sysctl hw.sensors
hw.sensors.admtemp0.temp0=44.00 degC (Xeon)
hw.sensors.admtemp0.temp1=32.00 degC (Xeon)
hw.sensors.admtemp1.temp0=39.00 degC (Xeon)
hw.sensors.admtemp1.temp1=34.00 degC (Xeon)
hw.sensors.lm0.temp0=35.00 degC
hw.sensors.lm0.temp1=35.50 degC
hw.sensors.lm0.temp2=35.50 degC
hw.sensors.lm0.fan0=4218 RPM
hw.sensors.lm0.fan1=3970 RPM
hw.sensors.lm0.volt0=1.47 VDC (VCore A)
hw.sensors.lm0.volt1=3.34 VDC (VCore B)
hw.sensors.lm0.volt2=3.30 VDC (+3.3V)
hw.sensors.lm0.volt3=5.00 VDC (+5V)
hw.sensors.lm0.volt4=12.22 VDC (+12V)
hw.sensors.lm0.volt5=-11.46 VDC (-12V)
hw.sensors.lm0.volt6=-1.98 VDC (-5V)
hw.sensors.lm0.volt7=4.80 VDC (5VSB)
hw.sensors.lm0.volt8=3.25 VDC (VBAT)

(This is from the machine hosting forums.bsdnexus.com ...)

Re: other BSD's equivalent to NetBSD's envstat

Thanks jage and Carpetsmoker, mainly it will be used for desktops and laptops via Stumpwm.
there is some code that shows this in Stumpwm mode-line for Linux so, I wanted to have the same thing for NetBSD, but why stop there include the other bsd's as well.

Again thanks a million