Starting and disconnecting BOINC Manager

Message boards : BOINC Manager : Starting and disconnecting BOINC Manager
Message board moderation

To post messages, you must log in.

AuthorMessage
Jimbocous
Avatar

Send message
Joined: 1 Oct 15
Posts: 281
United States
Message 72254 - Posted: 5 Sep 2016, 10:11:09 UTC

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.
ID: 72254 · Report as offensive
Richard Haselgrove
Volunteer moderator
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 2560
United Kingdom
Message 72255 - Posted: 5 Sep 2016, 10:48:43 UTC - in response to Message 72254.  

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.
ID: 72255 · Report as offensive
Richard Haselgrove
Volunteer moderator
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 2560
United Kingdom
Message 72256 - Posted: 5 Sep 2016, 10:52:39 UTC

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.
ID: 72256 · Report as offensive
Jimbocous
Avatar

Send message
Joined: 1 Oct 15
Posts: 281
United States
Message 72258 - Posted: 5 Sep 2016, 11:24:28 UTC - in response to Message 72256.  

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!!
ID: 72258 · Report as offensive
Profile Ageless
Volunteer moderator
Project administrator
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 12233
Netherlands
Message 72261 - Posted: 5 Sep 2016, 12:06:52 UTC - in response to Message 72256.  

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
Jord
Please do not private message me for tech support. Use the forums for that. Tech PMs will be ignored.
ID: 72261 · Report as offensive
Jimbocous
Avatar

Send message
Joined: 1 Oct 15
Posts: 281
United States
Message 72263 - Posted: 5 Sep 2016, 12:16:30 UTC - in response to Message 72261.  

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

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 ...
ID: 72263 · Report as offensive
Profile Ageless
Volunteer moderator
Project administrator
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 12233
Netherlands
Message 72264 - Posted: 5 Sep 2016, 12:24:10 UTC - in response to Message 72263.  
Last modified: 5 Sep 2016, 12:37:06 UTC

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.
Jord
Please do not private message me for tech support. Use the forums for that. Tech PMs will be ignored.
ID: 72264 · Report as offensive
Jimbocous
Avatar

Send message
Joined: 1 Oct 15
Posts: 281
United States
Message 72265 - Posted: 5 Sep 2016, 12:28:35 UTC - in response to Message 72264.  
Last modified: 5 Sep 2016, 12:31:34 UTC

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!
ID: 72265 · Report as offensive
Profile Ageless
Volunteer moderator
Project administrator
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 12233
Netherlands
Message 72266 - Posted: 5 Sep 2016, 12:35:51 UTC - in response to Message 72254.  

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.

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.
Jord
Please do not private message me for tech support. Use the forums for that. Tech PMs will be ignored.
ID: 72266 · Report as offensive
Profile Ageless
Volunteer moderator
Project administrator
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 12233
Netherlands
Message 72268 - Posted: 5 Sep 2016, 15:29:11 UTC - in response to Message 72266.  

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.
Jord
Please do not private message me for tech support. Use the forums for that. Tech PMs will be ignored.
ID: 72268 · Report as offensive
Richard Haselgrove
Volunteer moderator
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 2560
United Kingdom
Message 72274 - Posted: 5 Sep 2016, 18:22:06 UTC - in response to Message 72268.  

Or from a script:

boinccmd --quit
ID: 72274 · Report as offensive

Message boards : BOINC Manager : Starting and disconnecting BOINC Manager

Copyright © 2017 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.