A survey tool to gather basic information about a P4 installation.
Download and run it as a logged-in Perforce
super user. For the most complete report, run it on the
central commit or master server; running from a client machine is also
supported, but host-level information may be unavailable.
To send us accompanying pre-consulting survey information, download the survey questionnaire, open the downloaded file in a browser, and complete it locally (saving it as Markdown report).
Table of Contents
Download the binary for your platform and execute it. The tool writes a Markdown report that can be zipped and sent to Perforce Consulting or Support (or the person who emailed you the link).
The following settings can be supplied through the environment or command-line parameters:
P4PORT: the p4d server to queryP4USER: the p4d (super) user account to useP4BIN: the path to p4 or
p4.exe if it is not on your shell PATHYou must already be logged in to the p4d server and have
super privileges. The tool exits with an error
otherwise.
On Linux, download the appropriate binary, decompress it, make it executable, and run the survey:
wget https://swarm.workshop.perforce.com/downloads/guest/perforce_software/p4survey/bin/p4survey.linux-amd64.gz
gunzip p4survey.linux-amd64.gz
chmod +x p4survey.linux-amd64
mv p4survey.linux-amd64 p4survey
# Execute it - with parameters if required.
./p4surveyOn Windows, use PowerShell to download the executable and remove the security marker that Windows adds to files downloaded from the internet:
Invoke-WebRequest -Uri "https://swarm.workshop.perforce.com/downloads/guest/perforce_software/p4survey/bin/p4survey.windows-amd64.exe" -OutFile ".\p4survey.exe"
Unblock-File -Path ".\p4survey.exe"
# Execute it - with parameters if required.
& ".\p4survey.exe"The tool reports the generated filename, for example:
Running p4survey analysis as user "jbloggs" on P4PORT "some-server:2001"
Topology data written: p4_topology_data.XXXX.json
Markdown report written: p4survey.XXXX.md
Email the generated survey report, topology data, and completed survey questionnaire to Perforce Consulting or Support.
Send the resulting report to Perforce Consulting or Support.
Click a download link directly, or copy its target to use with
wget or curl.
| Platform | Download | History |
|---|---|---|
| Linux amd64 | Download | History |
| Linux arm64 | Download | History |
| macOS arm64 | Download | History |
| macOS amd64 | Download | History |
| Windows amd64 | Download | History |
For the accompanying pre-consulting checklist, download the survey questionnaire, open the downloaded file in a browser, complete it locally, and download the responses as Markdown.
usage: p4survey [<flags>]
A survey tool for Perforce P4 servers. Will report on the server configuration.
Must be run as a logged in superuser.
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
-u, --p4user=P4USER (Optional) Perforce user (default $P4USER)
-p, --p4port=P4PORT (Optional) Perforce server port (default $P4PORT)
--p4bin=P4BIN (Optional) Full path of p4 CLI (default is 'p4' in $PATH)
--no-topology Do not collect topology data
--topology-svg Collect topology data and render a pure-Go SVG diagram
--topology-layout=layered
SVG layout: layered or sfdp
--topology-input=TOPOLOGY-INPUT
Render a pure-Go SVG diagram from saved topology JSON
--debug Debug output
-V, --version Show application version.
The output is a Markdown report and topology data in a JSON file that
can be sent to Perforce Consulting or Support. Use
--no-topology to omit topology data.
Topology data is collected by default. Use --no-topology
to omit it, or use --topology-svg to also create an
interactive SVG showing servers and their hostnames. The default
layered layout is deterministic and pure Go: it does not
require CGO, Graphviz, or Python. The SVG can be opened in a browser to
rearrange nodes and download the edited layout.
Use --topology-layout=sfdp when Graphviz
sfdp is installed and on PATH. To create an
SVG from previously saved topology JSON without connecting to P4,
run:
./p4survey --topology-input p4_topology_data.example.jsonThis writes p4_topology_data.example.svg beside the
input file.
For Mermaid, HTML, AsciiDoc, alternate SVG layouts, and the legacy Python renderer, see Topology renderer.