![]() ![]() This will produce a warning when either CPU core reaches 35☌ and will shut the server down if either of the cores reaches 50☌ How to shut the server down if any disk drive gets too hotĪs well as monitoring the CPU temperatures I thought it would a good idea to monitor drive temperatures too. Don’t forget to make the script executable: chmod a+x CPUTempShutdown.sh.If you make a mistake then issue :q! instead of :wq to abort your changes. Then press the key once and type :wq to save and quit out of the script.Next right click and the whole script will be pasted into the screen. Then press the key once and add a couple of blank lines by pressing the key.Next type vim CPUTempShutdown.sh (or your preferred script name) and press Enter.Using Putty navigate into the folder where you’re going to store the script.įor example type cd /home/xxx/MyScripts where xxx is your username.Highlight the whole script, right click and select Copy.Instead of downloading the script you can create it via Putty: ![]() Now we have the necessary tools installed we next need a script to monitor the CPU temperatures. You now need to reboot the server for the changes to take effect. At the end of the list of questions it will ask if you want to add the necessary modules to /etc/modules, answer YES. Next type:Īnd hit the key in response to each of the questions. So from a Putty Session type the following:Īnd type in your password if prompted. We now need to configure the lm-sensors application. So, from a Terminal/Putty Session issue the following two commands: To make this script work we need to install lm-sensors. The scripts do give you a few tips but obviously I’m unable to test the scripts on every motherboard/hard drive out there! How to shut down the server if the CPU gets too hot You’ll need to tweak the instructions to work in your environment. Furthermore the output from the utilities we’re going to install varies across different motherboards/processors and hard drives. NOTE: These instructions have been tested on Ubuntu Server Lucid 10.04, Karmic 9.10, Jaunty 9.04 and Intrepid 8.10. To keep things simple we’re going to be using two scripts: One script will monitor CPU temperatures and the other script will monitor hard drive temperatures. If either of the CPU cores or any one of the hard drives exceeds my pre-determined temperatures then the scripts will send me an email and will then shut the server down. The CPUs and hard drives are useful things to monitor so this is what these scripts will do. So, I decided to write some scripts which would monitor the server temperatures for me. Whilst computers do have an inbuilt safety mechanism, and will automatically shut down if things get too hot, this mechanism doesn’t kick in until things get VERY hot, much hotter than I’d feel comfortable letting my server get to. The vents are installed in the top of the cupboard and could easily get covered over with a book or something. Monitor critical temperatures in Ubuntu Server – Trusty, Lucid & KarmicĪs my server is going to be living in a cupboard I was concerned what would happen if one of the cupboard vents got blocked somehow. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |