Code Monkey home page Code Monkey logo

k8temp's Introduction

k8temp - AMD K8 thermal diode reader
====================================

Synopsis
--------
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.


=======
WARNING
=======
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.


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

Otherwise, just:

  make
  make install

The Makefile should detect any flags your OS needs.

If you want to try it on a system without bsd.prog.mk:

  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.


Examples
--------
-% 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
35
33
-% 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.


References
----------
BIOS and Kernel Developer's Guide for AMD NPT Family 0fh Processors.
 Section 4.6.23, Thermtrip Status Register.
  http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf

BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors
 Section 3.6.F3xA4, Reported Temperature Control Register.
  http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/31116.pdf

AMD CPUID Specification, revision 2.26.
  http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25481.pdf

Linux kernel, drivers/hwmon/k8temp.c


Blame
-----
k8temp was written by Thomas Hurst <[email protected]>

WWW:  http://hur.st/k8temp/

k8temp's People

Contributors

freaky avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.