Shutdown after WU Complete and reported

Moderators: Site Moderators, FAHC Science Team

Post Reply
alsutton
Posts: 3
Joined: Thu Apr 09, 2020 8:30 pm

Shutdown after WU Complete and reported

Post by alsutton »

Is there a way to tell a client to complete and report the current WU(s) and not request a new one?

My machines are powered by solar and a battery, as well as being located somewhere where on an exceptionally hot day they can start to thermally throttle, so it'd be great to be able to put a hook into some code which requests the weather for the next day and shuts down some of them overnight once they've completed and reported their current work unit.

At the moment I'm blocking the fetching of new work units by putting the following into the hosts file;

Code: Select all

127.0.0.1 localhost assign1.foldingathome.org assign2.foldingathome.org
but it'd be great to do it in a "cleaner" way.
PantherX
Site Moderator
Posts: 6986
Joined: Wed Dec 23, 2009 9:33 am
Hardware configuration: V7.6.21 -> Multi-purpose 24/7
Windows 10 64-bit
CPU:2/3/4/6 -> Intel i7-6700K
GPU:1 -> Nvidia GTX 1080 Ti
§
Retired:
2x Nvidia GTX 1070
Nvidia GTX 675M
Nvidia GTX 660 Ti
Nvidia GTX 650 SC
Nvidia GTX 260 896 MB SOC
Nvidia 9600GT 1 GB OC
Nvidia 9500M GS
Nvidia 8800GTS 320 MB

Intel Core i7-860
Intel Core i7-3840QM
Intel i3-3240
Intel Core 2 Duo E8200
Intel Core 2 Duo E6550
Intel Core 2 Duo T8300
Intel Pentium E5500
Intel Pentium E5400
Location: Land Of The Long White Cloud
Contact:

Re: Shutdown after WU Complete and reported

Post by PantherX »

Welcome to the F@H Forum alsutton,

You can use the Finish command which will instruct the client to finish folding the current WU and then not request any. Also, if you would like to fold X WUs and then pause the system, you can use this setting:

Code: Select all

  max-units <integer=0>
    Process at most this number of units, then pause.
ETA:
Now ↞ Very Soon ↔ Soon ↔ Soon-ish ↔ Not Soon ↠ End Of Time

Welcome To The F@H Support Forum Ӂ Troubleshooting Bad WUs Ӂ Troubleshooting Server Connectivity Issues
Neil-B
Posts: 1996
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon E5-2697v3@2.60GHz, 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon E3-1505Mv5@2.80GHz, 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: i7-960@3.20GHz, 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: Shutdown after WU Complete and reported

Post by Neil-B »

At least one folder has recently written code to use the finish flag to ensure their kit isn't folding when they want it for work … They have it start after work hours and run a finish command a couple of hours before.

It should therefore be possible for you to code something that looks at your local weather forecast on the web and uses that to trigger a finish command if the weather is forecast to be too warm … but a simpler one would just be a script you set going in the evening if the forecast for the next day is "hot" that sends a finish command to the client at an appropriate time … What that time will be will be a judgement call on your part as it may depend on WU size and how quick your kit is.

If you search around the forums a bit you should find the topic from the folder who did this recently if you need advice … Will also depend a lot on what OS you are running as to how this might be best approached.

This thread may also give some clues viewtopic.php?f=106&t=33809&p=321395&hi ... vb#p321395
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
klaus
Posts: 1
Joined: Thu Apr 23, 2020 1:01 pm

Re: Shutdown after WU Complete and reported

Post by klaus »

I'd highly appreciate a possibilty of telling the client "Finish and Shutdown Windows".

I am also running on PV-Energy and would really like to let a job finish, submit and subsequently switch off my computer. A simple thing of environmental responsibility and money saving.

Regards
Klaus
Joe_H
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: Shutdown after WU Complete and reported

Post by Joe_H »

As mentioned, the client can be controlled through scripts. The client is accessible through the telnet protocol on port 36330 connecting to the local IP 127.0.0.1. You can connect directly using telnet or netcat to that address and port.

Or you can send commands using FAHClient --send as mentioned in the linked topic. Documentation is provided by FAHClient --help.

And finally you can program your own app to connect to for monitoring and controlling FAHClient - https://github.com/FoldingAtHome/fah-co ... Client-API.

Shutting down Windows is outside the scope of programming for the client itself, that would have to be handled by your own script.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
alsutton
Posts: 3
Joined: Thu Apr 09, 2020 8:30 pm

Re: Shutdown after WU Complete and reported

Post by alsutton »

Thanks for the tips. Much appreciated :).
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Shutdown after WU Complete and reported

Post by bruce »

klaus wrote:I'd highly appreciate a possibilty of telling the client "Finish and Shutdown Windows".
This is areadly on the official list of proposed enhancements.
Zangetsu
Posts: 10
Joined: Mon Dec 23, 2019 9:56 pm

Re: Shutdown after WU Complete and reported

Post by Zangetsu »

try viewtopic.php?f=108&t=34860
It's the script i'm using.
Post Reply