Find the answer to your Linux question:
Results 1 to 4 of 4
In my system, the temperature of the CPU can be known from the file, /sys/bus/acpi/devices/LNXTHERM\:00/thermal_zone/temp . But I have found that not all systems have this file. Is there a ...
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    2

    Get temperature of CPU?

    In my system, the temperature of the CPU can be known from the file, /sys/bus/acpi/devices/LNXTHERM\:00/thermal_zone/temp . But I have found that not all systems have this file. Is there a generic method to get the temperature. Installing a package for this purpose won't be a solution as I'm building a simple gnome-shell extension. Something that comes along with the kernel would be perfect.

    What could be other files that can possibly store temperature information, so that it would work on most atleast if not all? Any help like the file that stores temperature on your particular system only would also be highly appreciated.

    github.com/xtranophilist/gnome-shell-extension-cpu-temperature/

    Thank you in advance.

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Code:
    /sys/bus/acpi/devices/LNXTHERM\:00/thermal_zone/temp
    Review the path - ACPI support by the system BIOS and Linux install is required to get this kind of info. If the system (HW) or OS doesn't support it, you will not get the ACPI information.

  3. #3
    Just Joined!
    Join Date
    Jun 2011
    Posts
    2
    Thank you for the information.
    That is why I am asking for a more general way!
    I could make the script look for all the possible files.
    Like If it doesn't find that file since acpi is not available, look for other possible files.

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Like If it doesn't find that file since acpi is not available
    Then you will not have an interface that can query the HW for this info.

    ACPI support by the system BIOS and Linux install is required to get this kind of info.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...