p4 configure
Set and manage server configuration variables.
Syntax
p4 [g-opts] configure set [P4NAME#|server_id#]variable=value
p4 [g-opts] configure unset [P4NAME#|server_id#]variable
p4 [g-opts] configure show [allservers | P4NAME | variable]
Description
Configuration variables are used to control and customize the behavior of the Perforce service.
The configuration variables are described in:
- Configurables - alphabetical list, which gives the most information, including whether you need to stop the server
- p4 help configurables, which lists the name, default value, and use
- p4 help environment, which lists the name, definition, and where to get more information
Configurable settings might affect the client, the server, or a proxy.
The p4 configure
command provides one way to change
the configuration of an active server. For information on how you set
configurables that affect the client or the proxy, see
Configurables.
You can set configurables in the following ways for the server. Methods are shown in order of precedence:
Precedence |
Method |
---|---|
1 |
Command line options that are passed at server startup. For example: $ p4d -v net.keepalive.idle=2700
|
2 |
Persistently, using the This method allows you to set the specified configurable for a named server or for any server. |
3 |
Using environment variables.
|
4 |
Using default values, by taking no action. |
You can use K
and M
to represent large numbers. For example, 10M
is the default value for the dm.shelve.maxfiles configurable.
Use p4 configure show
to display the configuration
state of the current server, a named server, or any configurable. Each
configurable is displayed along with its value and an indication of what
method was used to set it. Use p4 configure unset
to
unset the value of a configurable.
After installing Helix Server, it is good practice to:
- enable process monitoring by setting
monitor
to 1 or 2 - require ticket-based authentication by
setting
security
to 3 or 4 - prevent the automatic
creation of new users by setting
dm.user.noautocreate
to 1 or 2 - force new users that you create to reset their passwords by setting
dm.user.resetpassword
to 1
Stopping the server for some configurables
Changes to most configurables take effect immediately. For example,
|
Changes to |
For certain configurables, such as ssl.tls.version.min, the situation is as follows: After you change the value of this configurable, you must explicitly "stop" the server. Note
p4 admin restart is not sufficient. For UNIX, see Stopping the Perforce Service and Starting the Perforce Service. For Windows, see Starting and stopping the Helix Server. |
Setting configurables in distributed environments
Servers can be identified by name. In replicated and distributed
environments, a master can control the settings of multiple replicas by
specifying the server name as part of the configurable. For example, the
following command sets the value of the serviceUser
configurable for an edge server (tokyo_edge
). The command is
executed on the commit server.
$ p4 configure set tokyo_edge#serviceUser=svc_tokyo_edge
For details, see Helix Core Server Administrator Guide: Multi-Site Deployment.
Accessing configurables when the server is down
If the
Helix Server is not running or you cannot access the server, you can use the
p4d
command to list, set, and unset server
configurables:
-
To list all server configuration variables, use the
-cshow
option. For example:$ p4d -r $P4ROOT -cshow
-
To set or unset values, use
-cset
or-cunset
. For example:$ p4d -r $P4ROOT "-cset myServer#auth.ldap.timeout=30" $ p4d -r $P4ROOT "-cunset myServer#db.replication"
For more information, see the Support Knowledgebase article, "Accessing Server Configuration Variables".
Options
|
Sets the named variable to the provided value. |
|
Unsets the named variable. |
|
Shows the current configuration of the server currently
specified by Note
Regarding the maximum size of
the |
|
Shows the configuration variables for all servers known to the system. |
|
Shows the setting of a specific configuration variable. |
|
If a
Helix Server was invoked with |
|
See Global options. |
Usage Notes
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
N/A |
N/A |
|
Examples
p4 configure set “Replica1#startup.1=pull -i 1” |
Set the startup.n configurable to poll 1 every second |
Related Commands
The p4 configure
command replaces many of
the settings formerly set by p4 counter
.
To list all counters and their values |