Monday, June 8, 2009

Number of connections established on or hitting oracle listener port

Number of connections established on or hitting oracle listener port:

The easiest way to find the listener(s) running on oracle db system is as follows:

lsnrctl status

it will list all the database names that are running currently.

whats the way to find listener port then?.. here is the way to find using simple command

tnsping service_name

example: tnsping mydb

finally we got host , port and service_name in simple text, we got everything that one can use to make a connection with port

the final query answer and purpose of this post come here that is finding the number of of connections established/hitting oracle listener port
( there are many options, one can opt which is best based on purpose and results)

netstat -an | grep port_number

example: netstat -an | grep 1521

netstat -anp | grep port_number

there are many usages of this command, with which one can find what is running on a particular port or how many connections established etc ..

(looking more info on netstat, the easiest way to find is man netstat )

Hope this will help you .. or anything missed out here that one feel to add.. so why wait, make a comment now.. :)

No comments:

Post a Comment