Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


k8temp - AMD K8 thermal diode reader

k8temp displays readings from the on-die thermal diodes found in most
AMD K8 processors, including Athlon 64's and Opterons.

As of 0.4.0, k8temp can also produce values from AMD K10's, including
Barcelona and Phenom.  This support is experimental, and is unlikely to
report realistic values at this time.

Since this pokes at PCI registers, it has the potential to make your system
crash, reboot, catch fire, and frame you for conspiracy to murder heads of state.

k8temp has caused at least one of these things to happen during development.

If you're on FreeBSD, consider using the port at sysutils/k8temp.

Otherwise, just:

  make install

The Makefile should detect any flags your OS needs.

If you want to try it on a system without

  cc -o k8temp k8temp.c k8temp_devpci.c

OpenBSD users (who have USER_PCI configured kernels) may want:

  cc -DWITHOUT_PCIOCGETCONF -o k8temp k8temp.c k8temp_devpci.c

NetBSD users can try:

  cc -DWITH_LIBPCI -o k8temp k8temp.c k8temp_libpci.c

But note this has only been build tested (on FreeBSD and NetBSD/Sparc...)

DragonFlyBSD should Just Work(tm), since it has an identical /dev/pci API
to FreeBSD.

Let me know if you get it working on systems other than FreeBSD 6 or 7.

-% sudo k8temp
CPU 0 Core 0 Sensor 0: 35c
CPU 0 Core 1 Sensor 0: 36c
CPU 1 Core 0 Sensor 0: 33c
CPU 1 Core 1 Sensor 0: 32c
-% sudo k8temp -n 0:0:0 1:0:0
-% sudo k8temp -d
CPUID: Vendor: AuthenticAMD, Id=0x20f12 Model=1 Family=15 Stepping=2
Advanced Power Management=0xf
   Temperature sensor: Yes
 Frequency ID control: Yes
   Voltage ID control: Yes
    THERMTRIP support: Yes
   HW Thermal control: No
   SW Thermal control: No
   100MHz multipliers: No
   HW P-State control: No
        TSC Invariant: No
Thermtrip=0x0d540524 (CurTmp=0x54 (35c) TjOffset=0x0d DiodeOffset=0x05 (6c))
CPU 0 Core 0 Sensor 0: 35c
Thermtrip=0x0d560520 (CurTmp=0x56 (37c) TjOffset=0x0d DiodeOffset=0x05 (6c))
CPU 0 Core 1 Sensor 0: 37c
Thermtrip=0x0f530224 (CurTmp=0x53 (34c) TjOffset=0x0f DiodeOffset=0x02 (9c))
CPU 1 Core 0 Sensor 0: 34c
Thermtrip=0x0f520220 (CurTmp=0x52 (33c) TjOffset=0x0f DiodeOffset=0x02 (9c))
CPU 1 Core 1 Sensor 0: 33c

Yes, some AMD64's allegedly have two sensors per core.

BIOS and Kernel Developer's Guide for AMD NPT Family 0fh Processors.
 Section 4.6.23, Thermtrip Status Register.

BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors
 Section 3.6.F3xA4, Reported Temperature Control Register.

AMD CPUID Specification, revision 2.26.

Linux kernel, drivers/hwmon/k8temp.c

k8temp was written by Thomas Hurst <>



A utility to read the on-die temperature sensors on AMD K8/K10 CPUs on BSD systems.



No packages published