Oracle listener file processing listener.log

   If the connection time becomes slower to view Oracle log, this may be because the file is too large, more than 2G,
need to be cleaned regularly (if multi-user, remember to use the root, may not have permissions)

View listener.log?

find / -name listener.log

By viewing the log data was as high as 2G, due to some old OS more than 2GB files are not supported, so when listener.log file
exceeds 2GB, will be unable to handle the new connection, a new operating system, although this does not appear problem, but we still need their
regular clean-up process.

Listener log log file processing

[oracle@localhost home]$ lsnrctl
LSNRCTL> set log_status off
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
LISTENER parameter "log_status" set to OFF
The command completed successfully
LSNRCTL> show log_status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
LISTENER parameter "log_status" set to OFF
The command completed successfully
LSNRCTL> exit
[oracle@localhost home]$ find -name listener.log
home/oracle/app/oracle/diag/tnslsnr/localhost/listener/trace/listener.log
[oracle@localhost ~]$ cd /home/oracle/app/oracle/diag/tnslsnr/localhost/listener/trace/
[oracle@localhost trace]$ mv listener.log listener.log.20191127
[oracle@localhost trace]$ ls
listener.log.20191127  ora_2617_140154513196800.trc
[oracle@localhost trace]$ lsnrctl
LSNRCTL> set log_status on
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
LISTENER parameter "log_status" set to ON
The command completed successfully
LSNRCTL> show log_status 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
LISTENER parameter "log_status" set to ON
The command completed successfully
LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
LSNRCTL> exit
[oracle@localhost trace]$

[oracle@localhost home]$ lsnrctl
LSNRCTL> set log_status off
LSNRCTL> show log_status
LSNRCTL> exit
[oracle@localhost home]$ find -name listener.log
[oracle@localhost trace]$ mv listener.log listener.log.20191127
LSNRCTL> set log_status on
LSNRCTL> reload

Then we re-named log file, it will automatically generate a new file listener.log. Of course, also be flush processing, you can
copy it back up, then empty the process.

Guess you like

Origin www.cnblogs.com/zhang-dongliang/p/11977227.html