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?
Fold/Pause/Finish from command line?
Moderators: Site Moderators, FAHC Science Team
-
- Site Admin
- Posts: 7937
- Joined: Tue Apr 21, 2009 4:41 pm
- Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2 - Location: W. MA
Re: Fold/Pause/Finish from command line?
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.
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.
iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
Re: Fold/Pause/Finish from command line?
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.
works like a charm!
You need to use the telnet interface. (eg:
Code: Select all
telnet 127.0.0.1 36330
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
Re: Fold/Pause/Finish from command line?
Whoops, didn't see this while I was working on my answer. Nice to know there's multiple ways to do this! Thank youJoe_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.
Edit:
Code: Select all
FAHClient --send-finish
Code: Select all
FAHClient --send-unpause
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.