how do we check system temperature in linux?

Discussion in 'General Linux' started by enhu, Jan 2, 2012.

  1. enhu

    enhu New Member

    Messages:
    93
    Likes Received:
    4
    Trophy Points:
    0
    just like the title says, how do we check system temperature in linux using the terminal?
    without installing a software.

  2. Rob

    Rob Administrator Staff Member

    Messages:
    573
    Likes Received:
    186
    Trophy Points:
    43
    W/O installing software you could try:
    [xcode=bash]acpi -t[/xcode]

    If that doesn't work, install the lm_sensors package and query it..

    Debian based:
    [xcode=bash]
    apt-get install lm_sensors
    sensors
    [/xcode]

    Red Hat based:
    [xcode=bash]
    yum install lm_sensors
    sensors
    [/xcode]

    Example output:
    [xcode=bash]
    [rob@station-222 ~]$ sensors
    nouveau-pci-0100
    Adapter: PCI adapter
    temp1: +44.0°C (high = +100.0°C, crit = +110.0°C)
    [/xcode]

    (or in Fahrenheit)
    [xcode=bash]
    [rob@station-222 ~]$ sensors -f
    nouveau-pci-0100
    Adapter: PCI adapter
    temp1: +111.2°F (high = +212.0°F, crit = +230.0°F)
    [/xcode]
  3. enhu

    enhu New Member

    Messages:
    93
    Likes Received:
    4
    Trophy Points:
    0
    lm_sensors seem not available in bodhilinux, it says

    also acpi -t don't work either. maybe i just have to move to another distro. so concern about temperature these days because i've just installed anew CPU and wanna see how effect the thermal paste i've put.
  4. carbon333

    carbon333 New Member

    Messages:
    87
    Likes Received:
    6
    Trophy Points:
    0
    It may be possible that your motherboard is incompatible with Linux at all.
  5. Wagner Skellington

    Wagner Skellington New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi, Enhu. The problem in this case is too simple.
    The sensors package name is actually lm-sensor. Bodhi Linux is based on Ubuntu and uses its repositories. You should already have solved the problem, but in case someone else be in doubt,, the answer to this problem is just install acpi and/or lm-sensors.

    $ sudo apt-get install acpi
    $ sudo apt-get install lm-sensors

  6. Hatomix

    Hatomix New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
  7. MikeyD

    MikeyD Active Member

    Messages:
    224
    Likes Received:
    108
    Trophy Points:
    43
    you can check if lm-sensors is already on your machine by locating the hwmon directory.
    In arch it is either in /sys/devices/hwmon or /sys/class/hwmon. Unfortunately not sure if its the same in Ubuntu/Bodhi.
  8. flunwyc

    flunwyc Member

    Messages:
    99
    Likes Received:
    61
    Trophy Points:
    18
    In Debian based systems you can tell if a package is installed quite easily by using aptitude

    Code:
    $ aptitude search ~ilm-sensors
    (~i instructs aptitude to search among installed packages - there is no space been the ~i operator and the search string.)

    This is probably easier - not to mention more useful - than searching for individual files.
  9. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,201
    Likes Received:
    405
    Trophy Points:
    83
    @MickeyD
    /sys/class/hwmon/
    on Ubuntu systems.
  10. MikeyD

    MikeyD Active Member

    Messages:
    224
    Likes Received:
    108
    Trophy Points:
    43
    Easier, definitely, more useful depends on what she's using the sensors for. In conky for instance specifying the hwmon files is much less CPU-intensive than using an lm-sensors | grep <specific_cpu_temp>
  11. el stevadore

    el stevadore New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    works for me on rhel 6:
    to insert the ipmi module:
    $modprobe ipmi_devintf

    to confirm its installed:
    $lsmod | grep ipmi

    to see CPUs and System Temp, Peripheral Temp, PCH Temp and LAN Temp:
    $ipmitool sensor list |grep deg

    hope that helps!
    the ipmi module will not be inserted after reboot, you'd have to insert it again later
    Last edited: Nov 19, 2013
  12. alug_Doc

    alug_Doc Member

    Messages:
    38
    Likes Received:
    23
    Trophy Points:
    8
    I just reboot and access my BIOS. All that information is there.

    Modern computers have a built-in fail safe mechanism that will shut down your computer if the CPU reaches an unsafe temperature. As a general rule of thumb, if your system can run for several hours under normal use conditions and does not automatically shut itself down, you're fine.

Share This Page