Previous Contents Index DocHome Next |
iPlanet Application Server Administrator's Guide |
Chapter 4 Logging Server Messages
This chapter describes the message-logging service provided by iPlanet Application Server.The following topics are included in this chapter:
About the Logging Service
About the Logging Service
You can enable the logging of server messages using the iPlanet Application Server message-logging service. The logging service is configured through the iPlanet Application Server Administration Tool Logging window. Here you can specify the destination and types of messages logged.When you enable logging, iPlanet Application Server records messages generated by iPlanet Application Server application-level and system-level services. These messages describe the events that occur while a service is running. For example, each time iPlanet Application Server communicates with the database, the logging service records the resulting messages generated by database access service. Log files are stored in different servers. Logs pertaining to administration and deployment are stored in the Administration Server, known as KAS. The other servers that store message and event logs are KJS (Java Server), KCS (C++ Server) KXS (Executive Server). KAS starts the other three servers and monitors their activities.
This section includes the following topics:
To Determine Types of Messages to Log
To Determine Types of Messages to Log
You can log any of the three types of messages generated by iPlanet Application Server services. Each type is described in the following table:
With the logging service, you can record error messages, error and warning messages, or all messages. To choose which type of messages to log, perform the following tasks:
Click Logging on the iPlanet Application Server Administration Tool (iASAT) toolbar to open the Logging window.
In the left pane of the Logging window, select the iPlanet Application Server node for which you want to specify log settings.
In the right pane of the Logging window, click the Server tab. The following dialog box appears:
Mark the Enable Server Event Log checkbox, to enable event logging.
In the General pane, from the Message Type drop-down box, select one of these; Errors, Errors and Warnings, All Messages.
In the Maximum Entries text field, specify the maximum number of entries that can exist before data is written to the log.
In the Write Interval field, enter the amount of time (in seconds) that elapses before data is written to the log.
Logging Application Messages
Message logging is also useful for tracking and debugging application errors. By using the log( ) method, application developers can send messages to the same log destination that the server administrator configures for iPlanet Application Server services.For example, if an application encounters a problem in a segment of code, you can log the associated error message. Informational messages about the application's status, rather than error messages, are also useful.
How Log Messages Are Formatted
Every log message has the following four components:
date and time the message was created
When a log message is sent to the text-based destination logs, it is formatted as follows:message type, such as information, warning, or error
[Date and time of message] Message type: Service ID: Message text
For example, the following messages sent to an ASCII text file illustrate message format:
[01/18/00 11:11:12:0] info (1): GMS-017: server shutdown (host 0xc0a801ae, port 10818, group 'iAS') - updated host database
[01/18/00 11:11:18:2] warning (1): GMS-019: duplicate server (host 0xc0a8017f, port 10818) recognized, please contact iPlanet Communications for additional licenses
Determining the Logging Destination
You can configure the logging service to record server and application messages in any or all of the destinations described in the following table:
When you enable logging, the logging service automatically sends messages to the process consoles on Windows and Solaris platforms, as long as those consoles are open and console logging is enabled. On Windows, the logging service also sends messages to the application log. Logging to a process console does not record the messages. You cannot retrieve the messages once they scroll off of the screen.
To enable the logging service and specify the destination of the log messages, perform the following tasks:
Click Logging on the iASAT toolbar to open the Logging window.
iPlanet Application Server uses a log buffer to store messages before they are written to the application log, an ASCII file, and/or database logs. If a log is updated continuously, the time taken for this effort will negatively affect the performance of the application server. This buffer limits the use of resources by storing messages, till a log is updated. The buffer is written to the destination when either the buffer interval times out or the number of entries in the buffer exceeds the maximum number allowed.Select the iAS node for which you want to specify log settings.
In the right pane of the Logging window, click the Server Event tab.
In the Server Event tab, mark the Enable Server Event Log checkbox.
In the Log Target box, choose the type of logging to enable, by marking the required checkboxes:
- If you chose to log to a file, that file is created now. See To Rotate Log Files for information about managing log files.
- See To Log to a Database in the following section and To Log to a File for more information.
To Log to a Database
If you want to log application server messages to a database, you need to create an event log database table. The following table describes the four field names and lists each field's data type.
Table 4-3    Logging to a Database Table
Database field name
Description
Data type
The logging service maps the message components to the database fields listed in the table. You must use these exact field or column names in your database table.
To log to a database, perform following tasks:
Click Logging on the iASAT toolbar to open the Logging window.
In the left pane of the Logging window, select the iAS node for which you want to specify log settings.
In the right pane of the Logging window, click the Server Event tab.
In the Server Event tab, mark the Enable Server Event Log checkbox.
In the Log Target box, click the Log to Database checkbox, as shown in the following figure:
In the General box, from the Message Type drop-down box, select Errors, Errors and Warnings, or All Messages.
- Specify the data source, the database name, the table name, and the user name and password necessary for accessing the database.
To Log to a File
iASAT's monitoring service allows you to log information about server activity to a file.To log information to a file, perform the following tasks:
Click Logging on the iASAT toolbar to open the Logging window.
In the left pane of the Logging window, click the Server Event tab.
In the Server Event tab, mark the Enable Server Event Log checkbox.
In the Log Target pane, mark the Log to File checkbox.
In the Log to File text field, enter the name of the log file.
In the General box, from the Message Type drop-down box, select Errors, Errors and Warnings, or All Messages.
To Rotate Log Files
Log files can be rotated when a set period ends. For example, you can specify that your log files are rotated every 10 days, or every Wednesday, so that only the current logs exist in the log file. Since log files are stamped with the time and date on which they are created, log file rotation helps organize them into manageable units.If you choose to record server messages in an ASCII file, you can enable log file rotation to regulate the entries periodically.
To configure log file rotation, perform the following tasks:
Click Logging on the iASAT toolbar to open the Logging window.
Select the iPlanet Application Server node for which you want to specify log settings. The following figure appears:
In the right pane of the Logging window, click the Server Event tab.
In the Server Event tab, select the Enable Server Event Log checkbox.
Mark the Log to File checkbox.
Choose Yes from the Enable File Rotation drop-down list.
Select the interval at which log files are to be rotated, from the Rotation Interval drop-down list. You can also enter a string to indicate when the log file is rotated.
In the General pane, from the Message Type drop-down box, select Errors, Errors and Warnings, or All Messages.
- For instance, the following string indicates logging to a new file begins at 1:00 AM every Monday, as well as on the fifteenth of each month:
- 1:0:0 1/15/*
- The following string indicates logging to a new file begins at 2:00 AM, 5:00 AM, 6:00 AM, and 7 AM every Friday:
- 2, 5 - 7:0:05/*/*
About Web Server Requests
You can use the iPlanet Application Server logging service to log web server requests. Web server requests are monitored by the Web Connector Plug-in. The plug-in sends requests to your iPlanet Application Server instance, where they are processed. By logging web server requests, you can track request patterns and other important request information.This section includes the following topics:
How Web Requests Are Logged
How Web Requests Are Logged
A web server request is divided into components. These components are standardized HTTP variables used by the web server to manage web requests. iPlanet Application Server includes a subset of these HTTP variables for you to log. You can add variables to the list if you need to log additional information.
Note On both Windows and Solaris systems, you can use supplied scripts that automatically set up the HTTP log and event log tables. See To Log to a Database, for more information.
Each HTTP variable must be mapped to a database field name within a table that you create. For instance, to log the length of the content of a web server request, map the CONTENT_LENGTH variable to a database field named, for example, content_length and defined as a text data type. The default HTTP variables used by iPlanet Application Server and their database data types are listed in the following table. Use this table to help you create the database table for logging web requests.
You can rename all the database field names except the logtime fieldname in the database table. The logging service maps that time that the message was created to the logtime database field.
The fields from the database table are automatically mapped to web server variables in the registry.
You must have a web server communication plug-in module such as NSAPI or ISAPI installed and properly configured.
To Log Web Server Requests
Before you can log web server requests, you must create a database table to hold the request messages. For more information about creating this table, see How Web Requests Are Logged.To log web server requests, perform the following tasks:
Click Logging on the iASAT toolbar to open the Logging window.
From the left pane of the Logging window, select the iPlanet Application Server responsible for logging web server requests.
In the right pane of the logging window, click the HTTP tab.
- If you have more than one instance of iPlanet Application Server, you can specify one server to log all web server requests.
Enter httplog in the Data Source field.
Provide the information you use to connect to the database in the Database field. For example, this would be the Oracle SID for an Oracle database.
In the Table Name field, enter httplog.
Provide the user name and password with which you connect to the database.
Enter a number in the Maximum Entries field. This number represents the greatest number of entries that can exist before data is written to the log.
Specify the required value in the Write Interval text field.
Click Apply Settings to save your changes.
- This number represents the amount of time that lapses before data is written to the log.
About The Administration Server
The administrative services of iPlanet Application Server run in the Administration Server process (KAS) This Administration Server enables remote administration of servers and applications. KAS also supports other services, such as application partitioning, event logging, request monitoring, and dynamic configuration of key server settings. Clients that access administrative services include iASAT, Directory Server and third party SNMP agents.Some of the events that are monitored and logged by KAS are listed below:
Server login and logout details.
Initialization status, startup, shutdown, enabling and disabling of server and engines.
Issues related to KAS, SNMP, Transaction Manager and engines.
Issues related to iPlanet Application Server installation.
Deployment actions and errors during deployment.
Errors that may occur when retrieving configuration parameters for LDAP, databases, database clients, transactions, resource manager, logging, load balancing, engines and KAS.
Administration Server Logging
By default, KAS messages can be viewed in your command prompt. See About Monitoring iPlanet Application Server Log Files for more information. However, if you want to record all KAS messages in a log file, you need to specify enable KAS logging to file.When you enable logging to file using the iPlanet Application Server Administration Tool, messages pertaining to KJS, KXS and CJS are logged. However, as KAS manages all the server engines and other administrative aspects, the messages that are generated can be voluminous. On Solaris, all KAS messages are logged to file, by default. On the Windows platform, you need to enable the file logging of KAS messages separately.
To enable KAS logging to file on the Windows platform, do as follows:
Open Control Panel and double-click the System icon.
KAS log messages are logged in the file KAS.log which can be found in the following path:Navigate to the Environment tab.
Locate the IAS_KASLOGFILE variable, in the System Variables list.
<iASInstallDir>/ias6/ias/logs/
About DSync Logging Options
iPlanet Application Server supports Distributed Data Synchronization (DSync) across multiple iPlanet Application Server for partitioned and distributed applications. DSync provides cluster management and data synchronization across iPlanet Application Server processes. iASAT provides for logging of DSync messages.For more information about distributed data synchronization, see This section includes the following topics:
How DSync Messages Are Logged
In addition, you can dump cluster and DSync node data into iasdsync-cluster-XXX.log and iasdsync-node-XXX.log files respectively, where XXX represents the port number of an engine.
DSync provides a component based architecture that allows you to choose which components you want to log. All DSync debug messages appear in KXS, KCS, and KJS log files. DSync debug components are the following:Module: Provides data management and appends other DSync components to the log file. When enabled, the methods executed by DSync are logged.
Failover: Provides cluster membership management. When enabled, interactions between servers and how roles change due to failure of servers/engines/network connection are logged.
Token: Provides distributed lock management features. When enabled, interactions between servers for read/write tokens associated with DSync nodes are logged.
Timeout: Provides life cycle management of DSync nodes per timeout specification. When enabled, nodes that are deleted due to timeout are logged.
Messenger: Provides message communication between iPlanet Application Server servers. When enabled, messages that are created, sent, received and processed are logged.
Format of the Cluster Dump Files
Each iasdsync-cluster-XXX.log file consists of the following sections:The cluster information reports how an engine views the current Dsync cluster as follows:
SyncLocal[2]: 0xd00c3643:10822
The message queue information displays the list of messages that are in the DSync queues as follows:
****************************************
*DSync RecvQueue for GXP_DSYNC protocol
****************************************
Message[1]: GXDSYNC_MSG_RECLAIM_RDTOKEN(/dsync41test/K/5)from 0xd00c3643:10818
Format of the DSync Node Dump Files
Each iasdsync-node-XXX.log consists of the following sections:The message queue information displays the list of messages that are in the DSync queues as follows:
****************************************
*DSync RecvQueue for GXP_DSYNC protocol
****************************************
Message[1]: GXDSYNC_MSG_RECLAIM_RDTOKEN(/dsync41test/K/5)from 0xd00c3643:10818
The node data section displays the collection of nodes stored in an engine as follows:
Status: without Read or Write Token
Status: without Read or Write Token
Owner Thread: 0xf6f040 (Id=0xf78d50)
Standard wait queue[1] thread 0xf88670 (Id=0xf883a0)
Standard wait queue[1] thread 0xf89d60 (Id=0xf89a90)
The timeout manager section displays the set of nodes that are managed by DSync timeout manager in the current engine as follows:
****************************************
****************************************
Entry[0]: ID=/dsync41test/S/4, expired 6 seconds ago
Entry[1]: ID=/dsync41test/U/4, expired 4 seconds ago
Entry[2]: ID=/dsync41test/W/4, expired 3 seconds ago
Entry[3]: ID=/dsync41test/V/4, expired 3 seconds ago
Entry[4]: ID=/dsync41test/X/4, expired 3 seconds ago
Entry[5]: ID=/dsync41test/D/5, expired 2 seconds ago
Entry[6]: ID=/dsync41test/Z/4, expired 2 seconds ago
Entry[7]: ID=/dsync41test/A/5, expired 1 seconds ago
Entry[8]: ID=/dsync41test/B/5, 0 seconds till expiration
Entry[9]: ID=/dsync41test/C/5, 0 seconds till expiration
Entry[10]: ID=/dsync41test/E/5, 0 seconds till expiration
Entry[11]: ID=/dsync41test/F/5, 1 seconds till expiration
Entry[12]: ID=/dsync41test/H/5, 2 seconds till expiration
To Log DSync Messages
To log DSync debug messages, perform the following tasks:
Click Logging on the iASAT toolbar to open the Logging window.
From the left pane of the Logging window, select the iPlanet Application Server responsible for logging DSync messages.
In the right pane of the logging window, click the DSync tab.
Specify the DSync components you want to log. See Format of the DSync Node Dump Files for more information on DSync components that you log.
(Optional) Click Dump Cluster Info to dump DSync state cluster information to a iasdsync-cluster-XXX.log file where XXX is the port number of an engine.
- When specifying DSYNC components, you do not have to shutdown and restart iPlanet Application Server for changes to take affect.
(Optional) Click Dump Node Info to dump DSync state node information to a iasdsync-node-XXX.log file where XXX is the port number of an engine.
- For information about the format of this log file, see Format of the Cluster Dump Files.
- For information about the format of this log file, see Format of the DSync Node Dump Files.
About Monitoring iPlanet Application Server Log Files
This section describes how application server logs can be viewed, on Windows and Solaris systems. Reviewing log files is often helpful when troubleshooting application and server configuration problems. The following sections describe in detail how you can monitor iPlanet Application Server logs on both Windows and Solaris systems.This section includes the following topics:
To Monitor Application Server Logs on Windows
To Monitor Application Server Logs on Windows
To enable display of application server logs on NT, perform the following tasks:
From the Start menu, select Settings>Control Panel
When you do this, you will see iPlanet Application Server logs messages displayed in MSDos windows. Each physical process in iPlanet Application Server will be displayed in a separate window. For example, you can see KAS logs, KJS logs and KCS logs in separate windows.Double-click the Services icon. The Services window appears, as shown in the following figure:
Select iPlanet Application Server 6.0.
Click Startup. The Service window appears, as shown below:
Mark the Allow Service to Interact with Desktop checkbox, as shown in the figure.
In the Services window, click Stop to stop iPlanet Application Server.
To Enable Vertical Scroll Bars In The Output Windows
The log messages that you view on the MSDos windows will scroll continuously. To You can enable vertical scroll bars in the output windows, and scroll backwards and forwards to view the messages you want. To enable vertical scroll bars in MSDos windows, perform the following tasks:
Click the MSDos icon at the upper-left corner of the output window.
Choose Properties. The Properties window appears, as shown in the following figure:
Set the Screen Buffer Size Height to 200 or more.
Click OK to register your changes. A confirmation window appears, as shown below:
To enable scroll bars on all MSDos windows, mark the Save Properties for future windows with same title radio button.
To Monitor Application Server Logs On Solaris
On Solaris, you can view iPlanet Application Server logs by using a command line tool. Using this tool, you can selectively view the messages you want. For example, you can view messages generated during a specific period, or view only the first few messages in a file.To monitor iPlanet Application Server logs on Solaris, perform the following tasks:
Navigate to the following path:
To stop the command execution, press CTRL+C.
Type tail - and the filename of the log file that you want to view. For example, to view KJS logs, type tail -kjs.
- <iasinstsall>ias/logs
.
Note Open a terminal window and type man tail for a complete list of all the options you can try with the tail command.
Previous Contents Index DocHome Next
Copyright © 2001 Sun Microsystems, Inc. Some preexisting portions Copyright © 2001 Netscape Communications Corp. All rights reserved.
Last Updated November 09, 2001