Display list of all server specifications or evaluate replication status.
A user with operator privileges may execute p4
servers
and p4 servers -J
.
p4 [g-opts] servers [-J | --replication-status]
Syntax variants are described in the following subsections.
p4 servers lists all server specifications stored at a master Helix Server.
depot-master server depot-master myHost:1111 depot-master 'depot-master ' depot-standby_1 server depot-standby_1 10.0.101.55:37046 depot-standby 'depot-standby ' workspace-server_1 server workspace-server_1 10.0.101.55:41261 workspace-server 'workspace-server ' workspace-server_2 server workspace-server_2 10.0.101.55:47050 workspace-server 'workspace-server '
Output lists the server ID, the type, the services provided, and the description supplied when the server was created.
The output of p4 servers
may be easier to parse if
you retrieve it in tagged form:
p4 -ztag servers
... ServerID depot-master ... Name depot-master ... Address myHost:1111 ... Type server ... Services depot-master ... Description depot-master ... ServerID depot-standby_1 ... Name depot-standby_1 ... Address myHost2:37046 ... Type server ... Services depot-standby ... Description depot-standby ... ServerID workspace-server_1 ... Name workspace-server_1 ... Address myHost3:41261 ... Type server ... Services workspace-server ... Description workspace-server ... ServerID workspace-server_2 ... Name workspace-server_2 ... Address myHost4:47050 ... Type server ... Services workspace-server ... Description workspace-server
Using the -J
or --replication-status
option
allows you to check how efficiently one or more replicas are replicating
the master server’s records. Given a server A
and a replica
B
, output for this command gives you two basic pieces of
information:
A
's journal.B
, that has sent a p4
pull
or p4 journalcopy
request,
information is given as to when that request was sent and what is the
persisted and applied state of B
's journal. (In the case
of a simple master and replica, the persisted and applied numbers are
always the same: B
's journal is updated by the p4
pull
command.This assumes that the command is executed with the master server as the target. A standby server can replicate master server records using two operations:
p4 journalcopy
command to copy
(persist) the master server’s journal to the standby’s
journal.p4 pull -L
command to apply
the copied journal records to the standby’s database and to update its
state file.You can look at the output to evaluate the load on various parts of your distributed system and to see how well your replicas are keeping up with the master. Growing lag times might be a reason for concern.
The untagged output of p4 servers -J
looks like
this:
depot-master '2014/09/08 13:13:58' depot-master 5/258 5/258 wadL/1 1 depot-standby_1 '2014/09/08 13:14:58' depot-standby 5/258 5/258 WAdl/12 1 workspace-server_1 '2014/09/08 13:14:58' workspace-server 5/258 5/258 WaDl/10 1 workspace-server_2'2014/09/08 13:14:57' workspace-server 5/258 5/258 WaDl/10 1
It is easier to interpret this output in tagged form:
... ServerID depot-master ... Updated 2014/09/08 13:13:58 ... ServerType depot-master ... PersistedJournal 5 ... PersistedSequence 258 ... AppliedJournal 5 ... AppliedSequence 258 ... JAFlags wadL/1 ... IsAlive 1 ... ServerID depot-standby_1 ... Updated 2014/09/08 13:14:58 ... ServerType depot-standby ... PersistedJournal 5 ... PersistedSequence 258 ... AppliedJournal 5 ... AppliedSequence 258 ... JAFlags WAdl/12 1 ... IsAlive 1 ... ServerID workspace-server_1 ... Updated 2014/09/08 13:14:58 ... ServerType workspace-server ... PersistedJournal 5 ... PersistedSequence 258 ... AppliedJournal 5 ... AppliedSequence 258 ... JAFlags WaDl/10 1 ... IsAlive 1 ... ServerID workspace-server_2 ... Updated 2014/09/08 13:14:57 ... ServerType workspace-server ... PersistedJournal 5 ... PersistedSequence 258 ... AppliedJournal 5 ... AppliedSequence 258 ... JAFlags WaDl/10 1 ... IsAlive 1
The meaning of the fields are described in the following table.
|
The server ID of the server. |
|
The date and time the requesting server last requested journal records from this server (normally the master). |
|
The server type. One of the following: |
|
The rotation number of the journal to which records are being persisted. |
|
The persisted journal position. For master servers, replicas, and workspace servers, the persisted and applied positions are always the same. They differ only for all types of standby servers. |
|
The rotation number of the applied journal. |
|
The applied journal position. For master servers, replicas, and workspace servers, the persisted and applied positions are always the same. |
|
Set of fields printed in upper-case if set or lower-case if not. The numeric value of the flags is displayed after the alphabetic display. Common field displays with their associated pull or journalcopy commands are as follows:
Symbols are to be interpreted as follows:
|
|
1 if the server is up; 0 if it’s down. |
Pull or journal-copy requests are recorded in the db.jnlack
table only when made from a replica that has either a server ID or a P4NAME
. Any replica that makes such
a request but does not have a server ID or P4NAME
is not
recorded in the table.
|
Provides information about the server’s journal and about the replication status of all replicas that replicate from this server. |
|
See Global Options. |
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
N/A |
N/A |
|
To edit or view a server specification |
|
To set a server’s unique ID |