≡ Menu

FreeBSD find CPU (processor) temperature command

I‘m a new FreeBSD unix user. How do I get the temperature of an Intel or AMD processor (CPU) in FreeBSD using command line option? Is there a command line option for determine CPU temperature on FreeBSD Unix operating system?
temperature in FreeBSD

You can read data from FreeBSD kernel using any one the following method.

How to determine CPU temperature on FreeBSD

You just need to type the following command to see cpu temperature in FreeBSD operating system:
$ sysctl -a | grep temperature
OR
$ sysctl dev.cpu | grep temperature
Sample outputs:

Fig.01: Determine CPU temperature

Fig.01: Determine CPU temperature

(optional) Load coretemp driver at boot time

For Intel based cpu you need to load or use coretemp driver. To load the driver as a module at boot time, append the following line in loader.conf(5):
# vi /boot/loader.conf
Append the following:
coretemp_load="YES"
Save and close the file. To load the driver without rebooting the box, enter:
# kldload coretemp
Once loaded you can verify it with dmesg command
# dmesg | tail -10
Sample outputs:

igb0: link state changed to UP
arp: 192.168.2.254 moved from 20:5c:24:70:00:f8 to 00:08:a2:0a:ba:b8 on igb0
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
coretemp2: <CPU On-Die Thermal Sensors> on cpu2
coretemp3: <CPU On-Die Thermal Sensors> on cpu3
coretemp4: <CPU On-Die Thermal Sensors> on cpu4
coretemp5: <CPU On-Die Thermal Sensors> on cpu5
coretemp6: <CPU On-Die Thermal Sensors> on cpu6
coretemp7: <CPU On-Die Thermal Sensors> on cpu7

Now to determine your CPU temperature on FreeBSD, type:
# sysctl -a | grep -i temperature
Sample output from Intel Xeon E3-1285L v4 CPU:

hw.acpi.thermal.tz1.temperature: 29.9C
hw.acpi.thermal.tz0.temperature: 27.9C
dev.cpu.7.temperature: 41.0C
dev.cpu.6.temperature: 41.0C
dev.cpu.5.temperature: 40.0C
dev.cpu.4.temperature: 40.0C
dev.cpu.3.temperature: 41.0C
dev.cpu.2.temperature: 41.0C
dev.cpu.1.temperature: 40.0C
dev.cpu.0.temperature: 40.0C

A note about ipmitool

To see detailed sensor information use ipmitool (Intelligent Platform Management Interface) command as follows on your FreeBSD based server:
# ipmitool sensor
Sample outputs:

ATX+5VSB         | 5.070      | Volts      | ok    | 4.230     | 4.710     | na        | na        | 5.550     | 5.610     
+3VSB            | 3.500      | Volts      | ok    | 2.780     | 2.820     | na        | na        | 3.660     | 3.680     
Vcore            | 0.830      | Volts      | ok    | 0.540     | 0.560     | 0.600     | 1.490     | 1.560     | 1.640     
VCCM             | 1.350      | Volts      | ok    | 1.090     | 1.120     | na        | na        | 1.720     | 1.750     
+1.1             | 1.090      | Volts      | ok    | 0.850     | 0.890     | 0.940     | 1.150     | 1.210     | 1.270     
+1.0             | 1.020      | Volts      | ok    | 0.850     | 0.890     | 0.940     | 1.150     | 1.210     | 1.270     
BAT              | 3.200      | Volts      | ok    | 2.380     | 2.500     | na        | na        | 3.580     | 3.680     
+3V              | 3.300      | Volts      | ok    | 2.780     | 2.820     | na        | na        | 3.660     | 3.680     
+5V              | 5.010      | Volts      | ok    | 4.230     | 4.710     | na        | na        | 5.550     | 5.610     
+12V             | 12.200     | Volts      | ok    | 10.100    | 10.300    | na        | na        | 13.300    | 13.400    
CPU_FAN1         | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na        
REAR_FAN1        | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na        
FRNT_FAN1        | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na        
FRNT_FAN2        | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na        
REAR_FAN2        | 1200.000   | RPM        | ok    | na        | na        | 100.000   | na        | na        | na        
CPU_FAN2         | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na        
MB Temperature   | 55.000     | degrees C  | ok    | na        | na        | na        | 80.000    | na        | na        
CPU Temperature  | 52.000     | degrees C  | ok    | na        | na        | na        | 80.000    | 85.000    | 90.00
Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:



{ 2 comments… add one }
  • Ron May 14, 2016, 7:57 pm

    AMD
    #kldload amdtemp
    #sysctl -a | grep temperature
    dev.cpu.1.temperature: 40.3C
    dev.cpu.0.temperature: 40.3C

    • Peter September 4, 2016, 2:50 am

      Ron, thank you sir! i have added amdtemp into my loader.conf thanks to you!

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: , , , ,