Script FAHClient on macOS

Moderators: Site Moderators, FAHC Science Team

earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Script FAHClient on macOS

Post by earthsaver »

I was previously using lufah to script FAHClient to pause or resume folding around processor intensive operations like backups. It looks like a recent release deprecated this functionality and I see mention of a built-in fahctl command instead. However, I haven't been able to get this to work on my Mac.

Is there some additional setup I need to do for this level of shell scripting? If I run the command <fahctl pause>, I get this error:

Connection to remote host was lost.: ws://127.0.0.1:7396/api/websocket
- Ben
M1 iMac
calxalot
Site Moderator
Posts: 1668
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

The only thing deliberately removed from lufah was support for resource groups with fah 8.1.

If you’re running a bleeding edge build of fah, you temporarily need to remove fah-web-control if present. Or whatever is pointed to by option web-root.
calxalot
Site Moderator
Posts: 1668
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

fahctl only requires python 3.6+ and module websocket-client
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

calxalot wrote: Tue Sep 02, 2025 7:21 am The only thing deliberately removed from lufah was support for resource groups with fah 8.1.

If you’re running a bleeding edge build of fah, you temporarily need to remove fah-web-control if present. Or whatever is pointed to by option web-root.
I allow fah to update itself in the background. That's how I'm running 8.4.9. Are you saying that lufah should still work as is? How do I find out what is pointed to by option web-root? How do I temporarily remove fah-web-control?

Ultimately, I want both script control with something like lufah and web control. Can I do both?
- Ben
M1 iMac
calxalot
Site Moderator
Posts: 1668
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

I’m saying to remove or rename directory fah-web-control in the data directory, if it exists. It would only exist if you put it there.
calxalot
Site Moderator
Posts: 1668
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

Upgrade lufah to 0.11.0
You can use both lufah and web control. You just temporarily cannot use a local web control served by the client, which has a built in web server.
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

I upgraded lufah. Where is the data directory from which I need to remove web control? Also, lufah doesn't seem connected to my client. I'm having trouble resolving this and/or can't find the command that will do it. Reviewed the github page as well as the help within Terminal.
- Ben
M1 iMac
calxalot
Site Moderator
Posts: 1668
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

On Mac, the data directory is
/Library/Application Support/FAHClient
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

That's what I thought. I don't have anything related to web control there.
- Ben
M1 iMac
calxalot
Site Moderator
Posts: 1668
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

Please post output of command

Code: Select all

lufah -dv groups
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

ERROR:lufah.util:Unable to resolve 'groups' or 'groups.local'
DEBUG:lufah.fahclient:Created FahClient("groups")
ERROR:lufah.fahclient:groups:connect(): uri is None
-------------------------------------------------------------------------
Project CPUs GPUs Status Progress PPD ETA
-------------------------------------------------------------------------
groups NOT CONNECTED

--
I get respectively the same output with other lufah commands, too.
- Ben
M1 iMac
calxalot
Site Moderator
Posts: 1668
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

You are not running the latest lufah.
Several versions ago the peer argument was changed to an address option.
calxalot
Site Moderator
Posts: 1668
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

If you installed via pipx, use
pipx upgrade lufah
calxalot
Site Moderator
Posts: 1668
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

If via pip, use
pip install -U lufah
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

What's the proper method to update lufah? I just uninstalled and reinstalled it and get these confirmations:

⚠️ Note: lufah was already on your PATH at /usr/local/bin/lufah
installed package lufah 0.11.0, installed using Python 3.9.6
These apps are now globally available
- lufah
⚠️ Note: '/Users/earthsaver/.local/bin' is not on your PATH environment
variable. These apps will not be globally accessible until your PATH is
updated. Run `pipx ensurepath` to automatically add it, or manually modify
your PATH in your shell's config file (e.g. ~/.bashrc).

I used homebrew to install pipx and then ran ensurepath. Still, I get the same result from lufah -dv groups, as other lufah commands.
- Ben
M1 iMac
Post Reply