Skip to content

Reading CPU Temperature from Linux

Has anyone found a temperature on the device that relates directly to CPU Temperature?  I have a customer with this requirement at the moment.

I have found a temperature from a humidity sensor at:

/sys/class/hwmon/hwmon0/temp1_input

but I am not sure where this temperature is taken.

Any ideas or help would be greatly appreciated.

Thanks,

Steve

Comments

  • Hi Steve,

    I'll check this and come back to you asap.

    cheers

    Frank

  • Hi Steve,

    I've news for you. We've a humidity sensor mounted directly left below the heat sink.
    The temperature can be read with /sys/class/hwmon/hwmon0/temp1_input.

    Means we are measure the temperature of the housing not of the CPU (there is no sensor installed)

    take care!

  • HI Frank.

     I have edited the tempertaura and humidity file and the value that appears is 47445 What value will be refere? 47.445ºC and that of humidity puts 10906

     

  • Hi rcasadomozo,

    you can look in the following link for exact information about the contents of the files.

    https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface

    The temperature should be in millidegree Celsius, as you described. The humidity should be indicated in milli-percent.

  • Hi

    Can you tell me how to make a variable for it on the AXC F 1152 controller so I can show it on the webhmi?

    I need the temp in the housing. If it not possible I can maybe use the CPU temperature but thats not a proper solution.

  • Hello,

    For the temperature sensor discussed in this thread, there is a system variable available, here:

    2020 04 12 14 19 47

     

    If you need help displaying this on the HMI, please create a new question in the "PLCnext Engineer" category, and someone will answer it there.

    ~ Martin.

     

     

Sign In or Register to comment.