Conky cpu temp code example

Example: conky cpu temperature

Please see this thread and note the answer by JeanFI.

Basically it amounts to needing to review the hardware specification which will tell you the output that relates to the CPU.

To add the display to conky once you are aware of the value (using k10temp-pci-00c3 in this example) you would insert:

$ exec sensors | grep 'k10temp-pci-00c3' | awk '{print $3}'}
The grep pipe is used to search the output of sensors and display only information that matches.

The awk pipe is used to select the correct field from the output of sensors/grep. This means that you can substitute $3 for another value if it is not displaying the correct part (i.e $1,$2,$all).

Tags:

Java Example