2 Replies Latest reply on Oct 8, 2019 3:00 PM by 792311

    scan alert logs


      OS: RHEL 6.10



      Problem:  My scan and listener logs are growing. Please see screenshot below. When I do ls -ltr, they go as far back to 2015.  I would like to delete all the logs older than 2019.

      Any help would be appreciated.  Thank you. 



      1. 1.7G /opt/oragrid/11.2.0/log/diag/tnslsnr/1234/listener_scan3/alert
      2. 2.4G /opt/oragrid/11.2.0/log/diag/tnslsnr/1234/listener_scan3
      3. 1.7G /opt/oragrid/11.2.0/log/diag/tnslsnr/1234/listener_scan2/alert
      4. 2.4G /opt/oragrid/11.2.0/log/diag/tnslsnr/1234/listener_scan2
      5. 5.6G /opt/oragrid/11.2.0/log/diag/tnslsnr/1234/
        • 1. Re: scan alert logs

          In each of those directories, you can do the following:


          find * -mtime +8 -exec rm -rf {} \;


          The above will remove files older than 8 days.


          We are currently in the 281st day of the year, so to remove all files prior to this year, replace "8" with "281" above.


          You really don't need to hold on to those files that long either. I typically keep files for 7 or 30 days depending on the trace file. Then I schedule a similar command in cron to keep the directories nice and tidy.


          Another way to clean up those files is to upgrade to a more recent GI version. The version is out of support.




          • 2. Re: scan alert logs

            Thank you so much for your help and kind reply.