Next: Invocation, Previous: Configuration Examples, Up: Top [Contents][Index]
When run without arguments, pies
parses and loads the
configuration file, detaches itself from the controlling terminal
(becomes a daemon), and starts all components. Before actually
starting up, it ensures that no another copy is already running, by
looking for a PID file and verifying that the PID listed there is
alive and responding. If another copy is running, pies
refuses to start up.
It is often necessary to run several copies of pies
with
different configuration files. To support such usage, pies
provides a notion of instance. Pies instance is an independent
invocation of pies
that uses a separate configuration file
and separate state files (see State Files). Instances are created
using the --instance option:
Read configuration from sysconfdir/name.conf, use name as the base name for state files (i.e., they become name.pid, name.clt, etc.) and tag all syslog messages with name.
For example, the following invocations create three instances of
pies
:
pies pies --instance=inetd pies --instance=mta
The first instance uses the default configuration and state files. The second one reads configuration from /etc/inetd.conf, and the third one reads it from /etc/mta.conf.
After startup, you can verify the status of the running process using the --status option.
$ pies --status 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
See piesctl list, for a description of the output format.
You can restart any component by using the --restart-component (-R) option, e.g.:
$ pies -R pmult smtps
To stop all running components and shut down pies
, use the
--stop (-S) command line option:
$ pies --stop
If you modified the configuration file, you can instruct
pies
to read it again using the --reload
(-r) command line option.
The --status, --restart-component,
--stop, and --reload options actually run the
piesctl
command, which provides a powerful tool for managing
pies
. See piesctl, for a detailed description.
Two options are provided for verifying inter-component dependencies. The --dump-depmap option prints on the standard output the dependency map. This map is a square matrix with rows representing dependents and columns representing prerequisites. An ‘X’ sign is placed on each crossing which corresponds to the actual dependency. For example:
$ pies --dump-depmap Dependency map: 0 1 2 3 4 0 1 2 X 3 X 4 X X Legend: 0: pmult 1: smar 2: qmgr 3: smtpc 4: smtps
This example corresponds to the configuration file shown in Hairy Pies. To illustrate how to read it, consider the 4th row of the table. According to the legend, number 4 means ‘smtps’ component. There are two ‘X’ marks: in columns 1 and 2. This means that ‘smtps’ depends on ‘smar’ and ‘qmgr’.
You can also list prerequisites explicitly:
$ pies --trace-prereq qmgr: smar smtpc: qmgr smtps: smar qmgr
To list prerequisites for a particular component, give its name in the command line:
$ pies --trace-prereq smtps smtps: smar qmgr
Any number of components can be given in the command line.
A counterpart option --trace-depend lists dependencies. Its usage is similar to the described above:
$ pies --trace-depend smtps smtpc qmgr: smtps, smtpc smar: smtps, qmgr
$ pies --trace-depend qmgr qmgr: smtps, smtpc
Next: Invocation, Previous: Configuration Examples, Up: Top [Contents][Index]