Perforce Public Knowledge Base - Proxy Process or Thread Monitoring
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Proxy Process or Thread Monitoring

« Go Back


I need more information on my Perforce Proxy processes and activities.


Beginning with release 2013.1, the Perforce Proxy provides the ability to gather a snapshot of what a particular Proxy process or thread is doing (or was last doing). This new functionality enables Proxy administrators to gather the following information:
  • Data on current file transfer operations
  • Related client, proxy, and server commands
  • Overview of proxy workload
  • Status of current proxy process/threads
The proxy makes use of a new table, pdb.monitor, to store information about current activity. The pdb.monitor table gets created in the P4PCACHE directory used by the proxy. 


Configuring Proxy Monitoring

Two new flags to p4p to enable and control the behavior of proxy monitoring:
-v proxy.monitor.level=N 
Set the proxy monitoring level:
0: monitoring disabled (default)
1: monitor file transfers only
2: monitor all operations
3: monitor all traffic for all operations
-v proxy.monitor.interval=N 
Set the monitoring interval in seconds (default 10)
The monitoring interval defaults to 10 seconds and is configurable from 1 to 999 seconds.

Example p4p command line that enables proxy monitoring at level 3 and sets the monitoring interval to 100 seconds:
p4p -vproxy.monitor.level=3 -vproxy.monitor.interval=100 ...

When running the Perforce Proxy as a Windows service, use P4POPTIONS to pass the monitoring flags to the Perforce Proxy process (p4ps.exe):

p4 set -S "Perforce Proxy" P4POPTIONS="-vproxy.monitor.level=3 -vproxy.monitor.interval=100"

followed by a restart of the service to enable monitoring.  Run these options from the command line for each proxy server; do not use "p4 configure set".

Monitoring Proxy Activity

Once monitoring is enabled, monitor Perforce Proxy processes using the p4p -mN command:
-mN   Show currently-active connections and their status (requires '-vproxy.monitor.level' to be set to '1' or higher)

The p4p -mN command provides a snapshot of current proxy activity.  The -mN argument specifies the level of detail, where '-m1' shows less detail, and '-m3' shows the most. The p4p -mN command is run from the Perforce Proxy host machine, with its -r option specifying the P4PCACHE directory where the pdb.monitor table in maintained.  Note that the -mN flag is not used to start up a proxy. 
$ p4p -r /proxy/cache -m1
pid/thd  start_tm  func
8120     95:42:42  sync

$ p4p -r /proxy/cache -m2
pid/thd  client_addr  start_tm  func  snd2clnt  rcvfrmc  snd2svr  rcvfrms
8120    95:42:42  sync  2130      84       420      2466

$ p4p -r /proxy/cache -m3
pid/thd  client_addr  start_tm  func  faults  faultsmb  snd2clnt  rcvfrmc  snd2svr  rcvfrms  last_upd
8120    95:42:57  sync  95      95        2130      84       420      2466     95:42:17

Interpreting Monitoring Output

Here is a brief summary of the meaning of the monitoring output:
pid/thdProcess ID (pid) or thread ID (Windows only)
client_addrClient Address (user machine connected to proxy)
start_tmStart time--how long ago the pid/thread was started, in hours:minutes:seconds
last_updLast time the proxy was updated--how long ago the proxy received fresh information, in hours:minutes:seconds)
tfault#Count in-flight file faults (number of in-flight faults or cache misses)
tfaultmbCount in-flight Megabytes (size of in-flight faults)
send2clientNumber of messages sent from proxy to client
rcvfrmcNumber of messages received from client to proxy
snd2svrNumber of messages sent from proxy to server
rcvfrmsNumber of messages received from server to proxy

More details on proxy.monitor.level and proxy.monitor.interval can be seen in the Perforce Command Reference.
Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255