The Oracle 11g listening and warning logs are both in the/u01/oracle/diag/tnslsnr/oracle/listener directory and the/u01/oracle/diag/rdbms/db1/ The DB1 directory has the following names, respectively, listener directories and DB1 directories. Both directories have the following directories: Alert Cdump HM incident incpkg IR lck metadata stage sweep trace
Where the warning log is in the alert directory, the Listener log is under the trace directory. The log file generated in the Listener directory is larger, is the main cleanup object, and DB1 directory produced relatively small file, basically do not need to clear. The Listener directory is a file called Listener.log, and warning log log.xml, this log every 11M or so will be divided into a log_xxxx.xml log, gradually accumulated. The two logs in the DB1 directory are just the opposite, and the listening log is split into a number of. trc. trm files, and the warning log has only one log.xml file. I don't know what the Oracle is doing or what the principle is. Hope to have a friend who knows to give advice.
The following methods for deleting a listening log are:
Switch to Oracle user
Su Oracle
$lsnrctl set Log_status off
$MV listener.log/backup/
$lsnrctl set Log_status on
After the listener log is started, a new Listener.log file is automatically created and the backed-up files can be deleted. If you delete Listener.log directly without executing the above command, the system will not be created.
The warning log can be moved or deleted with the following command
Find. -mtime +10-exec mv {}/backup/alert_log/\;
To see the warning log, you can perform adrci under Oracle users
$adrci
In the Adrci directory, you can enter help to see the assistance command. Enter help show alert to see the detailed usage of show alert.
Show alert
Will prompt you to select the log directory or exit
Adrci> Show alert
Choose the alert log from the following homes to view:
1:diag/rdbms/db1/db1
2:diag/tnslsnr/oracle/listener
Q:to quit
Please select Option:1
Input 1 To see under the DB1, input 2 to see the Listener directory, enter Q to exit.
After reading alert's log, enter: Q Exit, the operation method is similar to VI command.
Show Tracefile
You can see the listening log file
Diag/rdbms/db1/db1/trace/db1_vktm_17064.trc
Diag/rdbms/db1/db1/trace/db1_m000_25175.trc
Diag/tnslsnr/oracle/listener/trace/ora_7795_139913618966240.trc
Diag/tnslsnr/oracle/listener/trace/listener.log
You can see from the above two directories have logs.