Perforce 2002.2 Command Reference
<< Previous Chapter
p4 clients
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 counters

p4 counter


Synopsis

Access, set, or delete a persistent variable.

Syntax

p4 [g-opts] counter countername
p4 [g-opts] counter countername value
p4 [g-opts] counter -d countername
p4 [g-opts] counter -f [ change|job|journal ]

Description

Counters provide long-term variable storage for scripts that access Perforce. For example, the Perforce review daemon uses a counter (review) that stores the number of the last processed changelist.

When used in the form p4 counter countername, the value of variable countername is returned. When p4 counter countername value is used, the value of variable countername is set to value.

The Perforce server uses three counters in the course of its regular operations: change, job, and journal. Superusers may use the -f flag to force changes to these counters. Changes to these counters are not without risk; see the Release Notes for examples of the types of situations in which manually resetting these counters might be appropriate.

Options

-d countername

Delete variable countername from the Perforce server.

-f [change|job|journal]

Force a change to one of three internal counters used by Perforce. Most installations rarely, if ever, need to use this flag.

g-opts

See the Global Options section.

Usage Notes

Can File Arguments Use
Revision Specifier?

Can File Arguments Use
Revision Range?

Minimal Access Level Required

N/A

N/A

list to display a counter's value;
review to set a new value
super to use the -f flag

Related Commands

To list all counters and their values

p4 counters

List and track changelists

p4 review

List users who have subscribed to particular files

p4 reviews


Perforce 2002.2 Command Reference
<< Previous Chapter
p4 clients
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 counters
Please send comments and questions about this manual to [email protected].
Copyright 1999-2003 Perforce Software. All rights reserved.
Last updated: 02/25/03