Perforce health checks
Below is a summary of commands that can be run to assess the health of a Perforce Server (both commit and edge replicas).
P4 Server metadata verification
The 'p4 dbverify' command performs structural integrity checks on the Perforce server's metadata, it will detect database corruptions. Note that this command can be computationally expensive, it is also possible to run it against only particular database tables, and to run quicker checks. See the Perforce Command Reference entry on dbverify for more information.
> p4 dbverify
In the case issues are reported by p4 dbverify it is advised to contact Perforce support directly for help to resolve the issue. Help on p4 dbverify can also be displayed with the Perforce help system:
> p4 help dbverify
P4 Server managed data verification
The health of the Perforce Managed data can be checked with the 'p4 verify' command. If run against a commit server use the form:
> p4 verify -qz //depot/path/...
To run the 'p4 verify' command against an edge server add the '-t' flag. The '-t' flag schedules the transfer of any missing data from the commit to the edge server:
> p4 verify -qzt //depot/path/...
More information can be found in the Perforce Command Reference entry on verify, or in the Perforce command line help:
> p4 help verify
Perforce Server replication status
To check the current status of replication of a particular edge server you can use the 'p4 pull' command. If the edge has a good working replication status, the following command should report no error, and there should not be a big gap in the journal state reported between the replica and its master server:
> p4 pull -lj Current replica journal state is: Journal 0, Sequence 21940363. Current master journal state is: Journal 0, Sequence 21940363. The statefile was last modified at: 2018/10/21 10:53:58. The replica server time is currently: 2018/10/25 06:50:41 -0700 PDT
To see the pending file content transfers as well as failed file content transfers for a particular edge replica use the command:
> p4 pull -l
If there are no pending transfers and no transfers have failed the 'p4 pull -l' command will complete with no output. More information on the p4 pull command can be found in the Perforce Command Reference entry on pull.