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:
Flag | Meaning |
---|---|
3 | SysV init ‘ctrlaltdel’ component |
A | Accept-style component |
B | SysV init ‘boot’ component |
C | Respawn component |
c | SysV init ‘once’ component |
D | SysV init ‘ondemand’ component |
E | Command being executed |
F | SysV init ‘powerfail’ component |
f | SysV init ‘powerwait’ component |
I | Inetd-style component |
i | SysV init ‘sysinit’ component |
k | SysV init ‘kbrequest’ component |
n | SysV init ‘powerfailnow’ component |
o | SysV init ‘powerokwait’ component |
P | Pass-style component |
R | Output redirector |
W | SysV init ‘wait’ component |
w | SysV init ‘bootwait’ component |
The second flag is meaningful only for components. Its values are:
Flag | Meaning |
---|---|
- | Disabled component |
f | A finished ‘once’ component |
L | Inetd listener |
R | Running component |
S | Component is stopping |
s | Component is sleeping |
T | Component 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://0.0.0.0:finger /usr/sbin/in.fingerd -u eklogin IL inet+tcp://0.0.0.0:eklogin /usr/sbin/klogind -k -c -e kshell IL inet+tcp://0.0.0.0:kshell /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:
all
Selects all processes, including internal services, such as output redirectors.
active
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:
finished
Component is finished.
listener
Component is an inet listener.
running
Component is running.
sleeping
Component is sleeping.
stopped
Component is stopped.
stopping
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 """> | "\\" | "\""
Stop components matching condition.
Start components matching condition.
Restart components.