.\" Process this file with .\" groff -man -Tascii foo.1 .\" .TH P4DCTL 8 "March 2014" Linux "Adminstration Commands" .SH NAME p4dctl \- Manage Perforce services .SH SYNOPSIS .SS Starting and Stopping Services .B p4dctl [ .I options .B ] start [ -t .I type .B ] -a .br .B p4dctl [ .I options .B ] start [ -t .I type .B ] .I servername .br .B p4dctl [ .I options .B ] stop [ -t .I type .B ] -a .br .B p4dctl [ .I options .B ] stop [ -t .I type .B ] .I servername .br .B p4dctl [ .I options .B ] restart [ -t .I type .B ] -a .br .B p4dctl [ .I options .B ] restart [ -t .I type .B ] .I servername .SS Checkpoints and Journals .B p4dctl [ .I options .B ] checkpoint -a .br .B p4dctl [ .I options .B ] checkpoint .I servername .SS Queries .B p4dctl [ .I options .B ] status [ -t .I type .B ] -a .br .B p4dctl [ .I options .B ] status [ -t .I type .B ] .I servername .br .B p4dctl [ .I options .B ] list [ -t .I type .B ] .br .B p4dctl [ .I options .B ] list [ -t .I type .B ] .I servername .br .B p4dctl [ .I options .B ] env [ -t .I type .B ] -a .I var .B [ .I var... .B ] .br .B p4dctl [ .I options .B ] env [ -t .I type .B ] .I servername .I var .B [ .I var... .B ] .SH DESCRIPTION .B P4DCTL allows administrators to manage Perforce services running on the local host. It provides a central place for configuring, starting & stopping all Perforce services, and is designed to allow non-root users to administer services they own, while root may administer all services, but may not own any. .SS Privileges & Pidfiles P4DCTL must be installed as a setuid root executable because it uses root privileges to maintain pidfiles for compatibility with systems that use them. During all other operations, P4DCTL runs with the privileges of the executing user. This allows non-root users to start/stop the services they own, while having the pidfile remain up-to-date. .P .SS Environment Control P4DCTL enforces strict control of the environment of any services it starts. Administrators specify the complete environment for each service in the configuration file and P4DCTL ensures that the environment for the service is exactly what is configured, no more, no less. This prevents the category of failure where services work when started by the user, but not when started by root. If both use P4DCTL, the environment is always identical. .SH OPTIONS .IP "-c config-file" Path to config file. Default: /etc/perforce/p4dctl.conf .IP "-p pid_dir" Path to pid file directory: Default: /var/run .IP -q Send output to syslog instead of stdout/stderr .IP "-v level" Set debug level (0-9) .IP -V Print version and exit .SH FILES .I /etc/perforce/p4dctl.conf .RS The system wide configuration file. .RE .SH ENVIRONMENT p4dctl uses no specific environment variables .SH AUTHOR Tony Smith <tony at perforce dot com> .br Copyright (c) 2007-2014 Perforce Software, Inc. .SH LICENSE P4DCTL is distributed under the Perforce Open Source License, a copy of which must be included in all source or binary distributions. .SH "SEE ALSO" .BR p4dctl.conf (5) .BR p4 (1), .BR p4d (1)
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 16543 | Matt Attaway | Update P4DCTL with code from 15.2 and reorg files | ||
//guest/perforce_software/p4dctl/src/p4dctl.8 | |||||
#1 | 10658 | Jason Gibson |
Update P4DCTL from internal Perforce tree. Note that this change does not bring the internal Jam files and deletes the existing builds, leaving that as a future task. Changes include: ################################################################################ Added support for a -o option which allows command line arguments to be passed directly to the service being started. ################################################################################ Support for P4DTG in P4DCTL. Example config: p4dtg test { Execute = /usr/local/share/p4dtg-2010.2.452775/p4dtg-repl Owner = perforce Environment { P4DTGROOT = /p4/dtg P4DTGMAPPING = local } } ################################################################################ Move p4dctl's default configuration file (and the only one that is considered safe to use) to '/etc/perforce/p4dctl.conf', and also move the directory that gets included by default to '/etc/perforce/p4dctl.conf.d'. ################################################################################ Make p4dctl provide LANG and LC_ALL environment variables to child processes. These both default to 'C'. They can be overridden in either global or server-specific environment blocks, but given that 2014.2 relies on LANG, it's better if that is set than missing. ################################################################################ Make p4dctl status exit with a code of 1 if any of the servers that it attempts to check are not running. For automation support ################################################################################ Change syntax of p4dctl config files so as to more clearly differentiate between 'settings' that p4dctl understands and environment variables to be set for the child processes. The old style syntax looked like this: p4d main { Owner = perforce Execute = /usr/local/bin/p4d P4ROOT = /home/perforce/p4-main P4JOURNAL = journal P4PORT = 1666 PATH = /bin:/usr/bin:/usr/local/bin } Where the only thing that differentiated the two was a convention on the use of case. Anything p4dctl didn't understand would be set as an environment variable. Now, we're separating the environment into a dedicated block, so p4dctl can flag up early if it encounters settings it doesn't know about. The new syntax looks like this: p4d main { Owner = perforce Execute = /usr/local/bin/p4d Environment { P4ROOT = /home/perforce/p4-main P4JOURNAL = journal P4PORT = 1666 PATH = /bin:/usr/bin:/usr/local/bin } } ################################################################################ A new command in p4dctl that allows you to query the environment for any configured server. For example: list all p4d's with their Name, port and root: $ p4dctl env -a -t p4d Name P4PORT P4ROOT Name=p4d-master P4PORT=ssl:1666 P4ROOT=/var/lib/perforce/p4d-master Find the P4ROOT of a known Perforce server and set P4ROOT in your environment: $ eval `p4dctl env -t p4d p4d-master P4ROOT` ################################################################################ Manpages for p4dctl and its config file. ################################################################################ Add 'list' command to p4dctl. Lists configured servers visible to the current user. Lists useful information about all the standard Perforce Server types. |
||
//guest/perforce_software/p4dctl/src/p4dctl.1 | |||||
#1 | 8907 | Matt Attaway |
Branch Tony Smith's p4dctl tool into perforce_software area p4dctl is a tool that helps admins to manage multiple Perforce servers. This tool is used by the Perforce Linux packages to help manage servers. |
||
//guest/tony_smith/perforce/p4dctl/src/p4dctl.1 | |||||
#1 | 8326 | Tony Smith |
Some significant updates to p4dctl. 1. Support for interacting with SSL enabled servers 2. New command 'list' to list configured servers p4dctl [ options ] list [ -t type ] -a p4dctl [ options ] list [ -t type ] servername 3. New command 'env' to allow you to fetch arbitrary settings from a configured server in a form suitable for use with 'eval'. p4dctl [ options ] env [ -t type ] -a var [ var... ] p4dctl [ options ] env [ -t type ] servername var [ var... ] 4. Supply a new manpage for p4dctl |