Message boards : BOINC Manager : Starting and disconnecting BOINC Manager
Message board moderation
Author | Message |
---|---|
Send message Joined: 1 Oct 15 Posts: 394 |
I have two issues surrounding BOINC Manager in the Windows 7-10 environment I could use a bit of help understanding. I'm hoping someone here more familiar will take a minute to help me out. 1) Starting BOINC Manager (BM) I have been unable to find a way to start BM from a Windows batch or cmd file, without it hanging until BM exits. Unlike the client, there does not seem to be support for a --detach option. Neither --systray nor -autostart helps. Is there a workaround for this, or something I'm missing? I need to be able to shut down and then restart BM from within a batch file. 2) Relationship between BOINC Manager and the BOINC Client It's my observation, belief and certainty that it's entirely permissible to stop and then restart the BOINC Client without shutting BM down, just like with BoincTasks. But it would be really great to get some definitive confirmation that shutting the client down while leaving the Manager running is not going to cause any type of problem with the Client's integrity. Thanks in advance for any help. |
Send message Joined: 5 Oct 06 Posts: 5129 |
1) Argh! I wrote the second paragraph (1a) before I'd double-checked that I was answering the right question - and I wasn't! But I'll leave it anyway, in case this thread is useful to anyone else. boincmgr has C:\BOINC>boincmgr /h Usage: boincmgr [/h] [--verbose] [/a] [/s] [/n <str>] [/g <str>] [/p <str>] [/b <str>] [/i] [/c] [/m] /h, --help show this help message --verbose generate verbose log messages /a, --autostart BOINC Manager was started by the operating syste m automatically /s, --systray Startup BOINC so only the system tray icon is vi sible /n, --namehost=<str> Host name or IP address /g, --gui_rpc_port=<str> GUI RPC port number /p, --password=<str> Password /b, --boincargs=<str> Startup BOINC with these optional arguments /i, --insecure disable BOINC security users and permissions /c, --checkskins set skin debugging mode to enable skin manager e rror messages /m, --multiple multiple instances of BOINC Manager allowed and uses boincmgr /a /s for its own autorun at startup. I think you can use start boincmgr / / /whatever in your cmd file to avoid the hang. 1a) What I'm doing at the moment with the SETI@Home optimised application installer is either boinc.exe --detach_phase_two or boincsvcctrl.exe --start - depending, obviously, whether BOINC was running in user mode or service mode when my application had to discover the right way of shutting it down. The ' --detach_phase_two' feels weird, but it was in some early documentation, and it seemed to work (and was the only choice which did work with older clients). They tried to tidy the code up a few years ago, and broke my installer, so I persuaded them to put it back so I didn't have to use different commands for each generation of client. The current code is https://github.com/BOINC/boinc/blob/8604e8e0bdda499694e1040d5f0b86fe5f5fe4e1/client/cs_cmdline.cpp#L144 } else if (ARG(detach_phase_two) || ARG(detach) || ARG(detach_console)) { so those should all be synonyms and work the same way. 2) I do exactly that - close the client but leave the Manager running - in my installer. It works, but I do leave it to the very last possible moment, after all the stages when the user might pause to decide on their next input. I suspect that the Manager might try to restart the Client automatically if it decides it has gone missing for too long - perhaps 30 seconds - so I try to avoid that. Haven't tested it recently though. |
Send message Joined: 5 Oct 06 Posts: 5129 |
Thinking about it, why would you want to --detach the Manager? It's a user interface, nothing more. If you want to manage the client, start it: if you just want to resume computation, start the client directly and leave it at that. |
Send message Joined: 1 Oct 15 Posts: 394 |
Thinking about it, why would you want to --detach the Manager? It's a user interface, nothing more. If you want to manage the client, start it: if you just want to resume computation, start the client directly and leave it at that. As always, Richard, you're a wealth. Brain dead here, of course it is like 0530 here, basically bedtime. The START command I overlooked solved the problem nicely once I was able to get the syntax right. Agreed, --detach wasn't the right concept. Was just an issue on getting it to start. Also, appreciate the confirmation that nothing will get messed up. Didn't see how it could. One of the folks I was doing this for was positive that Mgr must be shut down in order to not mess up the client. Thanks, have a great one!! |
Send message Joined: 29 Aug 05 Posts: 15561 |
Thinking about it, why would you want to --detach the Manager? As far as I know, the --detach command is used to close the command line window you used to start the executable with, without exiting the executable. To avoid that confusion it's now --detach_console |
Send message Joined: 1 Oct 15 Posts: 394 |
Thinking about it, why would you want to --detach the Manager? That's what I was aiming for on BOINC Manager. Thankfully, Richard pointed me towards the START command which essentially did the same thing for me. When I started this thread, I knew it would be Jord, Richard or both who would set me straight. As always, much appreciated. Jim ... |
Send message Joined: 29 Aug 05 Posts: 15561 |
Just to make sure a next reader understands, you can start the client manually, but if you want to do so from the command line (a cmd.exe window) the --detach_console command is needed, else when you close the command line window, you exit the client. So in that case, from the command line window do: "C:/Program Files/BOINC/boinc.exe" --detach_console Or in older cases: "C:/Program Files/BOINC/boinc.exe" --detach This starts the client and allows one to close the command line window without exiting the BOINC client. After that you can manually start BOINC Manager. The quotes are around the initial command, because of the space between 'Program' and 'Files'. PS: One can make a shortcut with the above command and place it on one's desktop. If at least you're using BOINC from that place, else you have to use your own directory's path. |
Send message Joined: 1 Oct 15 Posts: 394 |
Just to make sure a next reader understands, you can start the client manually, but if you want to do so from the command line (a cmd.exe window) the --detach_console command is needed, else when you close the command line window, you exit the client. Yep. Not sure why, but on 7.6.22 --detach seems to be fine, on a Win10 box. Thanks! |
Send message Joined: 29 Aug 05 Posts: 15561 |
2) Relationship between BOINC Manager and the BOINC Client For completeness... When you manually start the BOINC client from the command line (or shortcut), then start BOINC Manager, they'll connect. When you now exit the client (through Windows Task Manager, select boinc.exe, End process, acknowledge) the manager keeps running but is empty in all tabs. When you then restart the client manually from the command line (or shortcut), it'll connect to the open BOINC Manager. In days of old I think it used to be that when BOINC Manager started the client and the client dropped away for some reason, that the manager would automatically restart the client. Apparently not anymore. Perhaps in the case of an actual crash, or the case of the famous "The BOINC client has exited unexpectedly 3 times within the last 3 minutes" messages. |
Send message Joined: 29 Aug 05 Posts: 15561 |
When you now exit the client (through Windows Task Manager, select boinc.exe, End process, acknowledge) I was just writing new FAQs for the BOINC FAQs and noticed an oversight I made here. This is the difficult way of exiting the client, there's a way easier one: BOINC Manager->View->Advanced view->File->Shut down connected client...->Acknowledge. |
Send message Joined: 5 Oct 06 Posts: 5129 |
Or from a script: boinccmd --quit |
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.