p4 monitor
Synopsis
Display Perforce process information
Syntax
p4 [g-opts] monitor show [ -a -l -e ]
p4 [g-opts] monitor terminate [ id ]
p4 [g-opts] monitor clear [ id | all ]
Description
You must enable monitoring on the Perforce server for p4 monitor to work. This is done by setting the monitor counter with p4 counter, and restarting the server. 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 ofboth active and idle processes). You must stop and restart the Perforce server for any change in this counter to take effect.
p4 monitor allows a system administrator to observe what Perforce-related processes are running on the Perforce server machine. Each line of output consists of the following fields:
pid status owner hh:mm:ss command [args]
where pid is the process ID under UNIX (or thread ID under Windows), status is R or T depending on whether the process is running or marked for termination, owner is the Perforce user name of the user who invoked the command, hh:mm:ss is the time elapsed since the command was called, and command and args are the command and arguments as received by the Perforce server.
To list current process information, use p4 monitor show. All processes are listed, but only the command (for example, sync, edit, submit) is shown, without arguments. This form of p4 monitor requires list level access.
To show the list of arguments associated with each command, use the -a (arguments) flag or -l (long) flag. For additional information from the user environment, use the -e (environment) flag. These options require admin level access.
To mark a process for termination, use p4 monitor terminate id. This command requires super level access.
To remove an entry from the monitor table, use p4 monitor clear id. You can clear the entire table with p4 monitor clear all. Both of these commands require super level access.
Options
g-opts
|
See the Global Options section.
|
-a
|
Show all arguments associated with the process (for example, edit file.c, or sync -f //depot/src/...).
Perforce user names are truncated to 10 characters, and each line is limited to a total of 80 characters of output.
|
-e
|
Show environment information including Perforce client application (if known), host IP address, and client workspace name.
|
-l
|
Show all arguments in long form; that is, without truncating user names or the list of command line arguments.
|
Usage Notes
Can File Arguments Use Revision Specifier?
|
Can File Arguments Use Revision Range?
|
Minimal Access Level Required
|
---|
No
|
No
|
list, admin, super
|
- Processes marked as running continue to run to completion even if removed from the monitor table with p4 monitor clear.
- If a command terminates prematurely on the server side, it may be erroneously listed as running. Superusers can clear such processes with p4 monitor clear.
- The p4 monitor terminate command will not mark a process for termination unless the process has already been running for at least ten seconds.
- Some commands (for instance, p4 submit) invoke multiple processes. For example, dm_CommitSubmit or dm_SubmitChange may appear in the output of p4 monitor as two separate phases of the p4 submit command.
- Some commands, such as p4 obliterate, cannot be terminated.
- If you have enabled idle process monitoring for your server (by setting the monitor counter to 2), idle processes appear with a status of R, but with a command of IDLE.
Examples
p4 monitor show
|
Show Perforce processes information (commands only). Requires list access only.
|
p4 monitor show -l
|
Show arguments and commands, without limits on line length. Requires admin access.
|
p4 monitor show -a
|
Show arguments and commands, limited to 80 characters per line of output. Requires admin access.
|
p4 monitor terminate 123
|
Instruct the Perforce server to mark process 123 for termination. Requires super access.
|
p4 monitor clear all
|
Clears the monitor table of all entries. Requires super access.
|
Related Commands
To turn on server monitoring (requires server restart)
|
p4 counter -f monitor 1
|
To turn off server monitoring (requires server restart)
|
p4 counter -f monitor 0
|
Please send comments and questions about this manual to
[email protected].
Copyright 1999-2006 Perforce Software. All rights reserved.
Last updated: 06/23/06