Using the "-zprog" Flag To Track Server Processes

How can I tell which P4 command started a process on the server?

Info & Tags

Article #:
679
Created:
03/07/07
Modified:
01/09/08

TASK

Flagging a command so you can easily track it's progress using p4 monitor commands.

SOLUTION

Use the "-zprog" global option to change the client name reported to the server to something less generic. For example, issuing this command:
p4 -zprog=track_me integ -n //depot/old/... //depot/new/...
As a super user, issue the command
p4 monitor show -e
Which produces this output:
4598 P4Win/v57 10.0.0.226  R albert   albzut1  10558:56:55 change
6031 p4/2006.2 10.0.0.186  R albert   albnod   3410:01:02 admin
7124 p4/2006.2 10.0.0.186  R albert   albnod1  10941:01:55 change
8365 p4/2006.2 10.0.0.186  R albert   albnod   3021:08:31 integ
9250 track_me/ 10.0.0.186  R albert   albnod   00:00:01 integ 
9252 p4/2006.2 10.0.0.186  R albert   albnod   00:00:00 monitor
The command labeled "track_me" is associated with PID 9250.

Note:
You're not limited to "track_me" as an identifier -- you can use as many identifiers as you need for any p4 command, whether it's from a script or trigger, or an individual user.