Feature #11184


Want CPU Temperature Sensors

Added by Robert Mustacchi about 5 years ago. Updated almost 5 years ago.

driver - device drivers
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:


Both Intel and AMD support means to have temperature sensors for the cores and packages that exist. It'd be nice if we could have a driver that covered AMD Family 17h and recent Intel processors. On Intel processors we have a per-core sensor and a per-chip sensor when available. On AMD F17h systems, the sensor exists on a per-die basis. As part of this, we'll begin a somewhat generic sensor framework to give us building blocks for the future.

To test this, I did a number of various things:

  • I used ctfdump to compare the 32-bit user/ 64-bit kernel sizes of the ioctl structures to verify that they are the same size (therefore copyout won't overrun a user bufer)
  • I tested this on a number of hardware systems that have IPMI and compared the values we had with those that IPMI reported and found we were generally within a degree of what it measured
  • Verified that we have the files in /dev/sensor that we expect on the following Intel / AMD platforms:
  • * Ivy Bridge (client), which only has the core and not package sensors
  • * Haswell (client), which has core and package sensors
  • * Skylake (server), which has core and package sensors
  • * Coffee Lake (client), which has core and package sensors
  • * AMD EPYC (server)
  • * AMD Threadripper (client)
  • Manually verified that we had the right offsets detected for Threadripper systems

Here's an example of what a sensor looks like on an AMD Ryzen system from fmtopo:

  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=AS--2023US-TR4:server-id=odyssey:chassis-id=S268672X7C09080/motherboard=0/chip=1/core=2?sensor=temp
  group: authority                      version: 1   stability: Private/Private
    product-id        string    AS--2023US-TR4
    chassis-id        string    S268672X7C09080
    server-id         string    odyssey
  group: facility                       version: 1   stability: Private/Private
    sensor-class      string    threshold
    type              uint32    0x1 (TEMP)
    units             uint32    0x1 (DEGREES_C)
    reading           double    38.500000

Related issues

Related to illumos gate - Bug #11332: Regression: 11184 causes kernel hang during boot on CPUs without ARATClosed

Related to illumos gate - Feature #12954: Rewrite coretemp to use the ksensor frameworkClosedRobert Mustacchi

Actions #1

Updated by Electric Monk almost 5 years ago

  • Status changed from New to Closed

git commit f2dbfd322ec9cd157a6e2cd8a53569e718a4b0af

commit  f2dbfd322ec9cd157a6e2cd8a53569e718a4b0af
Author: Robert Mustacchi <>
Date:   2019-06-22T01:22:46.000Z

    11184 Want CPU Temperature Sensors
    11185 i86pc chip module should be smatch clean
    Reviewed by: Hans Rosenfeld <>
    Reviewed by: Jordan Hendricks <>
    Reviewed by: Patrick Mooney <>
    Reviewed by: Toomas Soome <>
    Approved by: Garrett D'Amore <>

Actions #2

Updated by Spencer Berger almost 5 years ago

  • Related to Bug #11332: Regression: 11184 causes kernel hang during boot on CPUs without ARAT added
Actions #3

Updated by Robert Mustacchi almost 4 years ago

  • Related to Feature #12954: Rewrite coretemp to use the ksensor framework added

Also available in: Atom PDF