Message boards : BOINC client : Starting BOINC clients and attaching projects, except from a single terminal
Message board moderation
Author | Message |
---|---|
Send message Joined: 15 Aug 17 Posts: 2 |
Hello all, I have a bit of a "challenge case" here. I'm trying to set up an array of BOINC clients (with some spare $$$ I got for free in an azure deal), from what amounts to a single command prompt/terminal. Alas, there is a difficulty: The BOINC client runs effectively forever , and it blocks the executing command line/terminal from executing other commands whilst it runs. Since Boinccmd needs a running client to attach projects and do control operations to, it is impossible to attach BOINC projects to the client from the same terminal as the client. The logical solution to this is to run the client seperately: start boinc.exe but, with that, subsequent commands to configure/attach/otherwise control the BOINC client will probably execute before the the client is fully initialized (A race condition, as they call it). I have found what seem to be three different option to solving this, all of which could work, none of which I know how to implement: Option 1, attach beforehand: $ setting-dinglehopper --project-attach URL WEAKKEY $ boinc.exe Option 2, attach in the same command: $ boinc.exe --project-attach URL WEAKKEY EDIT: I did figure out how to do this one, although apparently it is not recommended, and I'd like a better solution. or Option 3, somehow wait for the client to start: $ start boinc.exe $ boinccmd --wait-for-boinc-client? $ boinccmd -project-attach URL WEAKKEY If none of these work, I could work something out using remote RPCs... but avoiding that would be so~ much easier. Batch (.bat) files ARE a possibility. The operating system of choice is Linux, although Windows is a possibility as well. (This is Microsoft Azure we're talking about here). Thanks for any tips! Lucas Niewohner (or Hermanoid, whichever you prefer) |
Send message Joined: 6 Dec 06 Posts: 118 |
https://boinc.berkeley.edu/wiki/client_configuration#Command-line_options For Linux, use --daemon For Windows, use --detach_console That will start the client and return control of the terminal to you. |
Send message Joined: 15 Aug 17 Posts: 2 |
Thanks BobCat, that's a link I didn't know about. However, it doesn't look like --detach_console will complete the Initialization process on the client before returning control, so running a control command like boinccmd --project_attach URL WeakKey ...immediately after starting the client will almost certainly cause the control command to be executed before the client is initialized, resulting in an error. If --detach_console is to work, there will have to be a subsequent command to wait until the client is started. All of that said, I think the --attach_project command (on the client itself) will work just fine. Thanks for the help! |
Send message Joined: 29 Aug 05 Posts: 15570 |
The --detach_console command closes the command line window but leaves the client running. It won't close the command line window until all of the commands the client has to full fill have been done, and the client itself is fully initialized. |
Send message Joined: 13 Jun 14 Posts: 81 |
Thanks BobCat, that's a link I didn't know about. Well there is a command for that. TIMEOUT [/T] timeout [/NOBREAK] Description: This utility accepts a timeout parameter to wait for the specified time period (in seconds) or until any key is pressed. It also accepts a parameter to ignore the key press. Parameter List: /T timeout Specifies the number of seconds to wait. Valid range is -1 to 99999 seconds. /NOBREAK Ignore key presses and wait specified time. /? Displays this help message. NOTE: A timeout value of -1 means to wait indefinitely for a key press. Examples: TIMEOUT /? TIMEOUT /T 10 TIMEOUT /T 300 /NOBREAK TIMEOUT /T -1 Normally I'll give BOINC about 5 seconds before sending any commands to it. I will also run a benchmark before attaching projects. So that I don't have to wait for it to run on its own. |
Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.