p4dctl commands


Category Syntax

Control services

p4dctl [ options ] start [ -t type ] -a
p4dctl [ options ] start [ -t type ] name
p4dctl [ options ] stop [ -t type ] -a
p4dctl [ options ] stop [ -t type ] name
p4dctl [ options ] restart [ -t type ] -a
p4dctl [ options ] restart [ -t type ] name

Checkpoints and journals

The p4dctl checkpoint command is similar to the p4d -jc command.

p4dctl [ options ] checkpoint -a
p4dctl [ options ] checkpoint name

Query services

p4dctl [ options ] status [ -t type ] -a
p4dctl [ options ] status [ -t type ] name
p4dctl [ options ] list [ -t type ]
p4dctl [ options ] list [ -t type ] name
p4dctl [ options ] env [ -t type ] -a var [var…​]
p4dctl [ options ] status [ -t type ] name var [var…​]

Arbitrary command on
the servers (or services) that match name

p4dctl [options] exec -t type [-r] [-n] [-f] name -- arg

Executes the binary for the specified service matching type and name with the argument(s) specified after the -- separator of two hyphens.

The service binary is executed with the same environment variables that p4dctl start would set.


p4dctl exec -t p4d name -- -xu when Upgrade the server
p4dctl exec -t p4d -f master -- -cshow to verify the user, p4d binary, and P4ROOT
p4dctl exec -t p4d -f master -- -V to execute p4d -V without having to check whether the p4d in your path is the p4d specified in the configuration of that instance


See also the meaning of variable names in Configuration file format.

Options Meaning

All servers.

-c configFile

Path to the configuration file

Default: /etc/perforce/p4dctl.conf


Force exec to execute the command even if that p4d instance is currently running.


Used with exec to preview rather than run the command.

-p pidDir

Path to the pid file directory.

Default: /var/run


Send output to syslog instead of STDOUT or STDERR

-r Restricts the arg arguments for exec to those explicitly included with the exec command. Without -r, if the service is configured with arguments, they are honored and any additional arg arguments in this exec command are appended.
-t type The service type of the p4d instance to run, such as p4d, p4p, p4broker, and other.

-v level

Set debug level (0-9)

For more information, see the description of the P4DEBUG environment variable in P4 Command Reference.


Display version and exit.