You are not logged in.

#1 2021-09-14 02:08:37

tony5429
Member
Registered: 2006-03-28
Posts: 1,025
Website

[SOLVED] 2 Questions About an Old Computer Running Arch

I have an old computer running Arch Linux, on which I'd like to run a bash script that takes several days to execute. The trouble is that after a few hours, if I'm running the script on it, the computer always shuts itself off - I'm guessing it's overheating. I have two questions...

1. Is there a way I can force the machine to slow down, either by somehow running the script more slowly, or by telling Arch Linux to generally use less resources or something?
2. Does Linux provide any sort of exit code or something that I could use to troubleshoot / confirm the issue is in fact overheating and not something else?

Last edited by tony5429 (2021-09-17 01:00:30)

Offline

#2 2021-09-14 02:14:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,498
Website

Re: [SOLVED] 2 Questions About an Old Computer Running Arch

tony5429 wrote:

I'm guessing

Why guess?  Add some diagnostic checks and know for sure.

tony5429 wrote:

... by somehow running the script more slowly

That would depend on the script.  Can you post / link to it so we can see what you are talking about?  Assuming it's running some other processes in a loop, you can add a `sleep` between loops.  But really, add diagnostics / logging first to see what's actually happening.

tony5429 wrote:

2. Does Linux provide any sort of exit code...

Every processes (like all those your script calls) has an exit code ... and you should be checking them.

The kernel itself doesn't, as there'd be nothing to receive it.  But there is a journal.  You should check that too - and post / link to it here if you want help.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2021-09-14 03:40:49

kermit63
Member
Registered: 2018-07-04
Posts: 372

Re: [SOLVED] 2 Questions About an Old Computer Running Arch

tony5429 wrote:

Is there a way I can force the machine to slow down, either by somehow running the script more slowly, or by telling Arch Linux to generally use less resources or something?

You can use something like cpulimit.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#4 2021-09-14 07:27:55

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 338

Re: [SOLVED] 2 Questions About an Old Computer Running Arch

tony5429 wrote:

I'm guessing it's overheating

lm_sensors gives you a way to check temperatures on the fly

Offline

#5 2021-09-14 07:53:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,275

Re: [SOLVED] 2 Questions About an Old Computer Running Arch

I'd also open the case and remove at least some of the dust… tongue
If the system is prone to emergency shutdowns, your chances to complete a long running process are zero.
If you cannot anything about the former, the script should better store intermediate results and be able to continue from there.

Offline

#6 2021-09-14 14:37:30

Maniaxx
Member
Registered: 2014-05-14
Posts: 761

Re: [SOLVED] 2 Questions About an Old Computer Running Arch

'cgroups' can also limit resources.
https://wiki.archlinux.org/title/cgroups

None of these 'limiters' are a solution for an unstable or overheated system though.


sys2064

Offline

#7 2021-09-15 19:29:47

aksilarch
Member
Registered: 2021-09-15
Posts: 51

Re: [SOLVED] 2 Questions About an Old Computer Running Arch

i ran into the same issue, it was definitely an overheating problem for me. my old laptop was very dusty on the inside and the fan was clogged, had to dismantle the laptop, cleaned it thoroughly, removed and scrubbed the old dry thermal paste from the cpu surface, applied some fresh thermal paste and i was good to go, temperatures went down, no more sudden shutdowns (or hibernation) and the fans weren't loud, it sustains pretty well now.


archlinux cures my depression.

Offline

#8 2021-09-17 01:00:00

tony5429
Member
Registered: 2006-03-28
Posts: 1,025
Website

Re: [SOLVED] 2 Questions About an Old Computer Running Arch

Thanks for all the tips/info! So, I've isolated the issue to Wifi. It's an old enough laptop that it has one of those little physical switches to turn the Wifi on/off. I actually have no need for wifi on the machine, so I just switched it off and that has solved the issue. If I ever need to use the Wifi, I'll do some more troubleshooting.

Offline

Board footer

Powered by FluxBB