Operating System - HP-UX
1752409 Members
5710 Online
108788 Solutions
New Discussion юеВ

Oracle Listener Status check

 
Joe Banks
New Member

Oracle Listener Status check

I'm new to this. What is the best way to check the status of the listener? Ours is hanging and causing an IVR app to hang during a sys check step. Any ideas would be helpful.
You did what?
4 REPLIES 4
Hai Nguyen_1
Honored Contributor

Re: Oracle Listener Status check

Joe,

Login as oracle, then run:

# lsnrctl status

My spelling may not be correct. if lsnrctl does not work, try lnsrctl.

Hai
Joe Banks
New Member

Re: Oracle Listener Status check

Thanks, I can start with that. I would ultimately like the IVR to query the status and receive a reply that it can report on. Then I can alert based on status of listener.
You did what?
Tom Danzig
Honored Contributor

Re: Oracle Listener Status check

lsnrctl status

=============================

Or if you don't want all the output:

lsnrctl status 1>/dev/null 2>&1

if [[ $? -eq 0 ]]
then
echo "Listener is OK"
else
echo "Listener is NOT OK"
fi



Wodisch
Honored Contributor

Re: Oracle Listener Status check

Hi,

checking wether the listener runs, is usually NOT enough (it may be hanging), so you'll have to do something like:
- lsnrctl status # like the others wrote
- tnsping TNSNAME # wether it responds
- sqlplus USER/PASSWORD@TNSNAME script # do something (like "select * from v$database;")

If all three do well, then you can be fairly certain that is DOES work...

Just my $0.02,
Wodisch