Enable process monitoring
Server process monitoring requires minimal system resources, but you
must enable process monitoring for p4 monitor
to work.
For example, to monitor active commands, set the monitor
configurable to 1
:
$ p4 configure set monitor=1
To include idle processes, set to a value higher than 1.
Valid values for the monitor configurable are:
- 0: Server process monitoring off. (Default)
- 1: monitor active commands
- 2: active commands and idle connections
- 3: same as
2
, but also includes connections that failed to initialize (stuck at the Init() phase) - 5: same as
2
, but also includes a list of the files locked by the command for more than one second - 10: same as
5
, but also includes lock wait times - 25: same as
10
, except that the list of files locked by the command includes files locked for any duration
Note
The command p4 monitor -ael includes
- the command arguments (-a)
- the environment (-e)
- long-form output (-l), including the username and argument list.
If your rejected client version still appears in the output, ensure the rejectList setting is correct. See Reject client connection requests.
Note
- Regarding
5
,10
, or25
, for Linux and macOS systems, see the p4 monitor topic on the-L
option. - Microsoft Windows does not have the
lsof
utility to list open files, so5
,10
, or25
are not relevant to Windows.
Important
Setting monitor to a valid non-zero value activates db.monitor.interval. For example,
- Set a valid non-zero value for monitor, such as
p4 configure set monitor=1
- (Optional): If you want a different monitoring interval than the default 30 seconds, set the db.monitor.interval configurable with a command such as
p4 configure set db.monitor.interval=120
Tip