Personal computing discussed

Moderators: renee, farmpuma, just brew it!

 
BIF
Minister of Gerbil Affairs
Topic Author
Posts: 2458
Joined: Tue May 25, 2004 7:41 pm

I want to write a folding command script

Mon Oct 10, 2016 12:18 am

Hello:

Sometimes I want to play a game, do some music recording, focus on some graphic art project, read a book in peace, or just have a quiet phone conversation in my home office. To do this, I have to switch one of my monitors over to the workstation and hit "pause" on the F@H client. Then I hit "fold" when I'm done. It's a minor-to-medium hassle.

Sometimes I forget to start folding again. On occasion, a few days will have gone by before I realize I'm not folding. And all that because I shut it down to play a game and then went to bed when I got tired and just forgot to turn it back on again. Grrr!

Setting the client's priority slider doesn't give me the flexibility that I want. I'm basically looking for a way to shut down the folding and then to optionally restart it at a certain time or upon a certain event.

I'm thinking of writing a batch command script with some of the most common options I think I'll use. Maybe the script could be be launched by timer or by command. It would be even better if I can launch it by a cell phone app, and best if it could be done when I'm not even home...in fact, that would rock!

Here are some of the options I'd like to have:

1. Stop folding, with these options:
-- Immediately (aka "pause")
-- After current WUs finish (aka "finish")
-- at a specific time today
-- x hours or y minutes from now (shut it down before a pre-arranged meeting)
-- make "stop" persistent across a reboot until I specifically restart the client or issue a start command (this would be nice to have for when I'm upgrading hardware or software and expect to do numerous reboots).
-- optionally with Folding restart parameters (see #2)

2. Start folding (as part of the stop command, or optionally issue start command by itself):
-- Immediately
-- at a specific time today
-- upon next reboot
-- x hours or y minutes from now (when I know my meeting will be over or when I know I'll have gone to bed)
-- after some event occurs (like a render finishes, or when I close a game)

So to be clear, I don't want folding to be set to "light" mode. The slider messes things up. Basically, I want my folding to happen full-blast or dead-stop. I'd like to do this with either RUN commands or maybe with some desktop icons with the 3 or 4 most-used options.

How can I go about making something like this happen?
 
Topinio
Gerbil Jedi
Posts: 1839
Joined: Mon Jan 12, 2015 9:28 am
Location: London

Re: I want to write a folding command script

Mon Oct 10, 2016 1:06 am

No idea, but I'd really like this too. Ideally, a feature of a 1 week calendar in the advanced client itself, so I can tell it the blocks of time when I'll need my machine back... it could then, if it was clever enough, given me jobs that would (most likely) complete in the windows it has.
Desktop: 750W Snow Silent, X11SAT-F, E3-1270 v5, 32GB ECC, RX 5700 XT, 500GB P1 + 250GB BX100 + 250GB BX100 + 4TB 7E8, XL2730Z + L22e-20
HTPC: X-650, DH67GD, i5-2500K, 4GB, GT 1030, 250GB MX500 + 1.5TB ST1500DL003, KD-43XH9196 + KA220HQ
Laptop: MBP15,2
 
BIF
Minister of Gerbil Affairs
Topic Author
Posts: 2458
Joined: Tue May 25, 2004 7:41 pm

Re: I want to write a folding command script

Mon Oct 10, 2016 1:33 am

I love that idea!

Another idea might be to tell it a "finish by time" where it could calculate backwards to figure out roughly when it would accept "one last" WU. The challenge here of course is that there's a wide disparity in work units of the same type (but usually different projects). I've seen X21 WU's finish in a couple hours, and others will run more than 6 hours.
 
Topinio
Gerbil Jedi
Posts: 1839
Joined: Mon Jan 12, 2015 9:28 am
Location: London

Re: I want to write a folding command script

Mon Oct 10, 2016 2:43 am

That would be great if it did that.

The WU's are (as you say) quite variable -- my HTPC just got a WU that's going to take its poor little Cape Verde card 2 days to chomp through -- but ballpark would do in most cases.
Desktop: 750W Snow Silent, X11SAT-F, E3-1270 v5, 32GB ECC, RX 5700 XT, 500GB P1 + 250GB BX100 + 250GB BX100 + 4TB 7E8, XL2730Z + L22e-20
HTPC: X-650, DH67GD, i5-2500K, 4GB, GT 1030, 250GB MX500 + 1.5TB ST1500DL003, KD-43XH9196 + KA220HQ
Laptop: MBP15,2
 
JustAnEngineer
Gerbil God
Posts: 19673
Joined: Sat Jan 26, 2002 7:00 pm
Location: The Heart of Dixie

Re: I want to write a folding command script

Mon Oct 10, 2016 5:27 am

A small part of what you'd like is available with the "Only when idle" button.  Have you messed around with running the control remotely or using the web interface?
· R7-5800X, Liquid Freezer II 280, RoG Strix X570-E, 64GiB PC4-28800, Suprim Liquid RTX4090, 2TB SX8200Pro +4TB S860 +NAS, Define 7 Compact, Super Flower SF-1000F14TP, S3220DGF +32UD99, FC900R OE, DeathAdder2
 
BIF
Minister of Gerbil Affairs
Topic Author
Posts: 2458
Joined: Tue May 25, 2004 7:41 pm

Re: I want to write a folding command script

Mon Oct 10, 2016 7:41 am

"Only when idle" has limited usefulness, like if I was running a render or doing some music. But when I pause and go get a beverage or step outside, folding would start again. Even if I still had the game loaded. Some games don't like sharing space with the F@H GPU slots, and they'll crash.

Idle mode also won't help me when I just want to make a phone call and need 20 minutes of silence. I'll have to switch the monitors/mouse over to the machine and then use the machine often enough to keep it from going to screensaver mode. Too inconvenient, or I'd be doing it now.

What do you mean by "running the control remotely"?

I think we need a "snooze" button for F@H. :)
 
Kougar
Minister of Gerbil Affairs
Posts: 2306
Joined: Tue Dec 02, 2008 2:12 am
Location: Texas

Re: I want to write a folding command script

Fri Oct 14, 2016 9:42 pm

I'm not aware of any methods that would be easier than swapping to the other monitor. There are utilities that can monitor multiple F@H installs across your network (like http://fahmon.net/) but the last utility that allowed remote command execution is no longer active. Ya could use FAHmon to check the status as inactive clients will stand out. I configured the v7 client to automatically restart in the same setting it was when it closed (so paused WU's stay paused, finishing, etc), that doesn't require any scripts. 

Maybe you can do it through the web control interface, supposedly the client supports remote administration but I don't know how that works exactly. I did google up some remote command scripts for F@H, but I haven't looked at them: https://github.com/portellaa/fah-cli
 
BIF
Minister of Gerbil Affairs
Topic Author
Posts: 2458
Joined: Tue May 25, 2004 7:41 pm

Re: I want to write a folding command script

Sun Jan 08, 2017 1:00 pm

Hi again. Sorry, got busy and occupied there for a long while.

I just thought of something else. My iPhone and iPad are both part of my network. While I'm home, anyway. If I could submit a command to my folding machine from the phone or tablet, that would be super. Even better if I could make it work when I'm away, such as if I'm in the company office and realize that I forgot to turn my folding back on again before leaving the house.

I'm really hoping somebody will come up with a workable idea, because I forgot to turn on folding twice in the last couple weeks. Opportunity lost of maybe a couple hundred work units and a few million points.

Idea #2 -

Maybe there's some "screen scraping" software that could be taught how the UI works for any given application, then I could write a macro or a script to make the software push buttons on the client as if it were a human, maybe even at a predetermined time; you know, sort of like front-ending the F@H client's GUI.

I know some software such as Dragon have the capability of converting voice commands into UI actions and then interfacing with the software you want to control. I heard somebody in the office once using it on MS Office documents. Voice command is not necessarily what I'm looking for, since I'm happy to just write a script, but the rest of it might look similar (converting the desired action into a set of actions against a running application). And then there would need to be a way to manage and launch the script, like "stop folding right now" (pause now for 20 minutes) or at a predetermined time ("20 minutes has expired; time to wake up and relaunch folding").

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On