eFMer - BoincTasks and TThrottle forum

BoincTasks For Window, Mac & Linux => FAQ => Topic started by: fred on July 18, 2010, 04:32:03 PM

Title: Rules
Post by: fred on July 18, 2010, 04:32:03 PM
Some examples

If project X with application Y is active for more than 3 hours an event is triggered.
If project X with application Y generates 10 errors within 10 minutes an event is triggered.
If any task has a progress of less than 0.01% within 10 minutes an event is triggered.
If project X with application Y runs below 56C for xx time it will trigger an event.
If 10 errors appear within xx time an event is triggered.
If computer X lost the connection for xx time an event is triggered. If the computer is reconnected within the xx time the rules isn't triggered.
If project Y on computer X has more work than 1 day set "No more work".
If project Y on computer X has less work than 12 hours set "Allow new work".

(http://www.efmer.eu/boinc/boinc_tasks/images/rules/rule_editor.JPG)

It is possible to add a rule from the Tasks view. Click on the task you want add a rule for and press the right mouse key.
Select Add rule
This fills in all the names relevant for this task.

Rule name: Must be unique name that describes the rule.
Computer: Optional name of the computer, leave this empty if the rule applies to all computers.
Project: Optional name of the project, leave this empty if the rule applies to all projects.
Application: Optional name of the application, leave this empty if the rule applies to all applications. As of V 1.28, wildcard may be used like t?s? = test, test* = test1whatever, test* = test2

* the above fields may hold a part of the name: Like 3.02, instead of the whole name.

Type:

Elapsed Time The time the task has been running since the first start.
Cpu% The percentage between wall clock the actual run time of the CPU.
Progress % The progress percentage of the task.
Time left The time the task has left.
Progress / min % As the Progress % but now the progress that has been made in one minute.
Use The number of CPU and GPU % that are planned for this task. E.g. 0.04 Cpu + 1 GPU or 0.025Cpu.
Temperature The CPU or GPU temperature. This rules must have a valid computer name.
Wallclock In a time interval. This rules must have a valid computer name.
Deadline Deadline =  (Deadline time - System time) - Time Left. So a deadline that is 1 day from now and time left of 2d gives -1d, that means it will go 1 day beyond the deadline. < -14d,00:00:00 triggers if 14 days or more past the deadline. < 4d,00:00:00, triggers if 4 days or less, before the deadline.
Time Left Project Cpu and Gpu time left on a specific project.

The 3 rules have to be ALL valid, at the same time for the event to trigger.
You may leave unused rules empty.

Time:

The time the rule has to be valid to produce an event. Blank means 0 seconds.
Don't use a short time, as this may result in a lot of false positives.

Event:

A rule may have one internal an one external event at the same time.
E.g. Suspend a task and start an external program.

A rule may have 0 events, so it only shows a color.

Run program Runs an external program or batch file.
The field below must hold the full name of the program. E.g. beep.bat
The folder is the default BoincTasks folder: C:\Users\user name\AppData\Roaming\eFMer\BoincTasks\

So beep.bat is the same as C:\Users\user name\AppData\Roaming\eFMer\BoincTasks\beep.bat

An ENTER (key) may be used to keep the text in the box.

You may add parameters: E.g. beep.bat, parameter
The "," is used to separate the program name from the parameter.

Suspend project

Suspends the project of the task that triggered the rule.

Suspend task

Suspends the task. When more tasks are triggered at the same time, only one is suspended. The other tasks are suspended, one every following second.

No more work

Sets the project to "No more work". E.g. Deadline < 2d,00:00:00 No more work.

Allow new work

Sets the project to "Allow new work". E.g. Deadline > 2d,00:00:00 Allow new work.

Snooze

Snoozes the entire computer for a time set in the right corner window, like 30:00. (30 minutes).
To allow the computer to run again, set a time of 00:00 (0 second), this will remove the snooze condition.

"show logging" check

When checked, BoincTasks will show the rules logging window, when an event is triggered.

Resetting a rule:

Rules are reset when you:

Edit any rule.
A tasks is no longer running.


Some inside information:

The rules are checked, using the history information.
This means, the rules are checked, at the history interval time.
CPU % and Progress / min are measured, over a period of 2 History cycles.

Progress / min:

Cycle 2: Progress 61   1 Progress / min
Cycle 4: Progress 64   3 Progress / min
Cycle 6: Progress 66   2 Progress / min
Cycle 8: Progress 66   0 Progress / min
Cycle 10: Progress 66   0 Progress / min

Rules can be used on a specific computer, or on all computers, unless stated otherwise.
Leaving a rule field empty, is the same as a all.
So a blank computer = all computers, a blank project = all projects, a blank program = all programs.

The rules below are specials.

Status rules:

Status rules can trigger on a number of tasks in a specific status.

The syntax for the value is: status, count 3,4
A rule can only have status types, all others types will be ignored.
A status rule must have a valid computer and project name. An Application name will be ignored.

Examples:

A rule Status > 3,4 Time 10:00 is active when there are 4 tasks in the error status in the last 10 minutes.
A rule Status = 5,0 Time 60:00 is active when there where no completed tasks the last 60 minutes.


Status codes:

3 Computation error
4 Uploading
5 Ready
6 Aborted


Wall clock rules:

As of V 1.52.


Wallclock time rules can:
Suspend and resume work fetching.
Suspend and resume specific projects.
Snooze and resume CPU and or GPU on a computer.

Select "Wallclock" in the Type column.

Click on the schedule and modify it.

The shift key lets you select a range.
Together with the Ctrl key a range can be deselected.

Connection rules:

You can setup a rule, that goes active, when a connection is lost or never made, after xx seconds.
The Project, Application and Value fields aren't uses.
A blank computer name means all computers.
=<> A lost connection
<> No connection

Connection =<> 00:05:00 (Type, Operator, Time) When a connection is lost for more than 5 minutes the rule triggers.

The only Event that can be used is "Run program" or "Show" logging.

Time left on a project rules:

Make sure you set a valid computer and a project, the application name isn't used.

E.g.
Time Left Project > 1d,00:00:00 will trigger if the project has more than 1 day work. Typically "No more work" is used as Event.
Time Left Project < 0d,12:00:00 will trigger if the project has less than 12 hours work. Typically "Allow new work" is used as Event.

Warning use a time of 2:00 on the  "Allow new work" rule, to make sure it isn't triggered at start up, when the time left is 0, for a short while.

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

The rules are stored in C:\Users\username\AppData\Roaming\eFMer\BoincTasks
File: rules.xml

itime = trigger time in seconds
ivalue0 if time than in seconds
Title: Re: Rule: Wallclock
Post by: jjwhalen on July 19, 2010, 04:17:23 PM
NOTE:  Remember that if you suspend one project while work download is enabled on all others, the BOINC client will tend to download too much work - especially with a high work buffer (Days Work) setting.  The client doesn't know when the suspended tasks will be available again, and "works around" them to keep the work buffer up.  Thus you may want to set all projects on the computer to "No new tasks" while a Wallclock Rule suspension is active.
Title: Re: Rules
Post by: wertperch on December 26, 2010, 06:32:52 AM
Darn! I was hoping to use the rules to abort one particular kind of application, on a project that does not allow me to choose which to download.

And presumably I have to create a separate rule for each computer? No wildcards?

It sounds like all I do is complain, but honestly, this is a minor niggle in an otherwise great app!

Quote from: fred on July 18, 2010, 04:32:03 PM
Status rules:

A rule must have a valid computer and project name. An Application name will be ignored.

Title: Re: Rules
Post by: fred on December 26, 2010, 10:25:01 AM
Quote from: wertperch on December 26, 2010, 06:32:52 AM
Darn! I was hoping to use the rules to abort one particular kind of application, on a project that does not allow me to choose which to download.

And presumably I have to create a separate rule for each computer? No wildcards?

It sounds like all I do is complain, but honestly, this is a minor niggle in an otherwise great app!
I just tried it, when you leave out the computer name (blank), the rule applies to all computers.
You can check the rule log for all triggered rules.

Maybe I should change blank into *.
Title: Re: Rules
Post by: wertperch on December 26, 2010, 10:32:04 AM
Thanks! That just leaves me to figure out how to make a rule apply to just one application, rather than just a whole project!

Quote from: fred on December 26, 2010, 10:25:01 AM
Quote from: wertperch on December 26, 2010, 06:32:52 AM
Darn! I was hoping to use the rules to abort one particular kind of application, on a project that does not allow me to choose which to download.

And presumably I have to create a separate rule for each computer? No wildcards?

It sounds like all I do is complain, but honestly, this is a minor niggle in an otherwise great app!
I just tried it, when you leave out the computer name (blank), the rule applies to all computers.
You can check the rule log for all triggered rules.

Maybe I should change blank into *.
Title: Re: Rules
Post by: fred on December 26, 2010, 10:44:53 AM
Quote from: wertperch on December 26, 2010, 10:32:04 AM
Thanks! That just leaves me to figure out how to make a rule apply to just one application, rather than just a whole project!
Best select a tasks with the right application in the Tasks view. Select with the right mouse key and choose Add rule from the context menu.
Next remove the computer name & Project name.

Title: Re: Rules
Post by: Art_Brown on November 10, 2011, 08:07:14 PM
If you want to define rules based on the name of an executable program, such as a specific BOINC task, Process Lasso from Bitsum Technologies lets you do that, including defining disallowed processes. I use Process Lasso to assign CPU affinities and priorities to my BOINC tasks, but you might try disallowing the processes (tasks) that you don't want to run. Process Lasso won't stop the BOINC task from being downloaded, but it will stop a task if it matches the rule you create. Rules can include the * wild card, so one rule can be set up that applies to a range of process names. Process Lasso is free for home and educational users at http://www.bitsum.com/
Title: Re: Rules
Post by: paul on November 14, 2011, 07:21:11 PM
Quote from: wertperch on December 26, 2010, 06:32:52 AM
Darn! I was hoping to use the rules to abort one particular kind of application, on a project that does not allow me to choose which to download.

Similar to what I would like to see with Boinctasks. The ability to abort a certain task using a wildcard word in the task name. All the various types of tasks with GPUgrid use the same application, but some types of tasks are problematic with certain cards. Process Lasso is no use with Linux. :(
Thanks for reading  ;D
Title: Re: Rules
Post by: fred on November 15, 2011, 06:47:41 AM
Quote from: stoneageman on November 14, 2011, 07:21:11 PM
Similar to what I would like to see with Boinctasks. The ability to abort a certain task using a wildcard word in the task name. All the various types of tasks with GPUgrid use the same application, but some types of tasks are problematic with certain cards. Process Lasso is no use with Linux. :(
Will do.
Title: Re: Rules
Post by: paul on November 15, 2011, 09:13:59 PM
Thanks Fred. Another donation in the pipeline  ;)
Title: Re: Rules
Post by: Corsair on January 07, 2012, 07:31:54 PM
How to cancel (abort) a task based in rules ??

I want to cancel all task based in one project using only one CPU, is not difficult, but I only could see in the options of tasks the actions:

for the moment I'm using the suspend task option, at least I don't spend time in the option I don't want but I prefer to abort such task instead.
Title: Re: Rules
Post by: fred on January 07, 2012, 11:16:56 PM
Quote from: Corsair on January 07, 2012, 07:31:54 PM
How to cancel (abort) a task based in rules ??
You can't, for now I find it to dangerous to add it.
Title: Re: Rules
Post by: thebestjaspreet on January 20, 2012, 10:54:55 PM
Quote from: Art_Brown on November 10, 2011, 08:07:14 PM
If you want to define rules based on the name of an executable program, such as a specific BOINC task, Process Lasso from Bitsum Technologies lets you do that, including defining disallowed processes. I use Process Lasso to assign CPU affinities and priorities to my BOINC tasks, but you might try disallowing the processes (tasks) that you don't want to run. Process Lasso won't stop the BOINC task from being downloaded, but it will stop a task if it matches the rule you create. Rules can include the * wild card, so one rule can be set up that applies to a range of process names. Process Lasso is free for home and educational users at http://www.bitsum.com/

I will like to clarify that Process Lasso is not free as many of its fatures get disabled after some time. This is very clear on their product page.
http://bitsum.com/prolasso_purchase.php (http://bitsum.com/prolasso_purchase.php)
Also I will like to submitt that the wall clock rule is not working for task but is working for Project i.e.Resume or suspend project but not task.
Title: Re: Rules
Post by: thebestjaspreet on January 28, 2012, 04:58:21 PM
Quote from: fred on July 18, 2010, 04:32:03 PM
Some examples

Examples:

A rule Status > 3,4 Time 10:00 is active when there are 4 tasks in the error status in the last 10 minutes.
A rule Status = 5,0 Time 60:00 is active when there where no completed tasks the last 60 minutes.


Status codes:

3 Computation error
4 Uploading
5 Ready
6 Aborted

Title: Re: Rules
Post by: fred on January 30, 2012, 12:36:09 AM
Quote from: thebestjaspreet on January 28, 2012, 04:58:21 PM
Quote from: fred on July 18, 2010, 04:32:03 PM
Some examples

Examples:

A rule Status > 3,4 Time 10:00 is active when there are 4 tasks in the error status in the last 10 minutes.
A rule Status = 5,0 Time 60:00 is active when there where no completed tasks the last 60 minutes.


Status codes:

3 Computation error
4 Uploading
5 Ready
6 Aborted


Status code 5 is for ready to start or ready to report  ?
Ready to start isn't in the history.
Ready to report.
Title: Re: Rules
Post by: Agni451 on February 22, 2012, 10:02:26 AM
How would I go about creating the following rule(s):

If the temp of a GPU > 80C, suspend the task.  Then once the temp has reached a more normal temp (say 50C), resume the task.

The first part is simple, but how do I do the second part?  Sometime TThrottle can't control the temp anymore (every few hours or so this happens): it puts the GPU use down to 1% "running GPU" but the temps keep climbing, so I manually stop all GPU tasks to let the temps come down.  Then I restart them.  TThrottle has "enable BOINCTasks" checked, and BOINCTasks has "Connect to TThrottle" checked.

One more question: what does the number in the "Throttle" column in BoincTasks indicate?  It doesn't match the % Running GPU in TThrottle.
Title: Re: Rules
Post by: fred on February 22, 2012, 06:12:39 PM
Quote from: Agni451 on February 22, 2012, 10:02:26 AM
How would I go about creating the following rule(s):
The only thing you can do right now is suspend a project and resume it.
Once a task is suspended it's no longer in the history.

The TThrottle column is 100-value in TThrottle, it's the amount of throttling. So 1% running in TThrottle is 99% suspended in BoincTasks.
Title: Re: Rules
Post by: Corsair on June 30, 2014, 09:59:00 PM
I want to make a rule that every 24 hours a BOINC idle computer (this computer is not crunching but has BOINC installed and is the BT server too) will update all its projects that are the same for all computer. could it be done with BT rules??

I've been investigating and I find no way to do it.
Title: Re: Rules
Post by: fred on July 02, 2014, 06:17:13 AM
Quote from: Corsair on June 30, 2014, 09:59:00 PM
I've been investigating and I find no way to do it.
Nop, but BOINC should take care of it eventually.
Title: Re: Rules
Post by: JStateson on July 27, 2015, 06:32:47 AM
"batch" files don't seem to execute, instead they show up in notepad.  ie:  putting "beep.bat" in that command window seems, at least on my win7x64 system, to run "notepad.exe beep.bat" instead.  However, if I use "beep.cmd" then all works fine and the file is executed as if it ended in ".bat".  Not sure what is happening.  I even looked in my antivirus history to see if something was happening there.  I didn't see a bug list for this but I might have missed it.
Title: Re: Rules
Post by: fred on July 27, 2015, 07:25:14 AM
Quote from: BeemerBiker on July 27, 2015, 06:32:47 AM
"batch" files don't seem to execute, instead they show up in notepad.  ie:  putting "beep.bat" in that command window seems, at least on my win7x64 system, to run "notepad.exe beep.bat" instead.  However, if I use "beep.cmd" then all works fine and the file is executed as if it ended in ".bat".  Not sure what is happening.  I even looked in my antivirus history to see if something was happening there.  I didn't see a bug list for this but I might have missed it.
Most likely this has something to do with the default program that opens a certain extension. You probably edited a bat file with notepad and check open with or something.
http://windows.microsoft.com/en-us/windows/change-default-programs#1TC=windows-7 (http://windows.microsoft.com/en-us/windows/change-default-programs#1TC=windows-7)
Title: Re: Rules
Post by: Thinkfast on August 30, 2016, 03:54:01 AM
If I create a rule using Type:Wall-clock Time and I want to suspend a project "ATLAS@home" from [00:00 to 10:00] and [20:00 to 23:59], do I have to create another rule to resume the project from 10:00 to 19:59?

Thanks, Fred
You make managing BOINC, so much easier!
Title: Re: Rules
Post by: fred on August 31, 2016, 03:24:28 PM
Quote from: Thinkfast on August 30, 2016, 03:54:01 AM
If I create a rule using Type:Wall-clock Time and I want to suspend a project "ATLAS@home" from [00:00 to 10:00] and [20:00 to 23:59], do I have to create another rule to resume the project from 10:00 to 19:59?
Good question, I made this part a long long time ago, I think it does resume it again.
You can see what's going on in Show->Rules log
Title: Re: Rules
Post by: Thinkfast on September 01, 2016, 08:49:38 PM
I checked the rules log and it indicates that the project changes state is expected:

Start logging

31 August 2016 - 00:01:11 Rule: ATLAS restritions Active ---- Activated: OK, Project: ATLAS@home, CCE, Suspend project
31 August 2016 - 10:02:07 Rule: ATLAS restritions Deactive ---- Activated: OK, Project: ATLAS@home, CCE, Resume project
31 August 2016 - 20:01:27 Rule: ATLAS restritions Active ---- Activated: OK, Project: ATLAS@home, CCE, Suspend project

Not sure what the rest of these entries mean, except for the last group. Turns out that in the Wall-clock time selection window, the block just before 24:00 was green. So that correlates correctly:

Start logging

31 August 2016 - 21:56:49 Rule(s) ---- Active: 2
31 August 2016 - 21:56:49 Rule: ATLAS restritions Active ---- CCE, ATLAS@home, ,  | Wall-clock Time 
31 August 2016 - 21:56:49 Rule: ATLAS restritions Deactive ---- CCE, ATLAS@home, ,  | Wall-clock Time 
31 August 2016 - 21:56:49 ============================================================================== ----
31 August 2016 - 21:57:49 Rule: ATLAS restritions Active ---- Activated: OK, Project: ATLAS@home, CCE, Suspend project

Start logging


Start logging

31 August 2016 - 22:18:49 Rule(s) ---- Active: 2
31 August 2016 - 22:18:49 Rule: ATLAS restritions Active ---- CCE, ATLAS@home, ,  | Wall-clock Time 
31 August 2016 - 22:18:49 Rule: ATLAS restritions Deactive ---- CCE, ATLAS@home, ,  | Wall-clock Time 
31 August 2016 - 22:18:49 ============================================================================== ----
31 August 2016 - 22:19:49 Rule: ATLAS restritions Active ---- Activated: OK, Project: ATLAS@home, CCE, Suspend project
31 August 2016 - 23:47:50 Rule: ATLAS restritions Deactive ---- Activated: OK, Project: ATLAS@home, CCE, Resume project

So everything looks good. Thanks for pointing me to the rules.log.