Server block

A server block defines settings and variables that apply only to the specified type of service:

Type Meaning

p4d

Helix Core Server, also called Helix Server

p4p

Helix Proxy

p4broker

P4Broker

other

Any other service

A server block is defined using the following syntax:

server_type name
{
   setting = value
   Environment
   {
       variable = value
   }
}

The specified name name must refer to services of a given type, but the name can include different types of servers. This allows you to control or query groups of heterogeneous servers that share the same name.

For example, a configuration that defines p4d and proxy services using the name main can use a single command to stop p4d and proxy services without affecting any other services:

$ p4dctl stop main

You can define the following variables within server blocks. Owner and Execute are required for all server types.

Setting Meaning

Owner

The owner of the service.

The service is started under the owner’s account and with their privileges. The user can also use p4dctl to manage the server they own.

Required.

Execute

The path to the binary to execute when starting this server.

Required.

Args

A string containing the arguments to be passed to the binary specified with Execute.

The string must be quoted. For example:

Args = "-C1"

or

Args = "-u us_proxy -v lbr.stat.interval=300 -v proxy.monitor.level=3 -v proxy.monitor.interval=300"

Enabled

Set to FALSE to disable the service and not start it with the p4dctl start command.

Default: TRUE

Umask

An octal value specifying the umask to be applied to the child processes for this service. The default umask on most Linux/Unix systems is 022, which means all new files are readable by all users.

Setting this variable to 077 ensures that the files created by this service are only accessible to the owner of the service.

Prefix

A string containing a prefix to apply when checkpointing the server or rotating the journal. This prefix is passed down to the relevant p4d command if needed.

Default: none

PrettyNames

Set to true to have p4dctl format the names of the server processes it starts, in an informative way.

In the following example, the p4d process is qualified with its host and port name when PrettyNames is set to true.

PrettyNames=true
  perforce callto:21397%201%200%2010[21397 1  0 10]:48 ?  00:00:00 p4d
                                             [blacksphere/1666]
PrettyNames=false
  perforce callto:21725%201%200%2010[21725 1  0 10]:50 ?  00:00:00
                                              /usr/sbin/p4d

Default: true