Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Server Administration Documentation | 2025.1

# Diagnostic flags for monitoring the server

Using diagnostic flags can help you monitor the server.

Any user commands that exceed certain thresholds for resource usage (such as CPU, lapse time, database I/O, network I/O) automatically get logged into the server error log specified by P4LOG. Trace output appears in the log file, and shows the date, time, username, IP address, and the command for each request the server processes.

## Performance Tracking

Performance tracking is on by default (determined by the number of users shown in the server license file), but can be turned off or adjusted with the p4 configure set track=x command for the track configurable. You might try different values to determine which is most suitable for your environment, which depends on various factors, including the amount of automation running on the server.

Performance Tracking
Level | Description
--- | ---
0 | Turn off tracking
1 | Track all commands
2 | Track excess usage for a server with less than 5 users
3 | Track excess usage for a server with less than 100 users
4 | Track excess usage for a server with less than 1000 users
5 | Track excess usage for a server with more than 1000 users

## Command Tracing

Command Tracing is on by default but can be turned off or adjusted with the p4 configure set server=x command for the server configurable:

Command Tracing Levels
Level | Description
--- | ---
0 | Turn off tracing.
1 | Include the start information for each command.
2 | Include the start and stop information for each command.
3 | Add a "compute end" message for certain commands.
4 | Include errors sent to the client to the server log.
5 | Add database locking, monitor and resource pressure information.

## Set the diagnostic flags

To modify the behavior of command tracing or performance tracking, use the p4 configure command. For example:

    $ p4 configure set server=3

Setting server debug levels on a P4 Server (`p4d`) has no effect on the debug level of a P4 Proxy (`p4p`) process. Similarly, setting the debug level of a proxy has no effect on the debug level of the server.

Before you activate logging, make sure that you have at least the minimum required disk space (see filesys.P4LOG.min in P4 CLI Reference) and be aware that you might need more.

The highest levels of the P4 Server command tracing and tracking flags are typically recommended only for system administrators working with Perforce Technical Support to diagnose or investigate problems.

### To enable both server and track flags:

Issue these two commands:

p4 configure set track=1

p4 configure set server=3

Diagnostic flags can also be set using P4DEBUG or on the server command line using the -v option.

For additional information, see the Perforce Knowledge Base article, Interpreting server log files.

Your search for returned results