Thread 'Runtime options'

Message boards : BOINC Manager : Runtime options
Message board moderation

To post messages, you must log in.

Previous · 1 · 2

AuthorMessage
Rom Walton
Project developer
Avatar

Send message
Joined: 26 Aug 05
Posts: 164
Message 31457 - Posted: 9 Mar 2010, 1:10:25 UTC - in response to Message 31456.  

Ok, my first problem was caused by the path being wrong - fixed that and changed the SET MAXCPUUSAGE=80.0 - still does not work. The file changes but not the % CPU

Haven't batch files in a very long time - forgot %x is variables.

If I use the command line parameter now do I add the % ?

I run the batch file with:


D:\SETICPU.bat



D:\SETICPU.bat 80.0




----- Rom
BOINC Development Team, U.C. Berkeley
My Blog
ID: 31457 · Report as offensive
Michael Noble

Send message
Joined: 8 Mar 10
Posts: 17
United States
Message 31459 - Posted: 9 Mar 2010, 2:17:04 UTC - in response to Message 31457.  

Sorry to keep bothering you - my next problem is the batch is not finding boinccmd.exe in C:\Program Files\Boinc - does not recognize C:\Program Files

If I put boinccmd.exe in the root directory the batch file works.

Using Windows 7 64 bit
ID: 31459 · Report as offensive
Rom Walton
Project developer
Avatar

Send message
Joined: 26 Aug 05
Posts: 164
Message 31461 - Posted: 9 Mar 2010, 4:09:14 UTC - in response to Message 31459.  

Then change:
SET PATH=%PATH%;%ProgramFiles%\BOINC


To:
SET PATH=%PATH%;"%ProgramFiles%\BOINC"

----- Rom
BOINC Development Team, U.C. Berkeley
My Blog
ID: 31461 · Report as offensive
Les Bayliss
Help desk expert

Send message
Joined: 25 Nov 05
Posts: 1654
Australia
Message 31462 - Posted: 9 Mar 2010, 4:14:52 UTC - in response to Message 31459.  
Last modified: 9 Mar 2010, 4:15:38 UTC

It's the space in the path name, and is due to a Windows 'feature' which is mentioned in Microsoft's own documentation (CreateProcess Function). Basically, the program name needs to be a quoted string.

From the Windows Developer Center:
CreateProcess Function

edit
As per Rom's latest post. :)
ID: 31462 · Report as offensive
Michael Noble

Send message
Joined: 8 Mar 10
Posts: 17
United States
Message 31483 - Posted: 9 Mar 2010, 15:30:43 UTC - in response to Message 31462.  
Last modified: 9 Mar 2010, 15:31:25 UTC

This is what I currently am running as the batch file
--------------------------------------------------------

@echo off
rem
rem Change the maximum amount of CPU BOINC is allowed to use.
rem

SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

rem Add BOINC's executables to the path for this script
SET PATH=%PATH%;"%ProgramFiles%\BOINC"

rem Determine the global prefs override file name and location
SET GLOBALPREFS=%ProgramData%\BOINC\global_prefs_override.xml

rem What Max CPU should BOINC be allowed to use?
SET MAXCPUUSAGE=%1

rem Modify the override file
echo ^<global_preferences^ > %GLOBALPREFS%
echo ^<cpu_usage_limit^>%MAXCPUUSAGE%^</cpu_usage_limit^> >> %GLOBALPREFS%
echo ^</global_preferences^> >> %GLOBALPREFS%

boinccmd --read_global_prefs_override

--------------------------------------------------------

with the following command line

C:\Program Files\BOINC>SETICPU.bat 15.0

Everytime I run it the % CPU Time changes to 95%

The global_prefs_override.xml changes to:

<global_preferences
<cpu_usage_limit>15.0</cpu_usage_limit>
</global_preferences>

Apparently boinccmd is not sending the proper xml and setting 95% as the default value.
ID: 31483 · Report as offensive
ProfileGundolf Jahn

Send message
Joined: 20 Dec 07
Posts: 1069
Germany
Message 31485 - Posted: 9 Mar 2010, 16:04:37 UTC - in response to Message 31483.  

echo ^<global_preferences^ > %GLOBALPREFS%

Here is an additional blank between '^' and '>', which results in a missing angle bracket ('>') here:
<global_preferences
<cpu_usage_limit>15.0</cpu_usage_limit>
</global_preferences>

Gruß,
Gundolf
Computer sind nicht alles im Leben. (Kleiner Scherz)
ID: 31485 · Report as offensive
Michael Noble

Send message
Joined: 8 Mar 10
Posts: 17
United States
Message 31491 - Posted: 9 Mar 2010, 16:55:28 UTC - in response to Message 31485.  
Last modified: 9 Mar 2010, 16:56:31 UTC

In order to get it to work I took out the space and had to add additional ">"

Without the additional ">" the first line was missing in the resulting xml file and being added to the existing xml file as follows:

... Existing xml ...
<cpu_usage_limit>5.0</cpu_usage_limit>
</global_preferences>



With the additional ">"

the proper xml is writen:

<global_preferences>
<cpu_usage_limit>5.0</cpu_usage_limit>
</global_preferences>


and the batch file now works properly - this is the working batch file:

@echo off
rem
rem Change the maximum amount of CPU BOINC is allowed to use.
rem

SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

rem Add BOINC's executables to the path for this script
SET PATH=%PATH%;"%ProgramFiles%\BOINC"

rem Determine the global prefs override file name and location
SET GLOBALPREFS=%ProgramData%\BOINC\global_prefs_override.xml

rem What Max CPU should BOINC be allowed to use?
SET MAXCPUUSAGE=%1

rem Modify the override file
echo ^<global_preferences^>> %GLOBALPREFS%
echo ^<cpu_usage_limit^>%MAXCPUUSAGE%^</cpu_usage_limit^> >> %GLOBALPREFS%
echo ^</global_preferences^> >> %GLOBALPREFS%

boinccmd --read_global_prefs_override



Thank you to everyone for all your help.
ID: 31491 · Report as offensive
Michael Noble

Send message
Joined: 8 Mar 10
Posts: 17
United States
Message 31492 - Posted: 9 Mar 2010, 17:03:35 UTC - in response to Message 31491.  
Last modified: 9 Mar 2010, 17:31:47 UTC

I still feel Boinc Manager should be enhanced to allow time scheduled settings:

Boinc Manager should have the ability to make changes based on a scheduled times (Similar to the Day of the Week Override):

On Monday thru Friday at 8:00AM change the % CPU Time to 10% // At 5:00PM change the % CPU Time to 70%. On Saturday & Sunday don't change the rate


Similar to this:


Not only for % CPU time, but for all variables.
ID: 31492 · Report as offensive
Michael Noble

Send message
Joined: 8 Mar 10
Posts: 17
United States
Message 31495 - Posted: 9 Mar 2010, 19:02:11 UTC - in response to Message 31491.  
Last modified: 9 Mar 2010, 19:18:40 UTC

BTW

The working batch file must be in the C:\Program Files\Boinc directory.

The working batch file is for Windows 7 (and probably Vista)

I schedule the throttle up and throttle down at specified times thru the Windows Task Scheduler.
ID: 31495 · Report as offensive
Previous · 1 · 2

Message boards : BOINC Manager : Runtime options

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.