Home Contents | # debug.ps | Debug | Core4 Lua Commands

## SYNOPSIS

str = debug.ps([mode])

## DESCRIPTION

Provides information about running processes. The optional mode argument specifies:

0 | Process list
1 | Signal setup of current process
2 | More detailled process list

## NOTES

The output is meant for printing on a terminal and contains VT100-like escape codes for formatting.
Never parse the output of this function programmatically. It is only meant for human consumption.

## EXAMPLE

>
print(debug.ps())
[Task] Pid State Pri Name Parent Childs [Task] 0 Ready -32769 IDLE - 1,2,3 [Task] !1.1 Sleep 0 /sbin/init 0 4,5 [Task] 2 Sleep 1 AUTOMATA 0 [Task] 3 Sleep 0 ROBOTO 0 [Task] !4.4* Run 0 /bin/lua 1 [Task] !5.5 Sleep 0 /bin/nuts 1

Pids in the form a.b report the process group number as a and the process id as b. An exclamation mark indicates the session leader. The asterisk marks the current process.

For kernel processes, the State column is marked red (Not shown here.)

## SEE ALSO

debug.free, debug.dump