p4 diagnostics
Generate diagnostic data about the P4 Server.
Syntax
p4g-optsdiagnostics [-D] [-j] [-J [-L limit]] p4g-optsdiagnostics [-D] [-l] [-s [--strace-runtime secs]] [-p] [-t] [-a [-J [-L limit]] ]
Description
The first form of the command generates the basic diagnostic data, and downloads a compressed tar file (.tgz) that contains these files:
-
diags- basic configuration details, configuration, configuration history, server setting. -
info- tagged output from thep4 infoandp4 servers -Jcommands, and a list of all non-default configurables. -
monitor- the monitor records, if monitoring is enabled. -
topology- a textual description of the network that contains this server. Servers that do not have a serverID are ignored.
The second form of the command provides information that might take more time and require more server resources.
Options
| Option | Description |
|---|---|
-D
|
Create a new directory and download the requested uncompressed individual files into this new directory. Without this option, download a single compressed tar file. |
-J
|
Download a copy of the current journal file and log file, using the configured names of these files. |
|
|
Limit the download size
of the journal and log files to the last |
-j
|
Request that the diags and monitor files
are encoded in JSON format. These output files are named
diags.json and monitor.json. Any non-UFT8 sequences
in a string are replaced by U+FFFD in the JSON output. |
|
|
Request that the |
|
|
Run an |
-t
|
Run the top program and returns its
output. |
-p
|
Run the ps program and returns its
output. |
| -a | Request that the basic diagnostic files of p4 be produced. Without this option, those files are omitted with the -l, -t, -p, and -s options. |
Usage notes
| Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
|---|---|---|
|
N/A |
N/A |
available to an operator user |
Examples
| Command | Output |
|---|---|
p4 diagnostics
|
where 20250923 is in |
p4 diagnostics -D
|
|
p4 diagnostics -s
|
The diagnostics command has created the 'diagnostics_20250923054917-0700.tgz' compressed tar file containing: strace.
|