4.7 Managing Oracle Database and Oracle Grid Infrastructure Diagnostic Data

This section enables you to manage Oracle Database and Oracle Grid Infrastructure diagnostic data and disk usage snapshots.

4.7.1 Managing Automatic Diagnostic Repository Log and Trace Files

Use the managelogs  command to manage Automatic Diagnostic Repository log and trace files.

The -purge  command removes files managed by Automatic Diagnostic Repository (Files are cleared from “ALERT”, "INCIDENT", "TRACE", "CDUMP", "HM", "UTSCDMP", "LOG" under diagnostic destinations) and provides details about the change in the file system space.

For diagnostic destinations where there are large numbers of files the command might take a while. Check the removal in progress from corresponding directories.

You must have operating system privilege over corresponding diagnostic destinations to remove the files.

To manage Automatic Diagnostic Repository log and trace files:

  1. To limit purge or show operations to only files older than a specified time:
    $ tfactl managelogs -older nm|h|d Files from past 'n' [d]ays or 'n' [h]ours or 'n' [m]inutes
    
    For example:
    $ tfactl managelogs -purge -older 30d -dryrun 
    
    $ tfactl managelogs -purge -older 30d
    
  2. Perform a dry run to get an estimate of how many files are removed and how much space is freed by executing the purge  command with the –dryrun  option:
    For example:
    $ tfactl managelogs -purge -older 30d -dryrun
    
  3. To remove files and clean disk space:
    For example:
    $ tfactl managelogs -purge -older 30d 
    
    $ tfactl managelogs -purge -older 30d –gi
    
    $ tfactl managelogs -purge -older 30d -database
    
  4. To view the space usage of individual diagnostic destinations:
    For example:
    $ tfactl managelogs -show usage
    
    $ tfactl managelogs -show usage –gi
    
    $ tfactl managelogs -show usage -database
    

Related Topics

4.7.2 Managing Disk Usage Snapshots

Use tfactl commands to manage Oracle Trace File Analyzer disk usage snapshots.

Oracle Trace File Analyzer automatically monitors disk usage, records snapshots, and stores the snapshots under tfa/repository/suptools/node/managelogs/usage_snapshot/.

By default, the time interval between snapshots is 60 minutes.

To manage disk usage snapshots:

  1. To change the default time interval for snapshots:
    $ tfactl set diskUsageMonInterval=minutes
    

    where minutes is the number of minutes between snapshots.

  2. To turn the disk usage monitor on or off:
    $ tfactl set diskUsageMon=ON|OFF
    

4.7.3 Purging Oracle Trace File Analyzer Logs Automatically

Use these tfactl commands to manage log file purge policy for Oracle Trace Analyzer log files.

Automatic purging is enabled by default on a Domain Service Cluster (DSC), and disabled by default elsewhere. When automatic purging is enabled, Oracle Trace File Analyzer runs an automatic purge every 60 minutes of logs that are older than 30 days.

To purge Oracle Trace File Analyzer logs automatically:

  1. To turn on or off automatic purging:
    $ tfactl set manageLogsAutoPurge=ON|OFF
    
  2. To adjust the age of logs to purge:
    $ tfactl set manageLogsAutoPurgePolicyAge=nd|h
    
  3. To adjust the frequency of purging:
    $ tfactl set manageLogsAutoPurgeInterval=minutes