Page 1 of 1

Running F@h through Terminal (command line)

Posted: Tue Nov 10, 2020 9:31 pm
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!

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

Posted: Wed Nov 11, 2020 12:14 am
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

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

Posted: Wed Nov 11, 2020 12:20 am
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.

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

Posted: Wed Nov 11, 2020 10:06 am
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 ;-)

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

Posted: Wed Nov 11, 2020 3:21 pm
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?

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

Posted: Wed Nov 11, 2020 4:02 pm
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

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

Posted: Wed Nov 11, 2020 4:26 pm
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.

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

Posted: Wed Nov 11, 2020 4:30 pm
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?

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

Posted: Wed Nov 11, 2020 4:39 pm
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...?

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

Posted: Wed Nov 11, 2020 4:53 pm
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.

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

Posted: Wed Nov 11, 2020 5:09 pm
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.

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

Posted: Wed Nov 11, 2020 5:10 pm
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!

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

Posted: Wed Nov 11, 2020 5:20 pm
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

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

Posted: Thu Nov 12, 2020 2:22 am
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

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

Posted: Thu Nov 12, 2020 7:18 am
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.