Monday, October 29, 2012

Perforce admin commands

Some useful commands in case your Perforce ever gets hung.

p4 counters
If this displays monitor = 2, it means that you have monitoring enabled.

p4 monitor show
Shows perforce process ids, the owners of those processes, the current status/job type and how long they have been running.
p4 monitor show -ela | grep -v IDLE 
Shows a longer output. And removes the idle processes from the list.

p4 monitor terminate
If you find that any commands are running for a long time, you can delete them with this command.
p4 sync and p4 submit commands are not terminated this way because even though they may be long running, they do not hold excessive database locks and are not the cause of hung systems.

p4 admin stop
To stop perforce

p4 users
To show a list of Perforce users

p4 groups
Displays a list of Perforce groups.

p4 workspaces
Displays a list of client workspaces of all the Perforce users.

p4 opened -a
Displays a list of all opened files in all client workspaces

p4 info
Displays client information.

p4 lockstat
Displays the locks which are held by Perforce.

No comments: