(summary) Oracle monitoring service LSNRCTL parameters and query status
Lsnrctl command Common parameters in detail:
Lsnrctl
Start
Start the specified listener
Stop
Close the specified listener
Status
Displays the status of the listener. The status command shows whether the listener is active, the location of the log and trace files, how long the listener has been running, and the tasks that the listener listens to. As shown in the following:
Services
Enumerates service information for listeners, such as whether they have any dedicated pre-built server processes or scheduling processes associated with them, and how many connections per service have been accepted or rejected. This method is used to check whether a listener is listening on a specified service.
Lists a summary table of services and the number of connection information that is established and rejected for each protocol service handler.
Version
Displays the versions of the Oracle NET Software and protocol adapters.
Reload
Reload the listener, re-read the Listener.ora file, but do not close the listener. If the file has changed, refresh the listener again.
Save_config
When the Listener.ora file is modified from the Lsnrctl tool, a Listener.ora file called Listener.bak is copied.
Trace
Turn on the tracking characteristics of the listener.
Change_password
Allows the user to modify the password required to close the listener.
Quit
Exit the Lsnrctl tool.
Exit
Exit the Lsnrctl tool.
set*
Password
Specifies the password required to perform administrative tasks in the LSNRCTL command-line tool.
Rawmode
DisplayMode
Trc_file
Specifies the location of the listener trace information. The default setting is $ORACLE_HOMENETWORKTRACELISTENER.TRC
Trc_directory
Trc_level
Trace level
off– The tracing feature is not enabled. OFF is the default setting.
user– sets the trace to the appropriate level for the user. Trace to identify the error condition caused by the user.
admin– sets the trace to the appropriate level for the database administrator. Trace to identify a specific installation issue.
support– sets the tracking to the appropriate level for customer support. Trace files can become very large.
Oracle Corporation recommends turning off tracing when network problem diagnostics are not in progress.
Log_file
Specifies where a listener will write the log information. This parameter is on by default, and defaults to%oracle_home%networkloglistener.log
Log_directory
Log_status
Current_listener
Inbound_connect_timeout
Defines the effective response time that the listener waits when a session gets started. The default setting is 10 seconds.
Startup_waittime
Defines how long the listener will wait before responding to a status command in the LSNRCTL command-line tool.
Save_config_on_stop
Specifies whether changes that occur during a LSNRCTL session period should be saved when exiting.
show*
Rawmode
Displays more detailed information about status and service (when they are set to ON) the value is on or off.
DisplayMode
Set the display mode of the Lsnrctl tool to raw, compact, normal, or verbose
Service display mode is normal
Rules
Trc_file
Specifies the location of the listener trace information. The default setting is $ORACLE_HOMENETWORKTRACELISTENER.TRC
Current_listener
The current listener is Listener2
Inbound_connect_timeout
Defines the effective response time that the listener waits when a session gets started. The default setting is 10 seconds.
Startup_waittime
Defines how long the listener will wait before responding to a status command in the LSNRCTL command-line tool.
Snmp_visible
Save_config_on_stop
Specifies whether changes that occur during a LSNRCTL session period should be saved when exiting.
Lsnrctl Partial Query Status:
lsnrctl> Status
Connecting to (Description= (address= (protocol=tcp) (Host=ocm1.oracle.domain) (port=1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version Tnslsnr for Linux:version 10.2.0.1.0–production
Start Date 17-may-2011 21:03:40
Uptime 0 days 0 hr. 2 min. sec
Trace level off
Security on:local OS Authentication
SNMP OFF
Listener Parameter File/u01/app/oracle/product/10.2.1/db/network/admin/listener.ora
Listener Log File/u01/app/oracle/product/10.2.1/db/network/log/listener.log
Listening Endpoints Summary ...
(Description= (address= (protocol=tcp) (Host=ocm1.oracle.domain) (port=1521)))
(Description= (address= (protocol=tcp) (Host=ocm1.oracle.domain) (port=1522)))
(Description= (address= (protocol=tcp) (Host=ocm1.oracle.domain) (port=1600)))
Services Summary ...
Service "POD" has 1 instance (s).
Instance "POD", status ready, have 1 handler (s) for the This service ...
Service "Pod1″has 1 instance (s).
Instance "POD", status UNKNOWN, have 1 handler (s) for the This service ...
Service "PODS" has 1 instance (s).
Instance "POD", status ready, have 2 handler (s) for the This service ...
Service "POD_XPT" has 1 instance (s).
Instance "POD", status ready, have 1 handler (s) for the This service ...
Service "Repos" has 2 instance (s).
Instance "repos", status UNKNOWN, have 1 handler (s) for the This service ...
Instance "Repos", status ready, have 1 handler (s) for the This service ...
Service "REPOS_XPT" has 1 instance (s).
Instance "Repos", status ready, have 1 handler (s) for the This service ...
The command completed successfully
Status detailed
Listening Endpoints Summary ...
(Description= (address= (protocol=tcp) (Host=ocm1.oracle.domain) (port=1521)))
(Description= (address= (protocol=tcp) (Host=ocm1.oracle.domain) (port=1522)))
(Description= (address= (protocol=tcp) (Host=ocm1.oracle.domain) (port=1600)))
#此处说明该主机地址为ocm1. Oracle.domain, the open listening port is 1521,1522,1600
Services Summary ...
Service "POD" has 1 instance (s).
Instance "POD", status ready, have 1 handler (s) for the This service ...
#此处说明有一个服务名POD的服务, the DB instance name is pod and status ready indicates that it is currently registered dynamically
Service "Pod1″has 1 instance (s).
Instance "POD", status UNKNOWN, have 1 handler (s) for the This service ...
#此处说明有一个服务名为POD1的服务, the instance name of the database is pod, state unknown indicates that it is currently statically registered
Service "PODS" has 1 instance (s).
Instance "POD", status ready, have 2 handler (s) for the This service ...
#此处说明有一个服务名为PODS的服务, the DB instance name is pod, and state ready indicates that it is dynamically registered
Service "Repos" has 2 instance (s).
Instance "repos", status UNKNOWN, have 1 handler (s) for the This service ...
Instance "Repos", status ready, have 1 handler (s) for the This service ...
The command completed successfully
#此处说明有一个服务名为repos的服务, the corresponding DB instance is a Repos,unknown,ready state stating that it currently has a static registration and a dynamic registration
lsnrctl> Services
Connecting to (Description= (address= (protocol=tcp) (Host=ocm1.oracle.domain) (port=1521)))
Services Summary ...
Service "POD" has 1 instance (s).
Instance "POD", status ready, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0 State:ready
LOCAL SERVER
Service "Pod1″has 1 instance (s).
Instance "POD", status UNKNOWN, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0
LOCAL SERVER
Service "PODS" has 1 instance (s).
Instance "POD", status ready, have 2 handler (s) for the This service ...
Handler (s):
"D001″established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER
(Address= (PROTOCOL=TCP) (Host=ocm1.oracle.domain) (port=37290))
"D000″established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER
(Address= (PROTOCOL=TCP) (Host=ocm1.oracle.domain) (port=37288))
Service "POD_XPT" has 1 instance (s).
Instance "POD", status ready, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0 State:ready
LOCAL SERVER
Service "Repos" has 2 instance (s).
Instance "repos", status UNKNOWN, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0
LOCAL SERVER
Instance "Repos", status ready, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0 State:ready
LOCAL SERVER
Service "REPOS_XPT" has 1 instance (s).
Instance "Repos", status ready, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0 State:ready
LOCAL SERVER
The command completed successfully
Service explanation
Service "POD" has 1 instance (s).
Instance "POD", status ready, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0 State:ready
LOCAL SERVER
#名为POD的服务, the corresponding DB instance is POD, state ready indicates that it is dynamically registered
Dedicated "established:0 refused:0 state:ready description is a private connection, number of connections is 0 reject number is 0, status: Dynamic
Service "Pod1″has 1 instance (s).
Instance "POD", status UNKNOWN, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0
LOCAL SERVER
#名为POD1的服务, the corresponding DB instance is Pod, state unknown indicates that it is statically registered
Dedicated "Established:2 refused:0 description is a private connection, number of connections is 2 reject number is 0
Service "PODS" has 1 instance (s).
Instance "POD", status ready, have 2 handler (s) for the This service ...
Handler (s):
"D001″established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER
(Address= (PROTOCOL=TCP) (Host=ocm1.oracle.domain) (port=37290))
"D000″established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER
(Address= (PROTOCOL=TCP) (Host=ocm1.oracle.domain) (port=37288))
#名为PODS的服务, a database with a database instance named Pod, and the ready state indicates that it is dynamically registered
"D001″established:0 refused:0 current:0 max:1022 state:ready
"D000″established:0 refused:0 current:0 max:1022 state:ready
This shows that it is share mode, currently, two dispatcher are currently connected to 0, reject 0, the maximum number is 1022, the status is dynamic registration
——————————————————————————————————————————————————————
corresponding SQL query
Sql> Show parameter Dispatchers
NAME TYPE VALUE
———————————— ———– ——————————
Dispatchers string
Max_dispatchers integer
Sql> alter system set dispatchers= ' (PROTOCOL=TCP) (dispatchers=2) '; System altered. Sql> Show parameter Dispatchersname TYPE VALUE
———————————— ———– ——————————
Dispatchers string (PROTOCOL=TCP) (dispatchers=2)
Max_dispatchers integersql> Select Name,network,paddr,status from V$dispatcher;name network Paddr STATUS
—- ——————————————————————————– ——– —————-
D000 (address= (protocol=tcp) (Host=seagull) (port=37288)) 2a220390 WAIT
D001 (address= (protocol=tcp) (Host=seagull) (port=37290)) 2a220948 WAIT
——————————————————————————————————————————————————————
Service "Repos" has 2 instance (s).
Instance "repos", status UNKNOWN, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0
LOCAL SERVER
Instance "Repos", status ready, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0 State:ready
LOCAL SERVER
#repos服务对应的实例有2个, but here are the instance repos, one for static unknown, one for dynamic ready, and the current number of connections is 0, and the rejection is 0
The command completed successfully
An explanation of Oracle monitoring (LSNRCTL)