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

5.7 Configuration for piesctl

The configuration file /etc/piesctl.conf helps the piesctl tool to determine the URL of the control socket. This file is not mandatory, and its absence is not considered an error. Its syntax is similar to that of /etc/pies.conf. The following statements are defined:

piesctl.conf: socket url

Sets the default socket URL.

piesctl.conf: source ip

Sets the default source IP address. This is used if the control socket is of ‘inet’ type.

piesctl.conf: instance name

Configures socket URL and (optionally) source address to use when communicating with the pies instance name (i.e., when invoked as piesctl -i name:

instance name {
    # Socket URL for that instance.
    socket url;
    # Source IP address.
    source ip;

Valid values for url in the above statements are:


Use the IPv4 address ip (may be given as a symbolic host name), on port port.


Use the UNIX socket file file.

The following algorithm is used to determine the name of the communication socket:

  1. If the --url (-u) option is given, use its argument.
  2. Determine the instance name (inst). If the --instance (-i) is given, inst is its argument. Otherwise, assume inst=‘pies’.
  3. If configuration file /etc/piesctl.conf exists, read it. On success:
    1. See if the instance inst statement is present and has socket substatement. If so, the argument to socket gives the socket URL.
    2. Otherwise, if global socket statement is present, its argument gives the URL.
  4. Otherwise, suppose that piesctl is run on the same box where the target instance of pies is running, and see if the file /etc/inst.conf exists. If so, parse it as pies configuration file and look for control block statement. If it has socket statement, take its argument as the URL. See control.
  5. If socket URL is not determined by these steps, assume /tmp/inst.ctl.

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