4.7 Managing Oracle Database and Oracle Grid Infrastructure Logs
This section enables you to manage Oracle Database and Oracle Grid Infrastructure diagnostic data and disk usage snapshots.
- Managing Automatic Diagnostic Repository Log and Trace Files
Use themanagelogs
command to manage Automatic Diagnostic Repository log and trace files. - Managing Disk Usage Snapshots
Usetfactl
commands to manage Oracle Trace File Analyzer disk usage snapshots. - Purging Oracle Database and Oracle Grid Infrastructure Logs
Use thesetfactl
commands to manage log file purge policy for Oracle Database and Oracle Grid Infrastructure logs. - Securing Access to Diagnostic Collections
Runningtfactl
commands is restricted to authorized users.
Parent topic: Collect Diagnostic Data
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 option removes files managed by Automatic Diagnostic Repository. This command clears files from “ALERT
”, "INCIDENT
", "TRACE
", "CDUMP
", "HM
", "UTSCDMP
", "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:
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_install_dir/tfa/repository/suptools/node/managelogs/usage_snapshot/
By default, the time interval between snapshots is 60 minutes.
To manage disk usage snapshots:
4.7.3 Purging Oracle Database and Oracle Grid Infrastructure Logs
Use these tfactl
commands to manage log file purge policy for Oracle Database and Oracle Grid Infrastructure logs.
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:
4.7.4 Securing Access to Diagnostic Collections
Running tfactl
commands is restricted to authorized users.
tfactl
provides a command-line interface and shell to do the following:
-
Run diagnostics and collect all relevant log data from a time of your choosing
-
Trim log files to collect only what is necessary for diagnosis
-
Collect and package all trimmed diagnostics from any desired nodes in the cluster and consolidate everything in one package on a single node
Authorized non-root users can run a subset of the tfactl
commands. All other tfactl
commands require root
access. Users who are not authorized cannot run tfactl
commands.
By default, the following users are authorized to access a subset of tfactl
commands:
-
Oracle Grid Infrastructure home owner
-
Oracle Database home owners
User access is applicable only if Oracle Trace File Analyzer is installed as
root
on Linux and UNIX. User access is not applicable if Oracle
Trace File Analyzer is installed as non-root, or on Microsoft Windows.
Note:
If an operating system user added to the AHF access control list is deleted without being removed from AHF, then a user created later with the same user name will inherit the deleted user's privileges. To avoid this situation, if an operating system user is deleted, ensure that the user is removed from the AHF access control list.To provision user access to tfactl:
-
To list the users who have access to
tfactl
:tfactl access lsusers
-
To add a user to access
tfactl
:tfactl access add –user user [-local]
By default, access commands are applicable to cluster-wide unless you specify the
–local
command option to restrict them to local node. -
To remove a user from accessing
tfactl
:tfactl access remove –user user [-local]
-
To remove all users from accessing
tfactl
:tfactl access removeall [-local]
-
To reset user access to default:
tfactl access reset
Related Topics