vtk_tasker

vtk_tasker_attach_to_agent

Usage         
vtk_tasker_attach_to_agent taskerId agentId

Description   
This procedure is used to attach a BPS tasker to a BPS agent 

Example 
vtk_tasker_attach_to_agent 00358286 00358287 ok

Returns       
"ok" or an error message

vtk_tasker_config

Usage         vtk_tasker_config taskerIdOrName variable value

Description

WHERE: variable can be one of:
allowcoredump BOOLEAN, mostly used for debugging serious crashes (not gonna happen, anyways)
cpus INTEGER, sets the number of cpus(cores)
capacity INTEGER, sets the number of slots (but not more than the max capacity of the tasker)
changenameonreconnect BOOLEAN, if true then the tasker will add an _r to its name in the case of reconnection to its vovserver; the default is false
cleanupchildprocesses BOOLEAN, if true kill all child processes when a job exits, requires taskers to support cgroups; default is false (Linux only)
close STRING, closes the tasker from accepting jobs, displaying the accompanying STRING until opened
coeff REAL in (0.01,100.0), that is the coefficient for the tasker (it is used to divide the raw power to compute the effective power)
debugjobcontrol BOOLEAN, used for debugging the job control activities (output in the tasker logs)
debugnuma BOOLEAN, used for debugging the NUMA affinity of jobs (output in the tasker log)
efftotram INTEGER, expresses the effective total RAM of a tasker, in MB
expirelogs BOOLEAN, simulate the expiration of the tasker logs, as it would normally happen at midnight; new logs are immediately created
rotatelog BOOLEAN, recreate a log file and directory only when missing.
liverecorder COMMAND in (on off save), for activating LiveRecorder by UndoDB
liverecorder.logsize INTEGER, to specify the max value of the log size in bytes
maxload REAL, the maximum load acceptable for the tasker (if the effective load passes this threshold, the tasker stop accepting jobs)
maxwaitnostart TIMESPEC, the maximum wait we allow for jobs that have trouble starting (meaning the fork()/exec() takes an enormous time); the default is 60 seconds
maxwaittoreconnect TIMESPEC, the maximum wait after losing connection to server before attempting reconnection again
message STRING, change the message for the tasker
message,sys STRING, change the system message for the tasker (same as 'message')
message,usr STRING, change the user message for the tasker
mindisk INTEGER, specify the minimum amount of disk space in MB or in percentage (0%-99%, for example, 10%) in /tmp for the tasker to be active
minramfree INTEGER, specify the minimum amount in MB of free RAM for the tasker to be active
name STRING, change the name of the tasker; illegal or duplicate names are silently discarded
numabindtosocket BOOLEAN, if true (default) the NUMA code allows the process to roam all cores in the same physical socket, else it binds the process to very specific cores
open STRING, opens a closed tasker so that it will accept jobs, displaying the accompanying STRING until overwritten by another message
printstatus IGNORED, causes the tasker to print its own status information to the log file
ramsentry BOOLEAN, used to activate the RAM sentry functionality, i.e. the functionality that suspends small jobs to allow large jobs to finish
rawpower INTEGER, change the raw power of the tasker
refresh IGNORED, discard all caches in tasker, including environments and user credentials
resources STRING, set the resources for this tasker
retrychdir INTEGER, sets the number of times chdir() is to be tried (assumes the file system is so stressed that even chdir() has trouble)
retrychdirbackoff REAL, for retry chdir() the interval between tries increases according to this parameter
retrychdirsleep INTEGER, sleep time between the first and second attempt at chdir()
setenv VAR=VALUE, define or modify an environment variable in the top-level vovtasker
shutdowncancel IGNORED, used to rescue taskers that have been stopped (with STOP) but have not yet exited because they are still running jobs
unsetenv VAR, unset the named environment variable
update INTEGER, set the update interval for the tasker, typically 60 seconds
verbose INTEGER in (0,4), set the verbosity level of the tasker
waitafterjc INTEGER, seconds to wait after doing a job control action, except for EXT (before doing another one, the tasker never stops)
waitafterjcext INTEGER, seconds to wait after doing a EXT job control

