Reviewing Listener Logs

Assumption is for a 4-node RAC with nodes named exadb01/exadb02/exadb03/exadb04.

Gather all the logs

ssh oracle@exadb01
mkdir -p ./listenerlog/exadb01 ./listenerlog/exadb02 ./listenerlog/exadb03 ./listenerlog/exadb04
cd /home/oracle/listenerlog

scp oracle@exadb04:/u01/app/oracle/diag/tnslsnr/exdb04/listener* ./exadb04
scp oracle@exadb03:/u01/app/oracle/diag/tnslsnr/exdb03/listener* ./exadb03
scp oracle@exadb02:/u01/app/oracle/diag/tnslsnr/exdb02/listener* ./exadb02
scp oracle@exadb01:/u01/app/oracle/diag/tnslsnr/exdb01/listener* ./exadb01
gunzip ./exadb04/* ./exadb03/* ./exadb02/* ./exadb01/*

Search for specific databases in the logs

#!/bin/bash -v
echo on
cd /home/oracle/listenerlog
cat  ./exadb01/* ./exadb02/* ./exadb03/* ./exadb04/* | grep -i oradev01 | wc -l
cat  ./exadb01/* ./exadb02/* ./exadb03/* ./exadb04/* | grep -i oratst01 | wc -l
cat  ./exadb01/* ./exadb02/* ./exadb03/* ./exadb04/* | grep -i oraprd01 | wc -l