PDA

View Full Version : Scheduling BOINC



AMDave
10-03-2004, 04:15 AM
In another thread, DMMC said:

If I could get the %@@!!*&@ scheduler to work right in BOINC so that systems would run after hours I could put alot more systems in it

So I thought we should have a look at this.

We know that there is a "service" instance of BOINC and it has CLI controls. We know that we can't directly control a service from the scheduler. But we know that we can control WSH (Windows Shell script) files from the scheduler.

So what we need is some code to start and stop the service.
We don't want the WSH script running the whole time so we should split this into 2 files (1 to start it and 1 to stop it each to be called by the scheduler).

Now we need some WSH control code (can be .wsh or .vbs or .js). There's not much that you can't find or get a lead on from MSDN & the MS Knowledgebase these days.:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting061499.asp

I found this piece which should help:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/objects/ishelldispatch2/servicestart.asp

Alternatively you could use the ShellExecute method to start BOINC as a CLI task and send the kill SIG to the process later on to stop it.

I'd prefer to use the service instance though as the output is sent to the windows message log.

AMDave
10-03-2004, 04:29 AM
Oh, by the way you will need to ensure that BOINC has been installed as a service...

Starting the service can be done using this script I saved as BOINCstart.vbs


Call ServiceStartVB()

Sub ServiceStartVB()
dim objShell
dim bReturn

set objShell = CreateObject("Shell.Application")

bReturn = objShell.ServiceStart("BOINC", true)

set objShell = nothing
end sub

Stopping the service can be don using this file BOINCstop.vbs which is exactly the same but with "start" replaced with "stop"



Call ServiceStopVB()

Sub ServiceStopVB()
dim objShell
dim bReturn

set objShell = CreateObject("Shell.Application")

bReturn = objShell.ServiceStop("BOINC", true)

set objShell = nothing
end sub


So. There you go.

Now you can place some scheduler entries to call the files when you want from the scheduler.

You can even script that across your network as well using the AT command.

I'd prefer to make some extra "stop" call to make absolutely sure, but even if BOINC is running in the background as a service it is not going to be visible to an end user in terms of CPU availability or in the GUI.

DMMc
10-03-2004, 01:17 PM
OK!!

Thanks Dave. I will start trying this on systems Monday. I do hope it works. for me.

AMDave
10-03-2004, 01:51 PM
Ooops.
Almost forgot.

====================
* Never run the GUI and *
* the CLI at the same time. *
====================

It *will* trash your projects and
it *can* trsh the BOINC install.

Empty_5oul
10-03-2004, 02:11 PM
now that owuld have been funny across 90 systemas if they all needed re-installing for BOINC to work lol :P

AMDave
10-03-2004, 02:13 PM
:oops: I seem to have a habit of learning some things the hard way.

DMMc
10-03-2004, 04:01 PM
now that owuld have been funny across 90 systemas if they all needed re-installing for BOINC to work lol :P

Remote access is a wonderful thing but a total reinstall on all systems..... :shaking:


Please don't even jest [-X

Empty_5oul
10-03-2004, 04:26 PM
just wondering what do you use for remote access and what os do the systems have?
i have used VNC which is good but at school / college they had some amazing tools where the master had thumbnails on their screen of every PC and could take control in real time, that was pretty kool but lagged the network a bit :(

DMMc
10-03-2004, 04:38 PM
Use a program called Radmin. it works well across both network and even 56k connections. the interface allows you to see and interact live with user at other system or to take total control.
I use it to see what is going on when my users FU.

Empty_5oul
10-03-2004, 06:52 PM
ok, ill have a look online at some point,

sounds good tho :thumbleft:
how long would it take you for example to install a simple program and get it running such as SOB on ALL the machines then - is there a command to allow you to do something to every machine all at the same time.

vaughan
11-18-2004, 07:39 AM
Not sure if this has been covered but ...
how do you force BOINC to run a project?

I have CPDN and SETI in my BOINC projects list. I have been to both project sites and set SETI at 99 and CPDN at 1.
I stopped / suspended BOINC and then started it but still CPDN runs. I have a SETI task that expires in a few hours and it is 98% done - I want to complete it but BOINC won't let me. Grrrrrr!

AMDave
11-18-2004, 07:57 AM
vaughan,

go to the project sites & change your "percentage" focus to 100% on Seti and 0% on the others, then do a manual "update" on each of the projects

it "should" work, but may take up to half an hour for the client to switch focus depending upon where it is upto in the current "bite" that it has taken out of the WU it is working on.

worth a try anyway.

Please let us know if it works.

vaughan
11-18-2004, 10:17 AM
Thanks Dave that did the trick.

Beerknurd
11-20-2004, 04:10 AM
Dave your a genius. =D<

jlangner
11-20-2004, 04:21 PM
On Bionic 4.55 - You can click each project and suspend it or run it under Projects tab on GUI. If you haven't tried 4.55 you should try it - I really like it. No bugs so far that I have seen.