This chapter analyzes the listener log file and describes what is recorded in the listener log file. This chapter includes the following topics: bull; listener log audit trail information bull; Monitoring
This chapter analyzes the listener log file and describes what is recorded in the listener log file. This chapter includes the following topics: bull; listener log audit trail information bull; Monitoring
Analyze listening log files
This section describes what is recorded in the listener log file. This section contains the following topics:
• Listener log audit trail Information
• Listener service registration event information
• Direct Hand-Off information of the listener
• The Listener subscribes to the ONS node to disable event information.
• Listener Oracle cluster Notification Information
Listener log audit trail Information
The listener log file contains audit trail information, which can be used to collect and analyze network usage. It also includes the following information:
Client Connection Request
RELOAD, START, STOP, STATUS or SERVICES commands issued by the Listener Control Tool
You can use audit trail information to view trends and user activities. Specifically, the information is first stored in a table and then organized into the report format. To import data to a table, you can use an import utility, such as SQL * Loader.
Format of listener log audit trail Information
Audit Trail information follows the following format:
Timestamp * Connect Data [* Protocol Info] * Event [* SID | Service] * Return Code
The audit trail information has the following features:
Example 16-4 shows a log file segment that sends a reload command request.
Example 16-4 reload the listener log event
14-MAY-2009 00:29:54 *
(Connect_data = (cid = (program =) (host = sales-server) (user = jdoe) (command = reload)
(Arguments = 64) (service = listener) (version = 135290880 ))
* Reload * 0
For example, 16-5 shows a log file segment indicating successful connection requests.
Example of a listener log event with a successful connection request between 16 and 5
14-MAY-2009 15:28:58 *
(Connect_data = (service_name = sales.us.example.com) (cid = (program =) (host = sales-server)
(User = jdoe )))
* (Address = (protocol = tcp) (host = 192.168.2.35) (port = 41349) * establish
* Sales.us.example.com * 0
For example, 16-6 shows the log file segment of the sales server host that successfully executes the STATUS command. Next is the connection request attempt failure message sent by the client with the IP address 192.168.2.35. The connection request resulted in a ORA-12525 error: "TNS: listener has not supplied ed client's request in time allowed error message ". When the client fails to complete the connection within the time specified by the INBOUND_CONNECT_TIMEOUT_listener_name parameter of the listener. ora file, a ORA-12525 error is reported. This client may launch DOS attacks on the listener.
Example of a listener log event in which the connection request fails
03-MAY-2009 16:41:57 *
(CONNECT_DATA = (CID = (PROGRAM =) (HOST = sales-server) (USER = jdoe) (COMMAND = status)
(ARGUMENTS = 64) (SERVICE = LISTENER) (VERSION = 153092352) * status * 0
03-MAY-2009 16:42:35 * *
(ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.2.35) (PORT = 53208) * establish *
* 12525
TNS-12525: TNS: listener has not supplied ed client
Listener service registration event information
The listener records the Service Registration event information. During service registration, the PMON process provides the listener with the following information:
Registration Service-related events listed in Table 16-14 are recorded in listener. log.
Table 16-14 Service Registration Event Log Information
Event
Description
Service_register
The listener receives the registration information of an instance.
Service_update
The listener receives the updated service information of a specific instance, such as the scheduler or instance load information.
Service_died
Format of listener service registration information
The format of Service Registration Event Log information is as follows:
Timestamp * Event * Instance Name * Return Code
Service Registration fields have the following features:
L each field is separated by an asterisk (*).
L it is normal for an instance to appear multiple times in a row
L Code Zero is returned after successful registration, which means the client can connect to the instance
L if the registration fails, a code that can be mapped to the error message will be generated.
Example 16-7 shows the log file segment of the Service Registration event. After a successful service_register event, the listener can receive client requests. However, when the service_died event occurs, the listener cannot receive client requests.
Example 16-7 listener logs of service registration events
Listener direct Hand-Off information
The listener records the direct Hand-Off information sent to the scheduler. The information is formatted as follows:
Timestamp * Presentation * Handoff * Error Code
The features of direct Hand-Off information are as follows:
L each field is separated by an asterisk (*).
L code 0 is returned for successful connections or commands
L failed to generate a code that can be mapped to the error message
Example 16-8 shows a direct Hand-Off information in the log file.
Example 16-8 listener logs with direct Hand-Off information
0
Listener subscribes to ONS node Close event information
If the ONS configuration file is available, the listener subscribes to the Oracle Notification Service (ONS) node closing event during database startup. When the listener receives a node Close event from ONS, this subscription will delete the affected services from the listener. For this event notification, the listener uses asynchronous subscription.
If the subscription is incomplete, the following warning information is recorded in the listener log file every time the STATUS command is executed. For example, if the ONS daemon is not running on the host.
WARNING: subtasks for node down event still pending
Listener Oracle cluster Notification Information
If the required Oracle cluster (CRS mentioned in the following Log message) library is installed and Oracle Clusterware on the host is started, the Oracle listener notifies the Oracle cluster of the listener status. After the notification is successful, the listener records the event in the log. If the notification fails, no logs are recorded.