![]() |
|
Pramati Server maintains logs for all kinds of error messages and configuration settings. These logs are very important to analyze any problems that might have occurred. Pramati server logs information into various files. These files can keep growing, especially in a production environment where there is a lot of activity on the part of the server, which can take up a lot of memory. Also, some of the logging information may not be relevant after some days. Pramati Server provides a Rotation policy of logging information. This way, new log files can be created based on certain criteria and old log files which may not be required are deleted.
The following log rotation policies are available:
Using this screen, you can set the Rotation Policy and the Log Deletion Policy. The Rotation Policy can be set by file size, by time, or by both time and size. Set the maximum file size in kilobytes and the time after which a new file is to be generated. By default, the maximum file size is set at 10000Kb, and the time is set at 168 hours.
You can also set the time after which the log file can be deleted. There are two policies for deleting the archived log files:
Whenever there are older log files with respect to the set age limit or the total size of log files exceed the set limit, the archived log files are deleted.
Save the settings. The Server keeps track of all the logs based on the new settings.
Request Tracing logs information about various states the request goes through in addition to the entry and exit point information logged by Request Sniffing.
<request-sniffing enableSniffing="false" enableTracing="false" defaultOutputFile="sniff.log"/>
shell@start_request_sniff [-trace] [-file <output_filename>]
To turn it off, use shell@stop_request_sniff
##<WEB/EJB/JMS><REQUEST/RESPONSE/TRACE> Thread ID Timestamp [System generate ID]
Followed by more information on the subsequent lines.
A request has additional information. Consider the iBank application which contains the following information:
client ID= "127.0.0.1" context = "bank" URI = "bank/transfer.jsp"
Response includes just the response details. In case of Web, it includes be the response headers.
## WEB RESPONSE Thread-15 1:24:27 PM ID:1077350067734 Client Id =127.0.0.1 Context =/ URI =/OrderBookWeb/ Details =HTTP/1.1 404 The requested resource was not found. Please check the URI above. Server: Pramati Server Date: Sat, 25 Feb 2006 07:54:28 GMT Content-Length: 1125 Content-Type: text/html Connection: Keep-Alive
A JMS Request Sniff looks as below:
## JMS REQUEST RMI TCP Connection(75)-192.168.1.29 4:42:49 PM ID:1077534769960 Client Id =192.168.1.29-502058352 Context =sendMessage msgId:ID:1673361:1077534769340:192.168.1.29:destination:QUEUE: JMSQueue URI =sendMessage Details =sendMessage ## ## JMS RESPONSE RMI TCP Connection(75)-192.168.1.29 4:42:49 PM ID:1077534769960 Client Id =192.168.1.29-502058352 Context =sendMessage msgId:ID:1673361:1077534769340:192.168.1.29:destination:QUEUE: JMSQueue URI =sendMessage Details =sendMessage done ##
In the above sniff log generated:
In case of a Web request, the request context can comprise of:
context = App context URI = URI requested Client Id= Client's IP Address
With the request context set, the state of the request is recorded as it goes through various processing stages. In case of an EJB request, the request context can comprise of:
context = Jar Name URI = bean name + method invoked + pk client Id = principal
In case of a resource, the request context can be the JNDI name of the resource.
You can view logs for three security levels: info, warning, and severe (or all), and set the number of logs to be displayed on each page. Enter the number of log messages to be viewed and click Display. The following details are displayed for the logs:
Table 1: Web Activity Logs
| Field | Description |
|---|---|
| Level | Displays the level of security chosen for the log. |
| Time | Displays the date and time when the log was recorded. |
| Context | Displays the services for which the log was recorded. |
| Message | Displays the logged message. |
| Report | Displays the complete log report. |
Logs can be viewed by using any text editor.
Table 2: Error data maintained by Server
| Field | Description |
|---|---|
| Message | The Message |
| Time | Time at which the error occurred |
| Level | The Level of severity |
| Context | The Context |
| MessageID | The server assigns a message ID for every message logged |
The report presents details regarding:
Execution Path The Execution Path displays reports regarding:
Table 3: Execution Path report
| Fields | Description |
|---|---|
| Level | Displays the level of security for the log. |
| Context | Displays the services for which the log was recorded. |
| ID | Displays the ID of the message. |
| Message | Displays the logged message. |
Events/Debug The Events/Debug section displays reports regarding:
Table 4: Events Debug report
| Fields | Description |
|---|---|
| Type | Displays the level of security for the log. |
| Description | Displays a description for the alert. |
Stack Trace Clicking on the Stack Trace link displays the actual stack trace of the error. Details provided are:
Table 5: Stack Trace
| Field | Description |
|---|---|
| ID | Displays the ID of the error message. |
| Description | Displays the error message description thrown by the Server. |
| Stack Trace | Displays the actual stack trace. |
Tracing helps users in debugging an application at run-time. To turn it on from the shell at the command prompt, type trace.
Provide the details regarding the logs you want. The properties specified in the trace.props file enable the following:
To turn on trace at run time, at command prompt type: trace load. To unload trace properties, at the command prompt type: trace unload.
Stack Trace The Stack Trace section displays the ID of the Alert, the description, and the stack trace that was generated as a result of the action that led to the alert.
Consider the following trace output:
#util.timing.TimerCalculator-->[Info]Diagnostics status for TimingCalculator with name: Servlet/pramati_adminconsole.war/doc_root/message_server/persistent_store/datasources/operation/create_step2_DataSource.jsp/serviceMethodTime and TimingLocation: Servlet:serviceMethodTime is: false #util.timing.TimerCalculator-->[Info]Diagnostics status for TimingCalculator with name: Servlet/pramati_adminconsole.war/doc_root/com.pramati.admin.webview.j2ee.DeployExplodedApplication/serviceMethodTime and TimingLocation:Servlet:serviceMethodTime is: false #util.timing.TimerCalculator-->[Info]Diagnostics status for TimingCalculator with name: Servlet/pramati_adminconsole.war/doc_root/com.pramati.admin.webview.j2ee.DeployExplodedApplication/serviceMethodTime and TimingLocation :Servlet:serviceMethodTime is: false
Interpreting Trace Output
Table 6: Interpreting Trace Outputs
| Symbol | Purpose |
|---|---|
| # | Followed by the package context from which the trace originates. |
| --> | Followed by the actual trace message. |
| Encloses the severity level for each trace message. |
Main message ID: DEPLOY0303; Result: Failed;Description: Error while starting application StockMarket.ear;Tip: Messages Trace: RES0414; Could not obtain administered object [jms/QueueConnectionFactory] of type [javax.jms.QueueConnectionFactory] on jms server [default];(resource.JMSResourceDesignate);Tip: Exception Stacks: ID:(+RES0408)com.pramati.services.resource.ResourceException: Could not obtain administered object [jms/QueueConnectionFactory] of type [javax.jms.QueueConnectionFactory] on jms server [default] com.pramati.services.resource.ResourceException: Could not obtain administered object [jms/QueueConnectionFactory] of type [javax.jms.QueueConnectionFactory] on jms server [default] at com.pramati.resource.JMSResourceDesignate.getBindObject(JMSResourceDesignate.java:753) at java.lang.reflect.Method.invoke(Native Method) Event & Debug Traces.. D::Inside checkPermission() Checking permission - [Type = com.pramati.util.security.permissions.ServerAppPermission Name = StockMarket.ear Actions = start] ::(security.core.JAASServerAccessController) D::Inside checkPermission() Subject-nobody has allPermission. granted - [Type = com.pramati.util.security.permissions.ServerAppPermission Name = StockMarket.ear Actions = start]::(security.core.JAASServerAccessController)
Table 7: Interpretation of the tags in the server log
| Tag name | Description |
|---|---|
| Record | Represents an atomic block called action. i) ID: Displays the time stamp and the record number ii) Time: Time stamp iii) Id: Main message key iv) Desc: The result of the action |
| Message | An element of action that represents error or success. Contains information on events that lead to the result. |
| Event | An element of action that represents debug statements in the context of messages within the action. |
| Exception | Contains the exception stack trace in case of a failure. |
| © Pramati Technologies 2007 | Runs on Pramati Server | Feedback | Legal |