Recommended Posts

necessary utility / Ð½ÐµÐ¾Ð±Ñ…Ð¾Ð´Ð¸Ð¼Ð°Ñ ÑƒÑ‚Ð¸Ð»Ð¸Ñ‚Ð°

lm_sensors

 

en:

I encountered a problem turning off the computer processor overheated. 
To avoid shutting down the computer, I wrote poor script that kills all applications java.
 
################ ~/wurm.sh #######################
#!/usr/bin/bash
 
echo "Start game"
sh -c 'DRI_PRIME=1 javaws "~/.cache/icedtea-web/cache/0/http/www.wurmonline.com/client/wurmclient.jnlp"' &
 
echo "Start overheat security"
while [ 1 ]; do
  sleep 3
  res=$(sensors coretemp-isa-0000 | grep 'id 0' | perl -n -e '/ +\+(.*)\.\d°C / && print "$1\n"')
  if [ $res -ge 82 ];
    then 
      echo "Overheating. Kill all java."
      killall java
      exit
  fi
done

################################################

 

Explanation:

while [ 1 ]; do -- infinite loop

sleep 3 -- waiting 3 second

res=$(sensors coretemp-isa-0000 | grep 'id 0' | perl -n -e '/ +\+(.*)\.\d°C / && print "$1\n"')

Write in the res results of the instruction pipeline. Were

sensors coretemp-isa-0000 -- getting information from the my CPU temperature sensor

grep 'id 0' -- Preparation of total CPU temperature

perl -n -e '/ +\+(.*)\.\d°C / && print "$1\n"' -- capture the numerical values ​​of the temperature

if [ $res -ge 82 ];  -- If the temperature is greater than or equal to 82 degrees, then kill all java applications

 

Troubles:

After exiting of the game in an infinite loop continues to operate

 

For information from the sensors, use the command line utility "sensors"

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

ru:

СтолкнулÑÑ Ñ Ð¿Ñ€Ð¾Ð±Ð»ÐµÐ¼Ð¾Ð¹ перегрева компа, что ведёт к аварийному завершению работы операционки.
Что бы избежать Ð²Ñ‹ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð½Ð°Ð¿Ð¸Ñал кривой Ñкрипт, который убивает java при нагреве процеÑÑора до 82 градуÑов (Linux выключаетÑÑ Ð¿Ñ€Ð¸ 85 градуÑах)

################ ~/wurm.sh #######################
#!/usr/bin/bash
 
echo "ЗапуÑкаем игруху"
sh -c 'DRI_PRIME=1 javaws "~/.cache/icedtea-web/cache/0/http/www.wurmonline.com/client/wurmclient.jnlp"' &
 
echo "Врубаем термозащиту"
while [ 1 ]; do
  sleep 3
  res=$(sensors coretemp-isa-0000 | grep 'id 0' | perl -n -e '/ +\+(.*)\.\d°C / && print "$1\n"')
  if [ $res -ge 82 ];
    then 
      echo "Температура критичеÑкаÑ. Вырубаю java"
      killall java
      exit
  fi
done

################################################

 

ПоÑÑнение:

while [ 1 ]; do -- Ð±ÐµÑконечный цикл

sleep 3 -- ожидание 3 Ñекунды

res=$(sensors coretemp-isa-0000 | grep 'id 0' | perl -n -e '/ +\+(.*)\.\d°C / && print "$1\n"')

ЗапиÑываем в res результат Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÐºÐ¾Ð½Ð²ÐµÐ¹ÐµÑ€Ð° команд. Где

sensors coretemp-isa-0000 -- получение информации о температуре моего процеÑÑора

grep 'id 0' -- получение общей температуры процеÑÑора

perl -n -e '/ +\+(.*)\.\d°C / && print "$1\n"' -- Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ðµ чиÑлового Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ‚ÐµÐ¼Ð¿ÐµÑ€Ð°Ñ‚ÑƒÑ€Ñ‹

