9.5.4 Monitoring Services of a Listener

The SERVICES command of the Listener Control utility provides detailed information about the services and instances registered with a listener and the service handlers allocated to each instance. To show information about the services and instances from the command line, enter:

lsnrctl SERVICES [listener_name]

Example 9-6 shows example output of the SERVICES command.

Example 9-6 Listener Control Utility's SERVICES Command Output

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=net)))
Services Summary...
Service "sales.us.example.com" has 1 instance(s).
  Instance "sales", status READY, has 3 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
      "D000" established:0 refused:0 current:0 max:10000 state:ready
         DISPATCHER <machine: sales-server, pid: 1689>
         (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=52414))
      "D001" established:0 refused:0 current:0 max:10000 state:ready
         DISPATCHER <machine: sales-server, pid: 1691>
         (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=52415))
Service "hr.us.example.com" has 1 instance(s).
  Instance "hr", status READY, has 2 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
      "D000" established:0 refused:0 current:0 max:10000 state:ready
         DISPATCHER <machine: sales-server, pid: 11326>
         (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=58361))
The command completed successfully

This output shows that two database services, sales.us.example.com and hr.us.example.com, are registered with the listener.

Client connection requests to sales.us.example.com are handled by two dispatchers named D000 and D001 and one dedicated server. All handlers have a status of ready, indicating that they are ready to receive connections.

Client connection requests to hr.us.example.com are handled by one dispatcher named D001 and one dedicated server.

The SERVICES command generates output with the following information as described in Table 9-2.

Table 9-2 Listener Control Utility SERVICES Command

Output Section Description

Services

The registered service.

Instance

The name of the instance associated with the service

The status field indicates if the instance can accept connections.

  • READY means the instance can accept connections.

  • BLOCKED means the instance cannot accept connections.

  • READY/SECONDARY means the is a secondary instance in an Oracle Real Application Clusters primary/secondary configuration and is ready to accept connections.

  • RESTRICTED means the instance is in restricted mode. The listener blocks all connections to this instance.

  • UNKNOWN means the instance is registered statically in the listener.ora file rather than dynamically with service registration. Therefore, the status is non known.

Handlers

The name of the service handler. Dispatchers are named D000 through D999. Dedicated servers have the name of DEDICATED.

This section also identifies the following about the service handler:

  • established: The number of client connections this service handler has established.

  • refused: The number of client connections it has refused.

  • current: The number of client connections it is handling, that is, its current load.

  • max: The maximum number of connections for the service handler, that is, its maximum load.

  • state: The state of the handler:

    - READY means the service handler can accept new connections.

    - BLOCKED means the service handler cannot accept new connections.