View System Temperatures And Control Fan

I have just had the hair pulling excitement this week of installing linux on a vostro 3300. I have figured out how to work around the hybrid nvidia graphics via a package called bumblebee, which I did a how to on. But I found the laptop still ran hot. I wanted to be able to control the fan, I figured it out and made a shell script that shows you the system temperatures and then prompts you for fan speed. I think it should be easy to follow through the shell script but Ill give you some help along the way.


Install Necessary Packages

I am installing i8kutils because the laptop is a dell, and that allows me to change the fan speeds as well get more system information.



Find Out What Sensors Are Installed

Run the following and say yes to all questions....this will probe your hardware to what sensors and controls are available.



Get Sensor Data

Now we need to make sure we can see everything. The output from the following command we will use later in the script.



Enable i8kmon software

In order for the dell software to work you need to change some system files. Edit the following files and replace "ENABLED=0" to "ENABLED=1"



Activate the dell software by



Script Explainations

I use grep and awk to extract the data from the sensors command, then put them in an appropriate variable. I use if statements to give a human readable display to the fan status. I use dialog to prompt the user for a fan speed change while displaying the temperature values in the header of the radio buttons. User input is taken and used then to run an appropriate command.