Page 1 of 1
Fold/Pause/Finish from command line?
Posted: Thu Feb 18, 2021 6:24 pm
by dr_bees
I'm looking to finish all running jobs at the end of the day and then start again in the morning. My pets sleep in the same room as my PC and I think the fan noise from folding all night has been disturbing them. The fan speed tends to ramp up and down somewhat unpredictably during folding.
I was hoping I could just use a cronjob to tell FAH to finish in the evening and start folding again in the morning, but I don't really see a command line interface for FAHControl. I'm running linux.
Any suggestions?
Re: Fold/Pause/Finish from command line?
Posted: Thu Feb 18, 2021 6:48 pm
by Joe_H
Welcome to the folding support forum.
There are several ways to approach this. There is a defined API for communicating with the F@h client -
https://github.com/FoldingAtHome/fah-co ... Client-API. That can be used to program an app if you want.
As mentioned on the page, you can use telnet or the equivalent to connect to the running FAHClient process and directly enter commands. For example on my Mac's I use the
nc (netcat) command to do this since telnet was removed in later versions of the OS.
You can also use the FAHClient command on the command line as well. Use
FAHClient --help to see all commands, you would use
FAHClient --send with a command such as pause or finish you want to be sent to the running FAHClient process in the background.
Re: Fold/Pause/Finish from command line?
Posted: Thu Feb 18, 2021 6:50 pm
by dr_bees
I've answered my own question looking elsewhere on the forum. Putting the answer all in one place in case it helps anyone else.
You need to use the telnet interface. (eg:
starts interactive telnet session. in the session, enter "help" to get a list of commands)
You can get the port number in FAHControl GUI -> configure -> connection. Mine is the default of 36330.
My situation is simple, since I have only one client running locally.
Code: Select all
echo -e "finish\nquit\n" | telnet 127.0.0.1 36330
Code: Select all
echo -e "unpause\nquit\n" | telnet 127.0.0.1 36330
works like a charm!
Re: Fold/Pause/Finish from command line?
Posted: Thu Feb 18, 2021 6:52 pm
by dr_bees
Joe_H wrote:Welcome to the folding support forum.
There are several ways to approach this. There is a defined API for communicating with the F@h client -
https://github.com/FoldingAtHome/fah-co ... Client-API. That can be used to program an app if you want.
As mentioned on the page, you can use telnet or the equivalent to connect to the running FAHClient process and directly enter commands. For example on my Mac's I use the
nc (netcat) command to do this since telnet was removed in later versions of the OS.
You can also use the FAHClient command on the command line as well. Use
FAHClient --help to see all commands, you would use
FAHClient --send with a command such as pause or finish you want to be sent to the running FAHClient process in the background.
Whoops, didn't see this while I was working on my answer. Nice to know there's multiple ways to do this! Thank you
Edit:
and
are definitely the cleaner option. Thanks Joe!
Edit again:
I'm actually using pause and unpause, since I forgot that sometimes jobs can take hours to wrap up. I was just worried about the jobs timing out but I think I'll be fine.