0

I have a linux server, but because it overheats during the day, sometimes it can change for half an hour or 1 hour. I want to cool it down. but can I do this with a command, for example, can I send a command and have it turn off at that moment and turn it back on after 30 minutes?

I tried commands like "sudo shutdown -r +30" but I guess these commands mean restarting after 30 minutes.

  • 1
    Does it overheat while idle?! If not, then just stop the CPU-intensive processes on it temporarily, or throttle them in some other way. Alternatively, invest in some proper cooling. – Kusalananda Jan 29 '23 at 10:37
  • not at idle. actually i just need the query :) – Ali Karaca Jan 29 '23 at 10:38
  • If **absolutely everything else** fails, you can McGyver using two widely available gadgets: a "USB relay" and an USB-powered delayed one-channel momentary relay that will, after a set time from an input closing, momentarily close and release a contact. Connect the MB PowerButton pins in parallel to the momentary, normally-open output pins of the powered relay. Program the delay and connect its IN to the USB relay OUT, connect the latter to an USB port, install "HID usbrelay" utility. You can now delay-send a "YOU HAVE BEEN PRESSED" signal to a power on button. – LSerni Jan 29 '23 at 12:32
  • If it's air cooled, you may be better going for water cooling. – Bib Jan 29 '23 at 13:12
  • Even without water-cooling, replacing the existing cooler with a better one may improve CPU temps. Or, if the machine is fairly old and/or in a dusty environment, simply cleaning the fans & heat-sink (use an artist's paintbrush and a hand-held vacuum cleaner) can help a lot...dust-clogged fans don't do a great job of cooling a CPU. Adding one or more extra case fans (and/or replacing existing fans with better quality ones for higher airflow) may also help. It's impossible to say for sure because you haven't mentioned what kind of CPU you have or what kind of CPU and case cooling you have. – cas Jan 30 '23 at 05:40
  • 1
    Sometimes removing the CPU cooler entirely, removing the existing thermal paste and applying fresh thermal paste, then re-installing the cooler is necessary. That's good preventative maintenance that should be done every few years, anyway - not unlike changing the oil in a car every year or so. – cas Jan 30 '23 at 05:44
  • In short: if your system is over-heating, then that's **a problem that needs to be fixed**, not just worked around with some hacky temporary shutdown non-solution. You need to find out WHY it's over-heating (bad thermal paste, dust, and/or crappy fans are common causes) and then FIX that. Using an over-powered multi-core CPU in a small or ITX or micro ATX case with insufficient cooling is another fairly common cause - in that case, either replace the CPU with a more appropriate or replace the case and/or fans. – cas Jan 30 '23 at 05:46

1 Answers1

3

You're probably better off finding and addressing the underlying reason for overheating. Poor ventilation. Misconfigured or wrong governor. Rogue processes. Etc.

There is no [universal] command to restart [all] computers at a specified time after power off because the computer is generally inactive and outside the control of the OS. If such functionality were to exist, it would have to be implemented in firmware, and there is no universally followed standard to provide such functionality.

  • Some motherboards can be configured to power on at specified times. Then you could configure the OS to shutdown prior to the set startup times to produce the desired cool down period.

  • You could also use Wake-On-LAN to send a wake-up signal from a secondary device.

  • Some computers have realtime clocks that can be controlled via ACPI. However, this does not work on any computer I've tried it on.

xiota
  • 526
  • 1
  • 4
  • 13
  • *There is no command to restart a computer at a specified time after power off* that's incorrect! For example, PC (ATX) mainboards have standby power, and that can very well be used to together with RTC clock to turn on at a specific time. See, for example, [this](https://unix.stackexchange.com/questions/185475/is-there-a-way-to-auto-turn-on-linux-machine) answer. Non-PC platforms often have it even easier. – Marcus Müller Jan 29 '23 at 14:09
  • [This](https://askubuntu.com/a/83706) answer is better. – Marcus Müller Jan 29 '23 at 14:10
  • @MarcusMüller What I should have written is that there is no *universal* command that will work across *all* computers. Any solution will require firmware support, and there is no universally followed standard to do what OP wants. Case in point, all solutions at the links you provided do not work on any of my computers. – xiota Jan 30 '23 at 05:15
  • ACPI wakeup is quite universal on PC style hardware. This isn't 1998. – Marcus Müller Jan 30 '23 at 08:06