Saturday 18 December 2010

How to Monitor a Swamped Perforce Server

How to monitor a swamped Perforce server not responding to p4 monitor show commands. In most circumstances, you can run the p4 monitor command to identify the client processes currently running on your Perforce Server. However, it is possible that a long-running Perforce command can block other Perforce processes, including the p4 monitor request.

It is possible to prevent the blocking of p4 monitor on a Perforce Server running on UNIX or MacOS (or other operating systems that natively support symbolic links). To do so, you must create a new Perforce Server instance that shares the db.monitor table by means of a symlink.

Below is an example of configuring a new "monitor server". Note the new monitor server runs in a different P4ROOT (/perforce/monitor) location and on a different port (1999) than the production server. # Create a new monitor server P4ROOT directory #mkdir /perforce/monitor# Link the production server monitor table into the new P4ROOT directory#ln -s /perforce/production/db.monitor /perforce/monitor/db.monitor# Start up the new "monitor server" (with journaling off)#p4d -r /perforce/monitor -J off -p 1999 -d# Remember to enable monitoring by setting the monitor counter to 1 on the new server#p4 -p 1999 counter -f monitor 1# Stop and restart the monitor server for the new monitor setting to take effect#p4 -p 1999 admin stopp4d -r /perforce/monitor -J off -p 1999 -dOnce the monitor server instance is set up (as above), you can then monitor your production server by running the p4 monitor command on the new monitor server. For example: p4 -p 1999 monitor show

View the original article here

No comments:

Post a Comment