and value can take different formats depending on the variable.

Examples:
vtk_tasker_config 00123456 maxload 3.3
vtk_tasker_config 00123456 capacity 1




vtk_tasker_create

Usage         
vtk_tasker_create array

Description
The array contains the information of the tasker create, including:
 
  host
  name
  group
  taskertype (one of "normal", "BPS_tasker", "BPS_agent")
  capacity
  numjobs
  power
  timeleft
  resources
  status
  curload
  effload
  maxload
  message,usr
  message,sys
 
The following are for BPS tasker only:
 
  status
     0:  OK-1: Warning-2: Unknown
 
  time left
  number of running jobs
  power
 
 
Example:
 
set tasker(host)      alpaca
set tasker(capacity)  2
set tasker(resources) "finfarm RAM/100"
vtk_tasker_create tasker
00358286    

Returns       
The tasker Id of the tasker just created, or an error messgae.

vtk_tasker_define

Usage         vtk_tasker_define 

Description   Used in taskers.tcl file. Please refer to the documentation.

vtk_tasker_delete

Usage         
vtk_tasker_delete taskerId

Description   
This procedure is used to delete a tasker object from server. Other names for this procedure are vtk_tasker_del and vtk_tasker_forget.

Example:
vtk_tasker_delete 00358286
ok


Returns       
"ok" or an error message

vtk_tasker_find

Usage         
vtk_tasker_find name

Description   

Example
vtk_tasker_find alpaca
00358285
vtk_tasker_find tiger
0


Returns       
The tasker Id of the tasker with the specified name, or 0 not found.

vtk_tasker_get

Usage         
vtk_tasker_get taskerId array

Description   
This procedure fills the array with the tasker properties. 

Example:
vtk_tasker_get 00358294 tasker
ok
parray tasker
tasker(capacity)         = 1
tasker(cpus)             = 1
tasker(curload)          = 0.16
tasker(effload)          = 0.16
tasker(host)             = alpaca
tasker(lastupdate)       = 1159547044
tasker(maxload)          = 1.50
tasker(message)          =
tasker(name)             = alpaca
tasker(numjobs)          = 0
tasker(power)            = 143678
tasker(resources)        = alpaca:0.0 RAM/753 linux i686 unix
tasker(resources,spec)   = alpaca:0.0 @RAM@ @VOVARCH@
tasker(taskertype)       = normal
tasker(status)           = READY
tasker(timeleft)         = Unlim.
tasker(persistent)       = 0


Returns       
"ok" or an error message

vtk_tasker_get_colormap

No information is available for this procedure.

vtk_tasker_get_jobs

Usage         
vtk_tasker_get_jobs taskerid

Description   
Find the jobs currently running on a tasker.

Returns       
A list of ids

vtk_tasker_modify

Usage         
vtk_tasker_modify taskerId array

Description   
This procedure modifies the tasker indentified by taskerId with the properties set in the array The usage of the array is the same as in vtk_tasker_create. 

Example:
set tasker(host)      alpaca
set tasker(capacity)  2
set tasker(resources) "finfarm RAM/100"
vtk_tasker_modify 00382732 tasker
ok


Returns       
"ok" or an error message

vtk_tasker_nc

Usage         
vtk_tasker_nc ncserver OPTIONS

Description   
Define an indirect tasker used to sends jobs to an Accelerator queue.
This procedure is useful only in a taskers.tcl file.
The parameter "ncserver" can be the string "automatic" to
automatically discover
the default Accelerator, or it could be an instance of Accelerator
specified in the format of "nc_name@host[:port]",
where "port" is optional but recommended.
 
 
 Option:

 -single-user 
 		If 1, use the single-user script to interface to NC
   		Default: 0, meaning that the binary multi-user interface is used.

 
  -name agent_name	
 		The name of this indirect tasker (only letters, numbers, _, and - are allowed)
   		Default: NC
 
 
-resources res_list   
		The resources to provide to the jobs routed through this indirect tasker
   		Default: The resource 'NC'.
 
 
-autokillmethod  direct|ncstop|vovstop
   		Specify autokill method for this tasker.
   		Default: direct
 
 
 -capacity capacity
 		The number of slots in this tasker.  This is the maximum number of
       	jobs transfered to the NC queue at the same time. Typically in the order
       	of a few hundreds, but you can use thousands.
   		Default: 200
 
 
-group group_name
		The fairshare group that will be assigned to the jobs that are dispatched by this
       	indirect tasker
		Default: "-", which is to ignore this option, meaning no change to the group for jobs
 
 
-health health_specs
	   Define which health checks should be performed by the tasker before declaring itself ready. The health specs
       consists of a string with the characters in "pdwuPDWU", where
       the lower case implies disabling and
       the upper case implies enabling a particular check.
       Default: "pDwu", which enables only the disk space check.
 
 
-addjobres res_list
	   The resources that will be added to the jobs when dispatched by
       this indirect tasker
   	   Default: "-", which is to ignore this option, meaning no addition to job resources
 
 
-resfilter res_list
	    Filter on the tasker resources to determine whether to show a NC
        tasker as BPS tasker
   	    Default: "-", which is to ignore this option, meaning no filtering, show all taskers in NC
   
 
 
 -showFarmTaskers
 		If present, show farm vovtaskers, in addition to dispatcher
   		vovtasker.  Recommended only for small to medium-size farms.
   		Default: Just show the dispatcher.
 
 
-ncconfig path-to-file
		Use the given ncconfig.tcl interface file to control the
   		resources offered by the dispatcher vovtasker.  Use only one
   		of -resources and -ncconfig.  If both are given, -resources wins.
   		Default: "-", which is to ignore this option
 
 
Examples:
 
vtk_tasker_nc automatic
vtk_tasker_nc vnc@comet:6271
vtk_tasker_nc automatic -showFarmTaskers
 
 
 
vtk_tasker_nc vnc@comet \;
  -resources "License:*" \       
  -resfilter "linux License:hspice" \
  -addjobres "linux RAM/100" \
  -group production \
  -name Q_SPICE

vtk_tasker_reserve

Usage         
vtk_tasker_reserve taskerId [OPTIONS]

Description   
Reserve a tasker. Without any option, this procedure clears the reservation 
of this tasker. 

Options
-user 		username 			Reserve for specified user or users 
-group 		groupname 			Reserve for specified fairshare group or groups 
-osgroup 	groupname 			Reserve for specified Unix (or OS) group or groups 
-jobclass 	jobclass 			Reserve for specified jobclass or jobclasses 
-jobproj 	jobproj 			Reserve for specified jobproj 
-bucketid 	bucketid_list 		Reserve for specified bucket id or ids 
-id 		id_list 			Reserve for specified id or ids 
-duration 	timespec 			Reserve this tasker for specified duration. forever is an accepted value. 
-start 		timespec 			Set reservation start time 
-end 		timespec 			Set reservation end time 

Examples: 
vtk_tasker_reserve 230 
ok 
vtk_tasker_reserve 230 -user john -duration 3h 
ok 
vtk_tasker_reserve 230 -user john,mary -group alpha -start 1049827481 -duration 2w

Returns       
"ok" or an error message

vtk_tasker_set_defaults

Usage         
vtk_tasker_set_defaults 

Description   
Define default values for the options used by vtk_tasker_define. 
Used in taskers.tcl file. Please refer to documentation.

vtk_tasker_set_timeleft

Usage
vtk_tasker_set_timeleft time_left

Description
This procedure is used only from within a vovtasker.
The argument specifies the amount of time left for the tasker,
so that the server can decide to send jobs whose expected duration
does not exceed the time left.
If the time_left is "UNLIMITED", there is no limit on the time.
If the time_left is 0, the tasker is effectively suspended.

Where time_left is a time specification or the string "UNLIMITED".

Returns  
Nothing.

vtk_tasker_vnc

Obsolete

Usage         
vtk_tasker_vnc resources name

Description   
Obsolete procedure. Use vtk_tasker_nc instead.