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, and if
countername does not already exist, it is created.
The Perforce server uses three counters in the course of its regular operations: change,
job, and
journal. Superusers can 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.
You can control server process monitoring by setting the monitor counter to 0 (disable monitoring), 1 (enable monitoring of active processes), or 2 (enable monitoring of both active and idle processes). You must stop and restart the Perforce server for any change in this counter to take effect. After you have enabled process monitoring, you can use
p4 monitor to observe activity on the Perforce server.
To configure password strength requirements or to require the use of the ticket-based authentication mechanism, set the
security counter to the desired level. You must stop and restart the Perforce server for this change to take effect. See the
System Administrator's Guide for details.