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

P4 CLI Reference | 2025.1

# p4 counters

Display the list of long-term variables used by P4 Server and associated scripts.

## Syntax

    p4 [g-opts] counters [-e nameFilter] [-m max]

Syntax conventions

## Description

P4 Server uses counters as variables to store the number of the last submitted changelist and the number of the next job. `p4 counters` provides the current list of counters, along with their values:

`change` | Current change number.
`job` | Current job number.
`journal` | Current journal number
`lastCheckpointAction` | Data about the last complete checkpoint
`logger` | Event log index used by `p4 logger`.
`maxCommitChange` | The last changelist number successfully submitted to the P4 Server. For perfomance reasons, the p4 submit operation updates the `maxCommitChange` counter prior to completing the computation of the size of `text+k` files, which are stored as type `text` with keyword expansion.
`traits` | Internal trait lot number used by `p4 attribute`.
`upgrade` | Server database upgrade level.

## Options

`-e nameFilter` | List counters with a name that matches the `nameFilter` pattern, for example: p4 counters -e 'mycounter-*'
`-m max` | List only the first `max` counters.
`g-opts` | See Global options.

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
N/A | N/A | `list` available to an operator user

The command returns no output if there is no object to report on.

## Related commands

To view or change the value of a counter | `p4 counter`

Your search for returned results