Kbase P57984: How to use a script to monitor WebSpeed local client buffer (-l) usage?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/15/2008 |
|
Status: Verified
GOAL:
How to use a script to monitor WebSpeed local client buffer (-l) usage?
GOAL:
Is there a way to monitor WebSpeed local client buffer usage?
FACT(s) (Environment):
WebSpeed 3.x
UNIX
Progress 9.x
OpenEdge 10.x
WebSpeed 3.1x
WebSpeed 3.0x
FIX:
To dump out some statistics of memory usage, using the -y parameter and SHOW-STATS 4GL command. However, by default, if specify -y on the command line, _progres will write to a file called client.mon. Change the file it writes to by setting a CLIENTMON environment variable. However, for WebSpeed, we don't have a chance to set a different CLIENTMON env var for each agent, so they will all try to write to the one file.
A solution for this is to write a wrapper script for spawning the agent, which
sets CLIENTMON using the PID. You would set this in the srvrExecFile in
ubroker.properties. This solution will mainly work for unix.
Following is a small script, we call it "wsmon":
#!/bin/sh
CLIENTMON=client.mon.$$;export CLIENTMON
$DLC/bin/_progres $*
#wsmon end
This sets a value for CLIENTMON for each agent, based on the PID. Then change
following entries in ubroker.properties:
srvrExecFile=$WRKDIR/wsmon # you can put wsmon anywhere
srvrStartupParam=-p web/objects/web-disp.p -weblogerror -y
The -y will cause _progres to write to the CLIENTMON file.
Whenever execute the SHOW-STATS 4GL statement, _progres will write information about programs and memory usage to the CLIENTMON file. Below is an excerpt of the part relevant to the memory usage:
Memory usage summary: Current Max Used Limit
(Bytes)
Stack usage (-s): 896 40944 40960
Local buffer usage: 8416 9152
R-code Execution Buffer: 927804 927804 3170304
If you were to modify web-disp.p (or maybe web-util.p) to run SHOW-STATS
after each request is complete, you see which program causes the local
buffer usage to grow.