Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #256958

Re: how to limit a CPU temperature?

From Darac Marjal <mailinglist@darac.org.uk>
Newsgroups linux.debian.user
Subject Re: how to limit a CPU temperature?
Date 2023-04-09 14:30 +0200
Message-ID <GiClc-R4w-1@gated-at.bofh.it> (permalink)
References <GihA5-E2o-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 08/04/2023 15:17, songbird wrote:
>    i have a program that has changed it's behavior to suddenly
> become a CPU hog (while doing something simple like uploading
> files for my website).  probably a bug, but it got me to
> wondering how i could limit the CPU temperature to a range
> well below the maximum that kicks in by the CPU itself.
>
>    i have an intel processor and it has the MAX which does
> prevent it from going higher (100C), but i'd like to keep it
> at 70C or lower.
>
>    i've been trying to find anything that will let me set this
> but no luck yet in my searches.

You might try combining your queries with terms for various 
CPU-intensive activities such as BOINC, Folding@Home or Bitcoin mining. 
I'm not suggesting your task is related to any of these, but the people 
who do use these programs face similar issues.

For example, there is the TThrottle program for windows which will pause 
BOINC calculations when the CPU temperature goes too high. I don't 
believe that's available for linux, though.

As an alternative, you could try writing a small shell script that works 
like the following (pseudocode):

  STOP_TEMP=70
  START_TEMP=65
  JOB_RUNNING=1

  while true:
    cpu_temp=$(cat /sys/something/temperature)

    if JOB_RUNNING and cpu_temp > STOP_TEMP:
      systemctl stop something.service
      JOB_RUNNING=0
    elif not JOB_RUNNING and cpu_temp < START_TEMP:
      systemctl start something.service
      JOB_RUNNING=1
    endif

    sleep 1
wend


>
>    thanks!  :)
>
>
>    songbird
>

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

how to limit a CPU temperature? songbird <songbird@anthive.com> - 2023-04-08 16:20 +0200
  Re: how to limit a CPU temperature? songbird <songbird@anthive.com> - 2023-04-08 16:30 +0200
    Re: how to limit a CPU temperature? "tv.debian" <tv.debian@googlemail.com> - 2023-04-08 16:50 +0200
      Re: how to limit a CPU temperature? songbird <songbird@anthive.com> - 2023-04-08 18:00 +0200
        Re: how to limit a CPU temperature? "Andrew M.A. Cater" <amacater@einval.com> - 2023-04-08 18:20 +0200
          Re: how to limit a CPU temperature? songbird <songbird@anthive.com> - 2023-04-08 20:40 +0200
    Re: how to limit a CPU temperature? "Jeremy Nicoll" <jn.ml.dbi.73@letterboxes.org> - 2023-04-08 17:00 +0200
      Re: how to limit a CPU temperature? davidson <davidson@freevolt.org> - 2023-04-08 17:20 +0200
        Re: how to limit a CPU temperature? songbird <songbird@anthive.com> - 2023-04-08 17:50 +0200
      Re: how to limit a CPU temperature? songbird <songbird@anthive.com> - 2023-04-08 18:10 +0200
        Re: how to limit a CPU temperature? Vincent Lefevre <vincent@vinc17.net> - 2023-04-13 16:30 +0200
    Re: how to limit a CPU temperature? songbird <songbird@anthive.com> - 2023-04-11 02:20 +0200
      Re: how to limit a CPU temperature? Max Nikulin <manikulin@gmail.com> - 2023-04-11 03:30 +0200
  Re: how to limit a CPU temperature? tom@myposts.ovh - 2023-04-08 16:30 +0200
    Re: how to limit a CPU temperature? songbird <songbird@anthive.com> - 2023-04-08 18:10 +0200
  Re: how to limit a CPU temperature? Emanuel Berg <incal@dataswamp.org> - 2023-04-08 17:20 +0200
    Re: how to limit a CPU temperature? songbird <songbird@anthive.com> - 2023-04-08 18:00 +0200
      Re: how to limit a CPU temperature? "Jeremy Nicoll" <jn.ml.dbi.73@letterboxes.org> - 2023-04-08 18:10 +0200
      [OFFTOPIC] Re: how to limit a CPU temperature? Stefan Monnier <monnier@iro.umontreal.ca> - 2023-04-08 19:00 +0200
        Re: [OFFTOPIC] Re: how to limit a CPU temperature? Emanuel Berg <incal@dataswamp.org> - 2023-04-08 19:20 +0200
          the front (was: " Re: [OFFTOPIC] Re: how to limit a CPU temperature?") Emanuel Berg <incal@dataswamp.org> - 2023-04-08 19:30 +0200
            Re: the front (was: " Re: [OFFTOPIC] Re: how to limit a CPU temperature?") Jeffrey Walton <noloader@gmail.com> - 2023-04-08 20:00 +0200
              Re: the front (was: " Re: [OFFTOPIC] Re: how to limit a CPU temperature?") Emanuel Berg <incal@dataswamp.org> - 2023-04-08 20:10 +0200
        Re: [OFFTOPIC] Re: how to limit a CPU temperature? Jeremy Ardley <jeremy@ardley.org> - 2023-04-09 01:00 +0200
  Re: how to limit a CPU temperature? Tixy <tixy@yxit.co.uk> - 2023-04-08 22:10 +0200
  Re: how to limit a CPU temperature? Ash Joubert <ash@transient.nz> - 2023-04-09 02:30 +0200
  Re: how to limit a CPU temperature? David Christensen <dpchrist@holgerdanske.com> - 2023-04-09 03:10 +0200
    Re: how to limit a CPU temperature? Mark Allums <maa@allums.com> - 2023-04-09 05:20 +0200
      Re: how to limit a CPU temperature? David Christensen <dpchrist@holgerdanske.com> - 2023-04-10 01:50 +0200
  Re: how to limit a CPU temperature? Darac Marjal <mailinglist@darac.org.uk> - 2023-04-09 14:30 +0200
    Re: how to limit a CPU temperature? Emanuel Berg <incal@dataswamp.org> - 2023-04-09 14:40 +0200
  Re: how to limit a CPU temperature? David Christensen <dpchrist@holgerdanske.com> - 2023-04-10 04:20 +0200

csiph-web