Headless Linux Box

Moderators: Site Moderators, FAHC Science Team

DoctorBob
Posts: 28
Joined: Sun Sep 12, 2021 9:28 pm
Hardware configuration: OS: Ubuntu 24.04 LTS x86_64
Host: Toshiba Satellite U400
Kernel: 6.8.0-39-generic
Shell: bash 5.2.21
CPU: Intel Core 2 Duo T8300
GPU: Intel Mobile GM965/GL960
Memory: 346MiB / 1958MiB
Location: Cairns, Qld. Australia
Contact:

Headless Linux Box

Post by DoctorBob »

I am running Mint Linux 20.2 on an old laptop. Running the OS headless. I access it via ssh (putty).
I can not see what is going on in the FAH client.

Is there a way to access FAH Client that is text based?
Is there a txt based non-javascript client page that will work with elinks or lynx web browsers?
Or is there client software that work with a headless installation?
Or is there a way to access the web based FAH Client or FAH Viewer from another PC?
bikeaddict
Posts: 210
Joined: Sun May 03, 2020 1:20 am

Re: Headless Linux Box

Post by bikeaddict »

FAHControl can be configured to monitor and control a remote client. When adding a client, the Connection tab allows the hostname or IP address to be added. The headless client should be configured in /etc/fahclient/config.xml with a password and to allow an IP address or range of addresses to connect. You will also need to allow incoming connections on port 36330.

It would be easiest to temporarily run a desktop environment on the laptop and run FAHControl locally to configure everything on the Remote Access tab so you don't have to edit config.xml directly.
DoctorBob
Posts: 28
Joined: Sun Sep 12, 2021 9:28 pm
Hardware configuration: OS: Ubuntu 24.04 LTS x86_64
Host: Toshiba Satellite U400
Kernel: 6.8.0-39-generic
Shell: bash 5.2.21
CPU: Intel Core 2 Duo T8300
GPU: Intel Mobile GM965/GL960
Memory: 346MiB / 1958MiB
Location: Cairns, Qld. Australia
Contact:

Re: Headless Linux Box

Post by DoctorBob »

Here is my /etc/fahclient/config.xml file:

<config>
<!-- Client Control -->
<fold-anon v='true'/>

<!-- Folding Slot Configuration -->
<gpu v='false'/>

<!-- Slot Control -->
<power v='light'/>

<!-- User Information -->
<passkey v='xxxxxxxxxxxxxxxxxxxxxxxxxx'/>
<user v='DoctorBob'/>

<!-- Folding Slots -->
<slot id='0' type='CPU'/>
</config>

I see that this file does not show all supported setting as commented out, it just shows the active ones.
What are the required parameters needed to be added here (headless, connection address(s), port number)?
And once set does the laptop need to be rebooted or a service reloaded?

BTW, is it possible to get more control over the CPUs?
Medium and Full settings really drive the laptop into thermal meltdown.
I am currently running the client set to CPU light.
This is better but the client uses only one CPU and drives it at 100%.
I would like to get both CPUs going and throttle them back to achieve a good balance between number crunching and thermal levels.
Last edited by DoctorBob on Mon Sep 13, 2021 3:24 am, edited 1 time in total.
aetch
Posts: 436
Joined: Thu Jun 25, 2020 3:04 pm
Location: Between chair and keyboard

Re: Headless Linux Box

Post by aetch »

Get the IP address of one of your computers, if should look something like 192.168.0.23, we're only interesting in the first 3 parts "192.168.0".

Add the following lines to your config, if your IP address is different then replace the "192.168.0" with whatever you have.

Code: Select all

  <!-- HTTP Server -->
  <allow v='192.168.0.0/24'/>
  <!-- Remote Command Server -->
  <command-allow-no-pass v='192.168.0.0/24'/>
Reboot your folding laptop. This is a permissions thing, FAH doesn't work quite right if you just stop and start it from the command line.

This allows other computers to remotely access the client on your laptop while restricting that access to only computers on your local network.
Folding Rigs - None (25-Jun-2022)

ImageImage
DoctorBob
Posts: 28
Joined: Sun Sep 12, 2021 9:28 pm
Hardware configuration: OS: Ubuntu 24.04 LTS x86_64
Host: Toshiba Satellite U400
Kernel: 6.8.0-39-generic
Shell: bash 5.2.21
CPU: Intel Core 2 Duo T8300
GPU: Intel Mobile GM965/GL960
Memory: 346MiB / 1958MiB
Location: Cairns, Qld. Australia
Contact:

Re: Headless Linux Box

Post by DoctorBob »

Thank you, aetch,

Yes, my LAN range is 192.168.0.0/24
I added your code to my /etc/fahclient/config.xml file and rebooted the laptop.

Do I point my web browser at the laptop running the client using the default port number?
http://192.168.0.107:36330


Laptop is now back up and running. All I see in my web browser is:

