TNSListener:
ps -ef | grep -i lsnr
or
ps -fu oracle | grep lsnr
To find Oracle Process:
----------------------------
ps -ef | grep -i pmon
or
ps -ef | grep -i smon
ps -ef | grep -i lsnr
or
ps -fu oracle | grep lsnr
To find Oracle Process:
----------------------------
ps -ef | grep -i pmon
or
ps -ef | grep -i smon
-- using ps to find the PID of listener processes
/home/oracle> ps -fu oracle | grep lsnr
oracle 8683 8462 0 12:10 pts/0 00:00:00 grep lsnr
oracle 28793 1 0 Apr26 ? 00:00:28 /software/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
oracle 31744 1 0 Apr26 ? 00:00:49 /software/grid/bin/tnslsnr LISTENER -inherit
-- using lsof to list IP ports (using numerics) opened by the specified PID
/home/oracle> /usr/sbin/lsof -n -P -p 31744 | grep IP
tnslsnr 31744 oracle 12u IPv4 2154732 TCP 127.0.0.1:41209->127.0.0.1:6100 (ESTABLISHED)
tnslsnr 31744 oracle 14u IPv4 2154769 TCP 10.251.95.67:1521 (LISTEN)
tnslsnr 31744 oracle 15u IPv4 2154770 TCP 10.251.95.80:1521 (LISTEN)
tnslsnr 31744 oracle 16u IPv4 2155930 TCP 10.251.95.80:1521->10.251.95.80:44979 (ESTABLISHED)
tnslsnr 31744 oracle 18u IPv4 5171001 TCP 10.251.95.80:1521->10.251.95.80:46779 (ESTABLISHED)
oracle@nvs-dev1: /home/oracle>