How to Purge Listener Log Data

Solution 1:

[oracle@server1 trace]$ cp listener.log listener_backup.log

[oracle@server1 trace]$ cat /dev/null>listener.log

[oracle@server1 trace]$ gzip listener_backup.log

Solution 2:

[oracle@server1 ~]$ lsnrctl

LSNRCTL for Linux: Version - Production on 02-JAN-2012 13:17:22

Copyright (c) 1991, 2011, Oracle. All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> show current_listener

Current Listener is LISTENER

If you want to change the current listener then execute the following command:

LSNRCTL> set current_listener <listenername>

LSNRCTL> set log_status off


LISTENER parameter "log_status" set to OFF

The command completed successfully

From another window rename the log file, then return to previous window.

[oracle@server1 trace]$ mv listener.log listener_backup.log

LSNRCTL> set log_status on


LISTENER parameter "log_status" set to ON

The command completed successfully

This will create a new and empty listener.log file which will continue logging.