Results 1 to 2 of 2

Thread: Automatic project updates

  1. #1
    Xtreme Cruncher
    Join Date
    Jun 2006
    Location
    London
    Posts
    1,493

    Automatic project updates

    A number of participants have indicated that Boinc does not report results automatically back to the project web site after work units are crunched. It is possible to force reporting of results by manually issuing a Project Update from Boinc manager interface. It is also possible to automate the process by simply using a batch file and windows scheduler. Here is how:

    Step 1: Using notepad, create a batch file. This will invoke boinccmd.exe to issue the updates. You can also use it to update remote machines as well. You will need one line for every project for every machine. Save it in your Boinc directory, example C:\Program Files\Boinc\BoincAutoUpdate.bat. It would look like this:


    REM Boinc Automatic Project Update

    c:
    cd "c:\Program Files\Boinc"

    REM Update projects on this local machine in study (IP 10.1.1.2)
    "c:\Program Files\Boinc\boinccmd.exe" --project http://www.worldcommunitygrid.org/ update
    "c:\Program Files\Boinc\boinccmd.exe" --project http://www.malariacontrol.net/ update

    REM Update projects on remote machine in basement (IP 10.1.1.5)
    "c:\Program Files\Boinc\boinccmd.exe" --host 10.1.1.5 --passwd mypassword --project http://www.worldcommunitygrid.org/ update
    "c:\Program Files\Boinc\boinccmd.exe" --host 10.1.1.5 --passwd mypassword --project http://www.malariacontrol.net/ update

    REM Update projects on remote machine in bedroom (IP 10.1.1.7)
    "c:\Program Files\Boinc\boinccmd.exe" --host 10.1.1.7 --passwd mypassword --project http://www.worldcommunitygrid.org/ update


    Notes on updating remote machines:
    • The Fixed IP address of the remote machines can be obtained by visiting each machine. Right click on the network icon in the task bar and select status. Click Properties. Select TCP/IP from the list and click properties.
    • In the batch file, it is possible to substitute IP addresses of the remote machines with their machine names provided that the local machine can successfully resolve their IPs.
    • Using this batch file to update remote machines requires this machine (the one on which the batch file will be running, IP=10.1.1.2 in this example) to normally pass both the Boinc RPC authentication and authorisation security measures. This is the same procedure used when you communicate remotely with any Boinc cruncher (example via boincview):

      a) authentication: the value of the string "mypassword" must match those stored in the file(s) gui_rpc_auth.cfg on the remote machine(s). If not, you may want to edit gui_rpc_auth.cfg file on each remote machine to match the common password used. Or alternatively, if you prefer to keep independent passwords per machine then open and copy each auto generated password from each machine to this batch file.

      b) authorisation: the IP address of the communicating machine (in this example 10.1.1.2), must be among the allowed IPs listed in the remote_hosts.cfg file(s) on the remote machine(s). If file(s) don't exist (they are not generated by default) then you need to create a "c:\program files\Boinc\remote_hosts.cfg" file on each remote machine containing the IP of the communicating machine. In the authorisation file(s), it is possible to substitute IP address of the communicating machine with machine name provided that the remote machines can successfully resolve it's IP.

    Step 2: Test the batch file
    Click on the file
    A dos window may pup up (for now) while the file is running.
    When done, open the Boinc manager on each machine and check the message tab.
    If everything is Ok, you should see the project update messages logged in.

    Step 3: Automate the process. On the local machine (the one that will issue the update commands):
    From the windows START menu, go to Control Panel
    Right click on Scheduled Tasks (not it's sub-menu)
    Select open. This opens the Scheduled Task window, showing the list of currently defined tasks.
    Right click in an empty space in the window and select New -> Scheduled task. This will generate a "New task"
    Rename it: Right click on "New Task" and type "Boinc Auto Update" for example.
    Right click on "Boinc Auto Update" and select Properties. In the properties dialogue (note: quotation marks are significant):

    Task tab:
    Run: "C:\Program Files\BOINC\BoincAutoUpdate.bat"
    Start in: "C:\Program Files\BOINC"
    Comments: Run Boinc automatic project updates every six hours
    Run as: NT AUTHORITY\SYSTEM
    Run only if logged on = NO
    Enabled = YES

    Schedule tab:
    Show multiple schedules = YES (located at bottom)
    Hit the "NEW" button three times. This creates four times per day for the task to run.

    Note: you want to define four times such that those times do NOT coincide with the project(s) scheduled down times. Observe the difference between your local time and the project local time. You may also want to take into account the daylight saving differences as well if they are implemented differently (USA participants note: you are going to adjust your clocks earlier this year).
    For WCG in particular, setting the local times to equate to 5:00 11:00 17:00 and 23:00 UTC would be ideal.

    For each of the four times in the list edit the Start Time.
    Leave all other settings at default.
    Hit Ok.
    If a password dialogue pops up, leave the password fields blank and hit Ok to dismiss it.

    Step 4: Test the scheduled tasks:
    In the Scheduled Tasks dialogue window, right click on "Boinc Auto Update" task and select Run.
    Observe that no DOS window will pop up this time. Task should run silently.
    When done, open the Boinc manager on each machine and check the message tab.
    If everything is Ok, you should see the project update messages logged in.

    Done.

    Errors or comments? please PM.
    Last edited by meshmesh; 06-24-2007 at 05:56 AM.
    Dual Clovertown @ 3.2 GHz (stock Vcore), 4x1GB 667 FB-DIMMS, SM X7DAE, Silencer 610 PSU, Windows server 2K3 EE.
    (professionally built & generously hosted by movieman)

    AMD64 X2 4400+ @237x11 (1.39v), Corsair TwinX2048-3500LL @2.5-3-2-6-1T (2.75V), MSI K8N Neo4, Tagan 420W PSU, Windows XP Pro SP2.

  2. #2
    V3 Xeons coming soon!
    Join Date
    Nov 2005
    Location
    New Hampshire
    Posts
    36,363
    Thanks meshmesh for doing this and oh..bump!
    Crunch with us, the XS WCG team
    The XS WCG team needs your support.
    A good project with good goals.
    Come join us,get that warm fuzzy feeling that you've done something good for mankind.

    Quote Originally Posted by Frisch View Post
    If you have lost faith in humanity, then hold a newborn in your hands.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •