vtk_resourcemap
vtk_resourcemap_add_lm_handles
Usage:
vtk_resourcemap_add_lm_handles array
Description:
Used by vovresourced and vovlad. Not intended for end user. The array contains the information of the flexlm handles (jobs) to be added, including:
* array(resource) -- The name of the resourcemap
* array(count) -- The number of handles to be described
* array(%d,host)
* array(%d,user)
* array(%d,pid)
* array(%d,licenseHost)
* array(%d,licensePort)
* array(%d,lastCheckOut)
* array(%d,handle)
* array(%d,tokens)
* array(%d,queued)
Returns:
"OK" if added successfully, or an error message.
vtk_resourcemap_add_nc_jobs
Usage:
vtk_resourcemap_add_nc_jobs array
Description:
Used by vovresourced and possibly vovlad. Not intended for end user. The array contains the information of the flexlm handles (jobs) to be added, including:
* array(resource) -- The name of the resourcemap
* array(count) -- The number of handles to be described
* array(%d,project) --
* array(%d,jobStatus) --
* array(%d,jobId) --
* array(%d,pidList) -- List of PIDs associated with this job
* array(%d,host) -- Execution host of job
* array(%d,user) -- User of job
* array(%d,startDate) -- Start timestamp of job
* array(%d,grabbed) -- Number of tokens grabbed
* array(%d,revoked) -- Number of tokens revoked by preemption
Returns:
"OK" if added successfully, or an error message.
vtk_resourcemap_change_grab
Usage:
vtk_resourcemap_change_grab jobId resourceName quantity
Description:
Used only by ADMIN or by the OWNER of the job. If quantity is positive, the resource is forcefully grabbed. If the quantity is negative, then we see if a resource can be released.
If the quantity is zero, the whole routine is still executed but an error will be generated.
Returns:
Nothing.
vtk_resourcemap_clear_reservations
Usage:
vtk_resourcemap_clear_reservations resource_name
Description:
Example:
vtk_resourcemap_clear_reservations License:abc
Returns:
Nothing
vtk_resourcemap_delete
Usage:
vtk_resourcemap_delete resourceName
Description:
Delete the given resource map associated with the given resource.
This procedure operates by name. Please use vtk_resourcemap_forget to
delete a resource by id.
Example:
vtk_resourcemap_delete Queue:regression
Returns:
Nothing
vtk_resourcemap_forget
Usage:
vtk_resourcemap_forget resourceId
Description:
Delete the resource map identified by ID resourceId. If the resource map is assigned to any currently job, the deletion will be deferred until any such jobs complete.
Note:
The vtk_resourcemap_delete function performs the same deletion on a resource map identified by name.
Example:
vtk_resourcemap_forget 000001053
Returns:
Nothing
vtk_resourcemap_get
Usage:
vtk_resourcemap_get nameOrId array
Description:
This procedure retrieves information about a resource map. The procedure works more like vtk_resourcemap_find, in the sense that it errors out if the resource is not found, and it
returns the VovId of the resourcemap if the resource is found. To get all matches info, use the name and not the vovid.
Example:
vtk_resourcemap_get Priority:normal resInfo
parray resInfo
resInfo(available) = 4
resInfo(expiration) = 2147483647
resInfo(found) = 1
resInfo(inuse) = 0
resInfo(lastevent) = 1049501790
resInfo(lastuse) = 1049501785
resInfo(lefttoexpire) = 1097981857
resInfo(map) =
resInfo(max) = 4
resInfo(name) = Priority:normal
resInfo(notcompathistory) =
resInfo(others) = 0
resInfo(owner) = casotto@bison
resInfo(reserved) = 0
resInfo(utilization) = 18.3783
...and possibly other fields...
vtk_resourcemap_list
Usage:
vtk_resourcemap_list rx
Description:
Return the list of resources that match the given regexp.
vtk_resourcemap_reserve
Usage:
vtk_resourcemap_reserve resource_name TYPE who howmany duration explanation
Description:
Where TYPE is one of USER,GROUP,JOBCLASS,JOBPROJ,JOBID
'duration' may optionally be forever to indicate an expiration that never expires.
Examples:
vtk_resourcemap_reserve License:abc USER john 1 3m ""
vtk_resourcemap_reserve License:abc GROUP /time/users 3 1h ""
vtk_resourcemap_reserve License:abc JOBCLASS hsim 3 1h ""
vtk_resourcemap_reserve License:abc JOBPROJ ChipA 20 3w ""
vtk_resourcemap_reserve License:abc JOBID 00012345 1 2h "Preemption"
Returns:
Nothing
vtk_resourcemap_return
Usage:
vtk_resourcemap_return jobId resourceName [resumer_JobId]
Description:
Return all the resources (stolen with vtk_resourcemap_steal) to the job from the resumer job if it is specified. If the job has stolen resource, then all stolen tokens are returned to the job. If the job has no stolen resources, nothing happens. This procedure is normally used only by the preemption daemon upon resumption of a suspended job.
Examples:
vtk_resourcemap_return 0123456 License:sim
vtk_resourcemap_return 0123456 License:sim 0234567
Returns:
Nothing.
See Also
vtk_resourcemap_set
Usage:
vtk_resourcemap_set name [OPTIONS]
Description:
This procedure is used by an ADMIN user to set a resource map. It is normally used by vovresourced in the resources.tcl file in the server configuration directory. It is also possibly used by vovlad.tcl. The argument name is the name of the resource map. which is of the form 'type:name' or just 'name'.
Options:
* -total N Specify the total number available for the resources. The argument N must be non-negative can also be "UNLIMITED" (case-insensitive)
* -max N Same as -total. Please prefer -total
* -lmfeature <featureSpec> The specification for the feature (from LicenseMonitor) associated with the resource map. The format for featureSpec is "FEATURE_NAME PORT@HOST:DAEMON_NAME". Example: "hsim 6500@lxlic02:snspd:
* -map <resexpr> A resources expression to be used if the resource map is selected during scheduling of a job. The default is the empty string, meaning no map.
* -expire <TimeSpec> After the specified TimeSpec, the resource map expires and is deleted if it is not used. After expiration, another agent can take control of the resource map. The default value is "never" or "", meaning no expiration.
* -owner <owner> This is the name of the owner of the resource map. Typically, this is either "vovresourced:USER@HOST:PORT" or "vovlad:USER@HOST:PORT". This is used mostly for documenting who is controlling the resource map.
* -log, -nolog Tell the system to not create a log entry every time the resource map changes.
* -ooq, -noooq Tell the system to not compute the "out-of-queue" handles for the resource map. This only applies for resource maps with rank less than 20.
* -match, -nomatch Tell the system to not compute any matches for this resource.
* -recent, -norecent When computing the "out-of-queue" handles, include all jobs that have recently completed in the matching. This is useful for features that are used for short periods of time
* -rank <N> Used to distinguish different controlling agents for the same resource map. Normally the rank for vovresourced is 3 and the rank for vovlad is 20. If multiple agents compete to control the same resource, the agent with higher rank prevails. This is used if multiple redundant vovlad daemons are in use. If the rank is 20 or greater, the out-of-queue computation is also disabled.
* -async <0|1> Control whether the communication with vovserver is asynchronous. If the value is 1, then the calling agent does not wait for an answer from the vovserver. By default, the protocol is synchronous. The asynchronous mode is useful to speedup the setting of hundreds of resources. This is now (2011.09) superceded by the more efficient "vtk_multiqueue_set" procedure.
* -clearjobs <0|1> Clear all matching information for the resource map.
* -updatelimits Expand @KEYWORD@ to find matching resources to update with new total.
* -limitexceptions <LIST> List of "name total" pairs to be processed differently for limit keyword expansion.
* -local, -nolocal Specifies that this simple limit resource is to be managed locally in a vovwxd environment
* -preempt <METHOD> (Obsolete: do not use)
Old Syntax:
The argument max is either an integer or the string "UNLIMITED". The argument map is a resource expression, i.e. it could be an empty string, the name of another resource, a list of resources, or a combination of resources containing the OR '|' symbol.
Examples (current syntax):
vtk_resourcemap_set N5 -total 5 -nolog
vtk_resourcemap_set Lic:a -lmfeature a -total $N -expire 2m
vtk_resourcemap_set Lic:a -lmfeature a -total $N -expire 2m -rank 5
vtk_resourcemap_set Lic:a -lmfeature a -total $N -expire 2m -owner la -rank 5
vtk_resourcemap_set Lic:a -lmfeature a -total $N -expire 2m -owner rd -rank 3
vtk_resourcemap_set Lic:a_@USER@ -total 4 -updatelimits -limitexceptions { Lic:a_joe 2 Lic:a_bob 6 }
Examples: (old syntax):
vtk_resourcemap_set Priority:high UNLIMITED
vtk_resourcemap_set Queue:regression 2
vtk_resourcemap_set Queue:regression 2 "win10"
vtk_resourcemap_set Queue:regression 2 "win10 | linux"
vtk_resourcemap_set Queue:regression 2 "win10 | linux" 0 2h
vtk_resourcemap_set_in_bulk
Obsolete
Usage:
vtk_resourcemap_set_in_bulk
Description:
Obsolete procedure, that was meant to be used by MultiQueue. Superceded by vov_multiqueue_set.
vtk_resourcemap_set_limit
Usage:
vtk_resourcemap_set_limit name value args
Description:
This procedure will set all limit resources that are derived from the one mentioned as first argument, namely those where the @USER@ string has been replaced by a real user name.
Options:
* -special <SPECIAL CASE> -- Specify exceptions to the limit
for different users. The SPECIAL_CASE argument
is a Tcl list consisting of an even number of elements
of the form "name number" (see example below).
The number cannot be "UNLIMITED". It has to be a non-negative integer.
Example:
vtk_resourcemap_set_limit Limit:q_hsim_@USER@ 4
vtk_resourcemap_set_limit Limit:q_hsim_@USER@ 4 -special {
Limit:q_hsim_john 3
Limit:q_hsim_mary 5
}
vtk_resourcemap_set_limit_using_client
Usage:
vtk_resourcemap_set_limit_using_client name value args
Description:
This procedure will set all limit resources that are derived from the one mentioned as first argument, namely those where the @USER@ string has been replaced by a real user name.
Options:
* -ooq <LicenseResource> -- A license resource to monitor to detect out-of-queue uses, which is used to enforce a combined in-queue and out-of-queue limit. This option can be repeated.
* --special <SPECIAL_CASE> -- Specify exceptions to the limit for different users. The SPECIAL_CASE argument is a Tcl list consisting of an even number of elements
of the form "name number" (see example below). The number cannot be "UNLIMITED". It has to be a non-negative integer.
Example:
vtk_resourcemap_set_limit Limit:q_hsim_@USER@ 4
vtk_resourcemap_set_limit Limit:q_hsim_@USER@ 4 -special {
Limit:q_hsim_john 3
Limit:q_hsim_mary 5
}
vtk_resourcemap_set_limit Limit:q_hsim_@USER@ 4 -ooq License:hsim
vtk_resourcemap_set_revocation_delay
No information is available.
vtk_resourcemap_steal
Usage:
vtk_resourcemap_steal jobToStealResourcesId resourceName
Description:
This procedure is used in the context of job preemption. It is used to steal the specified resource from the job. Only ADMIN can execute this procedure. The resource is eliminated from the field GRABBEDRESOURCES and appended to the field STOLENRESOURCES.
Examples:
vtk_resourcemap_steal 0123456 License:sim#1
vtk_resourcemap_steal 0123456 License:sim#3
Returns:
Nothing.
See Also