[H[2JWelcome to the FAHClient command server.
>
aetch
Posts: 436
Joined: Thu Jun 25, 2020 3:04 pm
Location: Between chair and keyboard

Re: Headless Linux Box

Post by aetch »

Web browser, no.
We use the advanced control panel which can be setup to monitor and control multiple remote clients. It also gives you very granular control over what a specific client does. Things which the web interface is not capable of.

On your windows laptop install the FAH Client.
The installation package contains the client, the viewer and the advanced control panel.
During install you will see a number of options.
To ensure the client is installed but does not run make sure you do the following:-
*). select "Custom Install (advanced)",
*). select "Start Manually. (Expert)"
*). remove the tick from "Start Folding @ Home"

On your Windows machine open the advanced control panel.
Start button -> Folding@home -> FAHControl

Bottom left of window "Add"
Name - the name you want to refer to your folding machine as
Address - the name or IP address you currently enter into your web interface
SAVE
Folding Rigs - None (25-Jun-2022)

ImageImage
DoctorBob
Posts: 28
Joined: Sun Sep 12, 2021 9:28 pm
Hardware configuration: OS: Ubuntu 24.04 LTS x86_64
Host: Toshiba Satellite U400
Kernel: 6.8.0-39-generic
Shell: bash 5.2.21
CPU: Intel Core 2 Duo T8300
GPU: Intel Mobile GM965/GL960
Memory: 346MiB / 1958MiB
Location: Cairns, Qld. Australia
Contact:

Re: Headless Linux Box

Post by DoctorBob »

Brilliant! Thank you, aetch.

Yes, much better then the web based interface and I can access it from my main PC or any other PC on my network.
I should now be able to sort out the rest of my questions I asked earlier.

Cheers,

DoctorBob
DoctorBob
Posts: 28
Joined: Sun Sep 12, 2021 9:28 pm
Hardware configuration: OS: Ubuntu 24.04 LTS x86_64
Host: Toshiba Satellite U400
Kernel: 6.8.0-39-generic
Shell: bash 5.2.21
CPU: Intel Core 2 Duo T8300
GPU: Intel Mobile GM965/GL960
Memory: 346MiB / 1958MiB
Location: Cairns, Qld. Australia
Contact:

Re: Headless Linux Box

Post by DoctorBob »

Okay, I was not too successful finding information regarding CPU control.

Here is my question from the previous post:
BTW, is it possible to get more control over the CPUs?
Medium and Full settings really drives the laptop into thermal meltdown.
I am currently running the client set to CPU light.
This is better but the client uses only one CPU and drives it at 100%.
I would like to get both CPUs going and throttle them back to achieve a good balance between number crunching and thermal levels.
FAHControl document page is not available (404):
https://foldingathome.org/projects/FAHC ... ?lng=en-US

I had a look at Configure --> Slots but not sure how to get both CPU cores going and control the amount of CPU usage.
gunnarre
Posts: 559
Joined: Sun May 24, 2020 7:23 pm
Location: Norway

Re: Headless Linux Box

Post by gunnarre »

Look here instead: https://foldingathome.org/support/faq/i ... ion-guide/

In short, you can go to the Slots tab in the configuration, select the existing CPU slot, click Edit and change the number of threads from -1 (follow the slider) to the number of threads you want to run. Then save the setting. The setting will take effect when the next work unit is requested, and you'll get a WU for the number of threads you set - or lower - depending on what the server has available.
Image
Online: GTX 1660 Super + occasional CPU folding in the cold.
Offline: Radeon HD 7770, GTX 1050 Ti 4G OC, RX580
aetch
Posts: 436
Joined: Thu Jun 25, 2020 3:04 pm
Location: Between chair and keyboard

Re: Headless Linux Box

Post by aetch »

Slide your "Folding Power" slider to "Full"
Folding Rigs - None (25-Jun-2022)

ImageImage
calxalot
Site Moderator
Posts: 1091
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Headless Linux Box

Post by calxalot »

You can set the number of cores to use, but cannot set the percentage of cpu to use.
DoctorBob
Posts: 28
Joined: Sun Sep 12, 2021 9:28 pm
Hardware configuration: OS: Ubuntu 24.04 LTS x86_64
Host: Toshiba Satellite U400
Kernel: 6.8.0-39-generic
Shell: bash 5.2.21
CPU: Intel Core 2 Duo T8300
GPU: Intel Mobile GM965/GL960
Memory: 346MiB / 1958MiB
Location: Cairns, Qld. Australia
Contact:

Re: Headless Linux Box

Post by DoctorBob »

calxalot wrote:You can set the number of cores to use, but cannot set the percentage of cpu to use.
That makes it tricky. I will have to leave Folder Power set to Light.
bikeaddict
Posts: 210
Joined: Sun May 03, 2020 1:20 am

Re: Headless Linux Box

Post by bikeaddict »

A utility like cpulimit or cputool could be used to limit CPU usage. It would need to be run in a shell script under cron. The script would have to use pgrep to get the process ID.
calxalot
Site Moderator
Posts: 1091
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Headless Linux Box

Post by calxalot »

There is a 3rd party tool for Linux you might want to try.

https://github.com/opsengine/cpulimit
calxalot
Site Moderator
Posts: 1091
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Headless Linux Box

Post by calxalot »

Your Linux distribution may have kernel support for limiting cpu time.

This might be useful:
https://linuxhint.com/limit_cpu_usage_process_linux/
Post Reply