If you want to enable trace for a listener, Then follow below steps.
Set current listener:
LSNRCTL> set cur LISTENER_TEST Current Listener is LISTENER_TEST
Check status
LSNRCTL> status Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_TEST))) STATUS of the LISTENER ------------------------ Alias LISTENER_TEST Version TNSLSNR for HPUX: Version 12.1.0.2.0 - Production Start Date 14-DEC-2015 16:28:54 Uptime 0 days 0 hr. 33 min. 49 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /crsapp/app/oracle/product/grid12c/network/admin/listener.ora Listener Log File /oracle/app/oracle/diag/tnslsnr/b2c-pre1/listener_TEST/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_TEST))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.24.32.12)(PORT=1524))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.24.32.13)(PORT=1524))) Services Summary... Service "TSTDB" has 1 instance(s). Instance "TSTDB1", status READY, has 1 handler(s) for this service... Service "TSTDB1" has 1 instance(s). Instance "TSTDB1", status UNKNOWN, has 1 handler(s) for this service... Service "TSTDBXDB" has 1 instance(s). Instance "TSTDB1", status READY, has 1 handler(s) for this service... The command completed successfully
Enable Trace:
LSNRCTL> set trc_level ADMIN Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_TEST))) LISTENER_TEST parameter "trc_level" set to admin The command completed successfully
Check the status again and the trace file location:
LSNRCTL> status Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_TEST))) STATUS of the LISTENER ------------------------ Alias LISTENER_TEST Version TNSLSNR for HPUX: Version 12.1.0.2.0 - Production Start Date 14-DEC-2015 16:28:54 Uptime 0 days 0 hr. 33 min. 55 sec Trace Level admin Security ON: Local OS Authentication SNMP OFF Listener Parameter File /crsapp/app/oracle/product/grid12c/network/admin/listener.ora Listener Log File /oracle/app/oracle/diag/tnslsnr/b2c-pre1/listener_TEST/alert/log.xml Listener Trace File /oracle/app/oracle/diag/tnslsnr/b2c-pre1/listener_TEST/trace/ora_18913_1.trc Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_TEST))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.21.40.82)(PORT=1524))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.21.40.83)(PORT=1524))) Services Summary... Service "TSTDB" has 1 instance(s). Instance "TSTDB1", status READY, has 1 handler(s) for this service... Service "TSTDB1" has 1 instance(s). Instance "TSTDB1", status UNKNOWN, has 1 handler(s) for this service... Service "TSTDBXDB" has 1 instance(s). Instance "TSTDB1", status READY, has 1 handler(s) for this service... The command completed successfully LSNRCTL> exit $ cd /oracle/app/oracle/diag/tnslsnr/b2c-pre1/listener_TEST/trace/ $ ls -ltr total 412 -rw-r----- 1 oracle oinstall 45491 Dec 14 17:02 listener_TEST.log -rw-r----- 1 oracle oinstall 64445 Dec 14 17:02 ora_18913_1.trc -rw-r----- 1 oracle oinstall 15900 Dec 14 17:02 ora_18913_1.tr