Difference between revisions of "Taskman Internals"
(→^%ZTSCH Structure) |
(→Taskman Monitor Counters) |
||
Line 43: | Line 43: | ||
Submanagers run the job directly (no job command). The manager keeps looking for free submanagers and adds submanagers | Submanagers run the job directly (no job command). The manager keeps looking for free submanagers and adds submanagers | ||
− | + | = Taskman Monitor Counters = | |
+ | * Task List | ||
+ | ("SUB") (# number of subs available) | ||
+ | ("TASK") -> Number of running tasks. | ||
+ | |||
+ | * Job List | ||
+ | ("JOB") -> Almost always empty. If increasing, it's a warning sign. Increase triggers submanager launches. |
Revision as of 20:42, 18 August 2015
Taskman components
Routines
- %ZTLOAD (API to create a task)
- Manager
- Sub-manager
- The menu options to use to manipulate Taskman
Globals
- %ZTSCH (the tasks "index" plus control structures for taskman... not a Fileman file)
- %ZTSK (Tasks Fileman file)
^%ZTSK Structure
^%ZTSK contains the actual task.
^%ZTSK(-1) contains the most recently assigned task.
.1 node: Current Status
- 1 -> Scheduled by %ZTLOAD
- 2 -> Not on any list
- L -> Rejected
- 3 -> In Job List
- A -> In IO List
- 4 -> Not on any index, but prepping
- 5 -> On task list (i.e. running)
- 6 -> Succeeded (NB: may not see this if task gets deleted immediately)
.2 node: IO
.3 node: Variables to use in the task
^%ZTSCH Structure
^%ZTSCH has indexes on the task file. It decides when a task will be run.
^%ZTSCH(seconds, task number) is the index of what to do when. The number of seconds is since the $H epoch.
Once a task is ready to run, it kills off the entry in (sec,task#) and puts it in another index ("JOB",sec,task#) or in ("IO",sec,task#) for tasks waiting for a device.
Submanagers watch ^%ZTSCH("IO") and ("JOB"). Once they find something, they kill it off there and put it in ("TASK").
("SUB") contains the list of available submanagers.
Submanagers run the job directly (no job command). The manager keeps looking for free submanagers and adds submanagers
Taskman Monitor Counters
- Task List
("SUB") (# number of subs available) ("TASK") -> Number of running tasks.
- Job List
("JOB") -> Almost always empty. If increasing, it's a warning sign. Increase triggers submanager launches.