punker.blogg.se

Ubuntu monitor cpu temperature
Ubuntu monitor cpu temperature




To determine what shell is running, use the follow commands:įor bash, it is simple by modifying the following environment variable PS1. Since Ubuntu uses bash as the default shell, the below changes are for bash prompt. Tie the CPU temperature to the terminal prompt.

ubuntu monitor cpu temperature

Five seconds should be sufficient enough to keep the temperature up-to-date without using too many CPU resources. Currently, it is set to scan the temperature every 5 seconds, though this can easily be adjusted from the sleep command. Not particularly fond with this hack script, but it works. # Records the CPU temp and writes it to a temporary file. It assumes that there is only one entry called ‘CPU Temp:’ Some systems may have more than one sensor that displays CPU Temp, so adjust the script accordingly. This is a simple script that gets the CPU temperature out of the sensor data. Write script to continually gather CPU temp. Now, verify that lm-sensors is setup correctly by typing ‘sensors.’ There should be some information about CPU temp/fans/voltage. # Setup sensors so they register properly. This is needed in order to detect any hardware sensors on the machine. Next, run the command ‘sensors-detect’ and go ahead and say YES to all the options. This is a simple process for in Ubuntu (and probably most distributions).

ubuntu monitor cpu temperature

Below is instructions on how to setup the CPU monitor on the prompt so it becomes a bit easier to determine whether the computer is overheating.

ubuntu monitor cpu temperature

However, since the machine is headless, it is a bit harder to figure out the CPU temperature without needlessly looking at the sensor all day. The room that temporary contains the server is not well air-conditioned and as such temperature is a major concern. This is an interesting problem when setting up an Ubuntu server.






Ubuntu monitor cpu temperature