Running F@h through Terminal (command line)

Moderators: Site Moderators, FAHC Science Team

Post Reply
Nobope
Posts: 3
Joined: Fri Jun 12, 2020 5:59 pm

Running F@h through Terminal (command line)

Post by Nobope »

Greetings!


Sorry for my noobish question, but: "how does one launch the fahclient through terminal?"

It's been about six months when I last time ran F@h at my Linux laptop, and well, a lot of things have happened ever since. First of all, the support for Ubuntu 19.10 Eoan Ermine already ended while it has moved to the new long-term version, 20.04 Focal Fossa. Second, the F@h client has undergone some updates, moving from version 7.6.13 to 7.6.21.

I've upgraded my F@h (client, control, viewer), but I'm still running the 19.10 Eoan Ermine. However, the terminal won't even recognize my command fahclient as I try run it. This is something that never happened to me when I was still running F@h (yes, through the very terminal itself) the last May.

Dunno what's happened really. Something went wrong with the updates? Or perhaps the logic got changed someway due to the updates...?

Even back in May, however, I was not able to run F@h through fahcontrol, as it got — and still does — get stuck in to a loop of "UPDATING ... CONNECTING" (first crying about the password being incorrect, even though that's completely correct). I am currently experiencing the same problem with my Windows 10 x64 laptop as well: fahclient runs just fine, but fahcontrol won't get its feet on the ground.

But yeah, my question in all its simplicity: how should I launch the fahclient through terminal?


Cheers!
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Running F@h through Terminal (command line)

Post by bruce »

First, determine where your FAH's working files are being written. Mine (in WIndows) happen to be at C:\ProgramData\FAHClient. Your may be somehere else. If you view the first and second page of FAH's log, you'll fine an entry identified as "CWD:" Open the terminal and change to that directory.

Second determine where FAH's executable files are stored. Mine happen to be in "C:\Program FIles (x86)\FAHClient"

1) Be sure programs starting with FAH* are NOT running, especially FAHClient. 2) Open the terminal and change directory to the working files directory. 3) Invoke the appropriate executable (with the full path). 4) DO NOT CLOSE THAT TERMINAL WINDOW. ( 4a) You should be able to close the program with the appropriate interrupt code and wait for all FAH* programs to finish. {Mine is CTRL-C})

The same concept applies to Linux and probably to OS-X, but the directory locations will be decidedly different.

> cd C:\ProgramData\FAHClient
> "C:\Program Files (x86)\FAHClient\FAHClient.exe" --open-web-control
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Running F@h through Terminal (command line)

Post by bruce »

I do not recommend doing this. Closing the windows or shutting down the computer often may result in corrupt files. It's pretty easy to want to get rid of that terminal after you've watched it for a few hours and to violate numbers 4 and 4a.
Ichbin3
Posts: 96
Joined: Thu May 28, 2020 8:06 am
Hardware configuration: MSI H81M, G3240, RTX 2080Ti_Rev-A@220W, Ubuntu 18.04
Location: Germany

Re: Running F@h through Terminal (command line)

Post by Ichbin3 »

Nobope wrote:But yeah, my question in all its simplicity: how should I launch the fahclient through terminal?
https://foldingathome.org/support/faq/i ... e-options/
It's all as simple as this ;-)
Image
MSI H81M, G3240, RTX 2080Ti_Rev-A@220W, Ubuntu 18.04
Nobope
Posts: 3
Joined: Fri Jun 12, 2020 5:59 pm

Re: Running F@h through Terminal (command line)

Post by Nobope »

Hmm, something definitively has changed...

Code: Select all

XXXXs@pop-os:~$ sudo /etc/init.d/FAHClient start
[sudo] password for XXXXs: 
Starting fahclient ... OK
fahclient is running now, okay... But where can I see the folding process? In the Terminal I can see nothing.

Indeed, it used to be enough to type `fahclient`, and the folding started at Terminal. Moreover, it gave directly the error messages should there have been some.

As I said, my fahcontrol is stuck in a loop of "UPDATING ... CONNECTING" ... and nothing happens, nothing happens... How do I know now if any work is being done?
Neil-B
Posts: 1996
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon [email protected], 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon [email protected], 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: [email protected], 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: Running F@h through Terminal (command line)

Post by Neil-B »

check logs and/or monitor cpu/gpu usage would be two ways ... updating/connecting may be permissions (user accounts type), settings (incorrect IP ranges), firewalls? ... but unfortunately I am a windows folder so my ability to help troubleshoot is very limited ... someone will be able to direct you towards where the logs are stored for linux and what tools work well for monitoring process CPU and GPU usage
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Running F@h through Terminal (command line)

