modus

The program monitor

A system tool: the memory of the machine and the programs that run, as a picture that changes twice per second. It needs the grant to inspect the machine.

It is also a service: programs(), counts() and count() give the same facts as tables of records (exports.odin).

FactValue
Sourceprograms/monitor
Boot imagein the boot image; the image is not built, so its size is not known
Importsnone
Imported bynone

Exports

ExportWhat it does
programs() -> Table(Program)gives one row for each program that runs, from the reports of the kernel: its slot, its name, its state, its pages with a frame and its mapped pages, its handles, threads, processor time in milliseconds, kernel entries, and the time of its start in microseconds
counts() -> Table(Count)gives one row for each count of the machine that the kernel reports: the time, the pages, the free pages, the reserved pages, the memory objects, the programs, the processors, the kernel entries, the interrupts, the page faults of a first use, and the takes and the waits of the locks of the kernel, the scheduling strategy (its number, and its name as the unit) and its changes
count(name: Text) -> Integergives one count of the machine by its name, as counts() names it: count("free pages")
counts_named(names: Table(Count_Name, Read), details: Table(Error_Record, Append)) -> Table(Count)gives the counts of the machine that a table of names names, in the order of the table: many counts in one call
served() -> Servedgives what the monitor did as a service: the calls that it executed, the connections that it has now, and the pictures of its window
entry()

Read from the source of the module, as the build reads it to describe the exports (tools/kerneltool/describe.odin).

What the root service gives it

WhatValueAs the root service says
Grants{.Inspect, .Serve}It serves programs() and counts() to a caller that acts for the person.
Budget: pages, programs, threads{pages = 2048, programs = 1, threads = 1}Not named in things_of: the budget of each other program.

Read from grants_of and things_of in programs/root/main.odin; budget_of in the same file adds the limits of processor time and of log records.