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
managelogs command to manage Automatic Diagnostic Repository log and trace files.
-purge command option removes files managed by Automatic Diagnostic Repository. This command clears files from “
LOG" under diagnostic destinations. The
-purge command also provides details about the change in the file system space.
If the diagnostic destinations contain large numbers of files, then the command runs for a while. Check the removal of files in progress from the corresponding directories.
To remove files, you must have operating system privileges over the corresponding diagnostic destinations.
To manage Automatic Diagnostic Repository log and trace files:
- To limit purge, or show operations to only files older than a specific time:
$ tfactl managelogs -older nm|h|d Files from past 'n' [d]ays or 'n' [h]ours or 'n' [m]inutesFor example:
$ tfactl managelogs -purge -older 30d -dryrun $ tfactl managelogs -purge -older 30d
- To get an estimate of how many files are removed and how much space is freed, use the
$ tfactl managelogs -purge -older 30d -dryrun
- 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
- 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
4.7.2 Managing Disk Usage Snapshots
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
By default, the time interval between snapshots is 60 minutes.
To manage disk usage snapshots:
- To change the default time interval for snapshots:
$ tfactl set diskUsageMonInterval=minutes
minutesis the number of minutes between snapshots.
- To turn the disk usage monitor on or off:
$ tfactl set diskUsageMon=ON|OFF
4.7.3 Purging Oracle Trace File Analyzer Logs Automatically
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, every 60 minutes, Oracle Trace File Analyzer automatically purges logs that are older than 30 days.
To purge Oracle Trace File Analyzer logs automatically:
- To turn on or off automatic purging:
$ tfactl set manageLogsAutoPurge=ON|OFF
- To adjust the age of logs to purge:
$ tfactl set manageLogsAutoPurgePolicyAge=nd|h
- To adjust the frequency of purging:
$ tfactl set manageLogsAutoPurgeInterval=minutes