Post by bruce »

Ichbin3 wrote:
Nobope wrote:But yeah, my question in all its simplicity: how should I launch the fahclient through terminal?
https://foldingathome.org/support/faq/i ... e-options/
It's all as simple as this ;-)
Yes, It's a simple as that PROVIDED YOU RUN LINUX. What about the rest of us?

This topic supports "Windows/Linux/MacOS X" and the concepts are exactly the same, as I said.
Neil-B
Posts: 1996
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon [email protected], 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon [email protected], 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: [email protected], 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: Running F@h through Terminal (command line)

Post by Neil-B »

The OP stated they were running a version of linux so I guess the post was aimed at answering the OP's question?
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Running F@h through Terminal (command line)

Post by bruce »

Neil-B wrote:The OP stated they were running a version of linux so I guess the post was aimed at answering the OP's question?
True but it was not posted in a forum that was dedicated to Linux and everybody potentially has the same question. We could add information about nohup to make it more reliable in Linux but we'd have to preix that with "For LInux users only..." and add a segment for WIndows and OS_X to make a fully supported answer.

How many Linux users know how to "translate" Windows concepts into Linux concepts? (Most, I suppose). How many Windows users know how to "translate" Linux concepts into Windows concepts? (Very few, I suppose). And for MacOS users...?
Neil-B
Posts: 1996
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon [email protected], 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon [email protected], 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: [email protected], 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: Running F@h through Terminal (command line)

Post by Neil-B »

True ... but the reply was still valid.

As to Windows Users using the command line I might pass comment that far fewer Windows Users would wish to do so when compared to Linux Users, and those who might are likely to be comfortable with both Windows command line and at least the basic rudiments of Linux command line ... but that is simply an observation from my experience and may be a reflection of the field I work in.

It would be good to improve the equivalent Windows FAQs https://foldingathome.org/support/faq/i ... ne-option/ to include FahClient Start/Stop commands (and any other more regularly used commands/switches but updating the web is I guess currently running a bit behind the curve ... I'll keep my fingers crossed.
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Running F@h through Terminal (command line)

Post by bruce »

True.

HideConsole is a rotten way to create a Windows daemon that MS forces it to be run under the ID of the logged-on user for it to be able to control the primary GPU.
Nobope
Posts: 3
Joined: Fri Jun 12, 2020 5:59 pm

Re: Running F@h through Terminal (command line)

Post by Nobope »

Neil-B wrote:It would be good to improve the equivalent Windows FAQs https://foldingathome.org/support/faq/i ... ne-option/ to include FahClient Start/Stop commands (and any other more regularly used commands/switches but updating the web is I guess currently running a bit behind the curve ... I'll keep my fingers crossed.
True, I agree. As I said, I have encountered similar problems with my Windows 10 as well ..., I don't want any confrontation between Windows users and Linux users here ... that's not necessary (I'm both!)

But to get back to my original Linux-related question, how do I know now if any work is being done on my Linux laptop (after running `fahclient` via Terminal, please see above)? As I said, my fahcontrol is stuck in a loop of "UPDATING ... CONNECTING" ...

Cheers!
Neil-B
Posts: 1996
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon [email protected], 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon [email protected], 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: [email protected], 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: Running F@h through Terminal (command line)

Post by Neil-B »

SO I'll get top or htop will let you see the running processes ... ps aux | less may also show the running processes as I guess they will be high on the list ... that should confirm cpu and/or gpu are being utilised ... https://foldingforum.org/viewtopic.php? ... 24#p327413 method 2 of the post logs may give you a clue as to where the logs are kept
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
Knish
Posts: 222
Joined: Tue Mar 17, 2020 5:20 am

Re: Running F@h through Terminal (command line)

Post by Knish »

for checking linux running FAHclient, i would simply spot check the log file with:

Code: Select all

tail /var/lib/fahclient/log.txt
if u see percentage progress increasing, then all is good. if not... u got some detective work to do
anandhanju
Posts: 522
Joined: Mon Dec 03, 2007 4:33 am
Location: Australia

Re: Running F@h through Terminal (command line)

Post by anandhanju »

When you start FAH via the terminal using `sudo /etc/init.d/FAHClient start`, it runs in the background. To double check if it is running, you can use `ps -ef | grep FAHClient` or simply top as Neil-B has suggested. To see the progress, you can `tail /var/lib/fahclient/log.txt` as Knish suggested.
Post Reply