kpps - Show Local KP Process Status

The kpps.py utility prints status information about each process
running under control of a local KOS (i.e. a KOS running on the local
host). The status information combines information about the
underlying operating system process, like the process id, and
information that is KOS-specific, like the name of the kernel where
the process is running.

The utility takes no arguments.

Here is an example of output from the utility. Each process is
listed on a single line. The column headings and the meaning of each
column are listed below.

What kind of KOS process this is. The value is always
one of these four labels: KOS, a kernel process,
sta, the KP starter process, EXT, a KOS
extension process, or KP, a Knowbot program.

KERNEL

The name of the kernel where the process is running.

NAME

The name of the KOS process. Most processes are explicitly named
sometime during the startup process, e.g. when an extension registers
with the kernel. For a KP, this value is the reporting id.

KPID

The internal id assigned by the KOS kernel. Although the id is
called the KPID, both KPs and extensions have one.

PID

The underlying operating system's process id.

STIME

The starting time of the process. The format of this field depends
on the ps utility provided by the operating system. Typically, the
time is show as hours, minutes, and seconds from processes started in
the last 24 hours.

TIME

The total amount of time this process has spent executing.

MEM

The size of the processes virtual memory footprint, in kilobytes.

COMMAND

The operating system command being executed, including
arguments. (The string displayed here is truncated to the first 19
characters.)

The "reporting-id", an identifier assigned to a KP by its submittor
when it is created, and which doesn't change when the KP migrates, is
not displayed.

Only processes running of the local machine are summarized by this
utility. A kernel running on a different machine will not appear, nor
will an extension for a local kernel if the extension is run on
another machine.

The lifetime of many KPs is only a fraction of a second. Thus, a KP
can easily by missed between independent runs of kpps.py.

Some extensions spawn child processes that provide services to a
specific client, i.e. the tkstdio extension. These child processes are
not registered with the KOS and do not appear.

On SGI IRIX, garbage is printed in the TIME and MEM columns.

Since every UNIX variant seems to have a slightly
different formatting of its ps output, it is possible that
kpps doesn't work when used on other systems. It is easy to
add a few customization lines to the source code (search for
sys.platform). If you add the right customization for
your platform, please send us a patch. If you have to port this to
a non-UNIX system, our hearts go out to you, but you're
on your own.