if [ $res -ge 82 ];  -- еÑли температура больше 82 градуÑов, то убиваем вÑе процеÑÑÑ‹ java

 

Проблемы:

ЕÑли корректно выйти из игры беÑконечный цикл продолжает выполнÑÑ‚ÑŒÑÑ

 

Ð”Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ð¸ Ñ Ð´Ð°Ñ‚Ñ‡Ð¸ÐºÐ¾Ð² иÑпользуйте утилиту командной Ñтроки "sensors"

Share this post


Link to post
Share on other sites

I understand Russian a little and can see the english translation is quite bad.


On some lines where it says 'kill java' it really means Shut Down java.


 


His computer seems to shut down programs when they reach 82degrees, guess he is trying to find out how to turn off that limitation or how to make it overheat less.


Share this post


Link to post
Share on other sites

No, "kill" really means kill.  It's a linux/unix command, not a poor translation.


If your cpu is overheating, it's best to re-seat it with new thermal paste and make sure your fans are working effectively.


I dont quite understand the "troubles" part.


If "killall java" is not effective, try "killall -9 java".

Share this post


Link to post
Share on other sites

Dont disable those failsafes. If you do that the CPU can overheat and at those temperatures without failsafes fry itself. Clean your computer first. almoust allways the problem with overheating lies in dust carpets across the CPU cooling element. Remove the fan and clean it. clean whats under the fan too. Then check and see if the problem still persists. If it does reapply  the termal paste and / or get a new cooling unit. They're fairly cheap nowdays so if its faulty you can get a really good one for only something like 20€.


 


So again dont disable your failsafes. they are there for a reason. Its a simple thing to disable them but you'll fry your computer almoust certainly.


Share this post


Link to post
Share on other sites

Dont disable those failsafes. If you do that the CPU can overheat and at those temperatures without failsafes fry itself. Clean your computer first. almoust allways the problem with overheating lies in dust carpets across the CPU cooling element. Remove the fan and clean it. clean whats under the fan too. Then check and see if the problem still persists. If it does reapply  the termal paste and / or get a new cooling unit. They're fairly cheap nowdays so if its faulty you can get a really good one for only something like 20€.

 

So again dont disable your failsafes. they are there for a reason. Its a simple thing to disable them but you'll fry your computer almoust certainly.

This

 

If none of the above work you can also try under volting and under clocking ur CPU

 

 

Share this post


Link to post
Share on other sites

Hmm I think this is actually an additional failsafe. It watches the CPU temp and if it gets too high, kills all Java programs. Could be helpful as a stopgap solution while trying to figure out what's causing the overheating in the first place.


Share this post


Link to post
Share on other sites

I don't know about all computers or even all OSes but it seems to me that every computer I have had in the recent past has a power configuration that you can set your processor to a max throttle. Say try 85% and see if your heat problem stops. If not, 75% and downward. I use this on my laptop because I can run Wurm and most everything else I do on it at 50% cap and still have plenty of room left over on CPU use. My laptop is a a heat failure model for certain. You can fry eggs on the CPU if you don't throttle it downward.


 


Sometimes the overheating is dust or not enough ventilation. Other times it's simply engineering flaws and there is little you can do about it. Mine falls into the latter. There's nowhere to put more fans and the fans it has are nowhere near strong enough to vent it. Adding that the engineers who designed it decided to put the CPU right under the hard drive... yeah. Heat central.


Share this post


Link to post
Share on other sites

Ooo bash script. EDIT: Now if only I understood russian...


 


Heh overheating laptops (cant even have one on one's lap these days), once used an architect ruler to prop mine up for better airflow.


 


Serious overclocking usually requires liquid-cooling, and even then it seriously shortens the processor's life. At any rate, if one is going to get into it, use any Intel processor with a 'K'. Not sure offhand what other manufacturers use to indicate ones designed for overclocking.


 


http://www.overclockers.com/


http://www.overclock.net/


Edited by Klaa

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this