Next: , Previous: , Up: piesctl   [Contents][Index]

5.4 Component Management

piesctl: list [condition]

List configured components. When used without arguments, all components are listed. Otherwise, only processes matching condition are listed.

Each output line contains at least two columns. The first column lists the tag of the component. The second one contains flags, describing the type and status of the component. The first flag describes the type:

3SysV init ‘ctrlaltdel’ component
AAccept-style component
BSysV init ‘boot’ component
CRespawn component
cSysV init ‘once’ component
DSysV init ‘ondemand’ component
ECommand being executed
FSysV init ‘powerfail’ component
fSysV init ‘powerwait’ component
IInetd-style component
iSysV init ‘sysinit’ component
kSysV init ‘kbrequest’ component
nSysV init ‘powerfailnow’ component
oSysV init ‘powerokwait’ component
PPass-style component
ROutput redirector
WSysV init ‘wait’ component
wSysV init ‘bootwait’ component

The second flag is meaningful only for components. Its values are:

-Disabled component
fA finished ‘once’ component
LInetd listener
RRunning component
SComponent is stopping
sComponent is sleeping
TComponent is stopped

The next column lists the PID (for running components) or socket address (for Internet listeners), or the string ‘N/A’ if neither of the above applies.

If the component is sleeping, the time of its scheduled wake-up is listed in the next column.

Rest of line shows the component command line.

$ piesctl list
smtps/stderr R  4697
pmult/stderr R  4677
pmult/stdout R  4676
pmult        CR 4678 /usr/local/sbin/pmult
smar         CR 4680 smar -f /etc/meta1/meta1.conf -d 100
qmgr         CR 4691 qmgr -f /etc/meta1/meta1.conf
smtpc        CR 4696 smtpc -f /etc/meta1/meta1.conf
smtps        PR 4698 smtps -d100 -f /etc/meta1/meta1.conf
finger       IL inet+tcp:// /usr/sbin/in.fingerd -u
eklogin      IL inet+tcp:// /usr/sbin/klogind -k -c -e
kshell       IL inet+tcp:// /usr/sbin/kshd -k -c
eklogin      IR 13836  /usr/local/sbin/klogind -k -c -e

Use condition to select the components to list. In its simplest form, condition is one of the following terms:


Selects all processes, including internal services, such as output redirectors.


Selects only active components.

component tag

Selects the component with the given tag. See tag.

type arg

Selects processes of the given type. Argument is ‘component’, to select only components, ‘command’, to select commands or ‘redirector’ to select output redirectors. When piesctl list is used without arguments, type component is assumed.

mode arg

Selects components of the given mode (see mode). E.g. to list ‘inetd’ components:

piesctl list mode inetd
status arg

Selects processes with the given status. Argument is one of:


Component is finished.


Component is an inet listener.


Component is running.


Component is sleeping.


Component is stopped.


Component has been sent the SIGTERM signal and pies is waiting for it to terminate.

A term may be preceded by the word ‘not’ to indicate negation of the condition. For example, the following command will list inactive components:

piesctl list not active

Furthermore, terms can be combined in logical expressions using boolean ‘and’ and ‘or’ operators:

piesctl list type component and not mode inetd

Conjunction (‘and’) has higher precedence than disjunction (‘or’). In complex expressions parentheses can be used to alter the precedence:

piesctl list type component \
        and \( status running or status sleeping \)

Notice that parentheses must be escaped to prevent them from being interpreted by the shell.

The following summarizes the syntax of condition in BNF:

<condition> ::= <disjunction>
<disjunction> ::= <conjunction> | <conjunction> "or" <disjunction>
<conjunction> ::= <unary> | <unary> "and" <conjunction>
<unary> ::= <term> | "not" <condition> | "(" <condition> ")"
<term> ::= "all" | "active" | <keyword> <value>
<keyword> ::= "type" | "mode" | "status" | "component"
<value> ::= <word> | <quoted-string>
<word> ::= <printable> | <word> <printable>
<printable> ::= "A" - "Z" | "a" - "z" | "0" - "9" |
                "_" | "." | "*" | ":" | "@" | "[" | "]" | "-" | "/"
<quoted-string> ::= """ <string> """
<string> ::= <char> | <string> <char>
<char> ::= <any character except "\" and """> | "\\" | "\""
piesctl: stop condition

Stop components matching condition.

piesctl: start condition

Start components matching condition.

piesctl: restart condition

Restart components.

Next: , Previous: , Up: piesctl   [Contents][Index]