Request metrics example
In this example, the HitCount servlet and the Increment enterprise bean are deployed on two different appserver processes.
- The Web server and the Web container tier run 192.168.0.150
- The EJBs container tier runs on 192.168.0.160
- The client requests are sent from 192.168.0.4
One source IP filter (192.168.0.4) is enabled and can trace requests that originate from machine 192.168.0.4 through...
http://192.168.0.150/hitcount?selection=EJB&lookup=GBL&trans=CMTRequests that originate from any other machines are not traced.
Enable request metrics and set trace to at least 3 hops, (writing request traces at process boundaries.
Send requests....
http://192.168.0.150/hitcount?selection=EJB&lookup=GBL&trans=CMT...through the HitCount servlet from machine 192.168.0.4.
In this example, at least three trace records are generated:
- Trace for the Web server plug-in goes to...
192.168.0.150:PLUGINS_ROOT/logs/web_server_name/http_plugin.log )- Trace for the servlet display goes to...
192.168.0.150:$WP_PROFILE/logs/appserver/SystemOut.log)- A trace record for the increment bean method invocation displays in the appserver log file...
192.168.0.160:$WP_PROFILE/logs/appserver/SystemOut.logSample output on 192.168.0.150...
PLUGIN:
parent:ver=1, ip=192.168.0.150, time=1016556185102, pid=796, reqid=40, event=0
current:ver=1, ip=192.168.0.150, time=1016556185102, pid=796, reqid=40, event=1 type=HTTP detail=/hitcount elapsed=90 bytesIn=0 bytesOut=2252 Application Server (web container tier)
PMRM0003I: parent:ver=1, ip=192.168.0.150, time=1016556185102, pid=796, reqid=40, event=0
current:ver=1,ip=192.168.0.150,time=1016556186102,pid=884,reqid=40,event=1 type=URI detail=/hitcount elapsed=60Sample output on 192.168.0.160...
PMRM0003I: parent:ver=1, ip=192.168.0.150, time=1016556186102, pid=884, reqid=40, event=1 - current:ver=1, ip=192.168.0.160, time=1016556190505, pid=9321, reqid=40,event=1, type=EJB, detail=com.ibm.defaultapplication.Increment.increment elapsed=40
Related tasks
Monitor application flow
Why use request metrics?