3

I have Ubuntu 14.04. I am using the i3 window manager and want to display CPU temperature in the i3-statusbar. Folder /sys/devices/platform/coretemp.0 does not exists and neither does /proc/acpi/thermal_zone.

What should I do? I do not want to use lm-sensors or similar.

phk
  • 5,893
  • 7
  • 41
  • 70
LRDPRDX
  • 123
  • 1
  • 1
  • 9

1 Answers1

2

Is this something you're looking for? from i3 man page: https://i3wm.org/i3status/manpage.html#_cpu_temperature

5.9. CPU-Temperature

Gets the temperature of the given thermal zone. It is possible to define a max_threshold that will color the temperature red in case the specified thermal zone is getting too hot. Defaults to 75 degrees C. The output format when above max_threshold can be customized with format_above_threshold.

Example order: cpu_temperature 0

Example format: T: %degrees °C

Example max_threshold: 42

Example format_above_threshold: Warning T above threshold: %degrees °C

Example path: /sys/devices/platform/coretemp.0/temp1_input

ljk
  • 140
  • 3
  • 1
    Something like this, Yes. But as I said I do not have that folder. – LRDPRDX Jan 24 '17 at 07:51
  • @Wolfgang are there any reasons you do not want to use `lm-sensors`? the status bar is only for displaying temperature sent from another program, i think something like `lm-sensors` is required since to see the temperature a path is needed. – ljk Jan 24 '17 at 19:14
  • Ok. I do not want to use lm-sensors explicitly. If you showed how to use lm-sensors in order to display temperature in status bar, I would use it. – LRDPRDX Jan 29 '17 at 22:58
  • 1
    This might be what you need http://unix.stackexchange.com/questions/85468/how-to-get-core-temperature-of-haswell-i7-cores-in-i3status – ljk Jan 30 '17 at 22:19
  • @Wolfgang https://www.youtube.com/watch?v=kVyk1eUWPyE – ljk Feb 02 '17 at 19:32
  • Thank you, it works. I do not even thought if it would work without path to something. It is so simple though I do not understand why it works. How to accept the answer? – LRDPRDX Feb 03 '17 at 11:47
  • @Wolfgang glad to see it works! there should be a gray check mark that you can click to accept the answer. http://stackoverflow.com/help/someone-answers https://i.stack.imgur.com/QpogP.png – ljk Feb 03 '17 at 18:52
  • BTW, If I try to add threshold like it is showed in your answer it does not work. The error message is: *Error: status_command process exited unexpectedly (exit 1)*. – LRDPRDX Feb 04 '17 at 07:20
  • More specific, problem with a *format_above_threshold* variable assigning, – LRDPRDX Feb 04 '17 at 07:47
  • hm hard to tell, maybe a typo somewhere? – ljk Feb 06 '17 at 22:55
  • No, It is not. More over, the same error occurred If I add *max_threshold* to *usage* clause. – LRDPRDX Feb 07 '17 at 06:58
  • i have the same problem? what file should I modify? – vladimir.gorea Dec 04 '20 at 15:12