Using the accounting infrastructure you can track the resource consumption of the Web components of your application. You can collect statistics such as CPU time on all SAP Java Virtual Machines (JVMs) and allocated memory, and aggregate the consumed resources in a central accounting table.
To display the central accounting table, use these Telnet commands:
>add accounting >acc_list -s 3 desc
You can monitor the Web Container and the HTTP Provider services independently. The first one is enabled by default, while the second one needs to be activated. Both services log the collected statistics in the trace files:
com.sap.engine.services.servlets_jsp.Statistics for the Web Container service.
com.sap.engine.services.httpserver.HttpMemStatistic for the HTTP Provider service.
Enabling Resource Accounting
You can enable the accounting of the HTTP Provider service using the EnableRequestAccounting property. To change its value, use the following Telnet commands:
>setsp -p EnableRequestAccounting true http
To check the current value of this property, use the following Telnet command:
To configure the resource accounting of the Web Container service, replace http in the Telnet commands above with servlet_jsp .
Using the Collected Statistics
To display the statistics, you have to change the severity of System.out to debug:
Open the SAP NetWeaver Administrator.
From the Show list, select Tracing Locations .
In the Location field, enter the corresponding trace file ( com.sap.engine.services.servlets_jsp.Statistics or com.sap.engine.services.httpserver.HttpMemSatistic ) and choose Go .
Change the severity of the corresponding root location to Debug . Save the configuration. In the Pattern field you can find exactly which log contains the messages.
The statistics appear in the trace files in XML format.