9.3.3.4 tfactl directory
Use the tfactl directory
command to add a directory to, or remove a directory from the list of directories to analyze their trace or log files.
Also, use the tfactl directory
command to change the directory permissions. When automatic discovery adds a directory, the directory is added as public. Any user who has sufficient permissions to run the tfactl diagcollect
command collects any file in that directory. This is only important when non-root or sudo
users run tfactl
commands.
If a directory is marked as private, then Oracle Trace File Analyzer, before allowing any files to be collected:
-
Determines which user is running
tfactl
commands -
Verifies if the user has permissions to see the files in the directory
Note:
A user can only add a directory to Oracle Trace File Analyzer to which they have read
access. If you have automatic diagnostic collections configured, then Oracle
Trace File Analyzer runs as root
, and can collect all
available files.
The tfactl directory
command includes three verbs with which you can manage directories: add
, remove
, and modify
.
Syntax
tfactl directory add directory [-public] [-exclusions | -noexclusions | -collectall] [-node all | n1,n2...]
tfactl directory remove directory [-node all | n1,n2...]
tfactl directory modify directory [-private | -public] [-exclusions | -noexclusions | -collectall]
tfactl directory list
For each of the three syntax models, you must specify a directory path where Oracle Trace File Analyzer stores collections.
Parameters
Table 9-88 tfactl directory Command Parameters
Parameter | Description |
---|---|
-public |
Use the |
-private |
Use the |
-exclusions |
Use the |
-noexclusions |
Use the |
-collectall |
Use the |
-node all | n1,n2... |
Add or remove directories from every node in the cluster or use a comma-delimited list to add or remove directories from specific nodes. |
Usage Notes
You must add all trace directory names to the Berkeley DB (BDB) so that Oracle Trace
File Analyzer can collect file metadata in that directory. The
discovery process finds most directories, but if new or undiscovered
directories are required, then you can add these manually using the
tfactl directory
command.
When you add a directory using tfactl, then Oracle Trace File Analyzer attempts to determine whether the directory is for
-
Oracle Database
-
Oracle Grid Infrastructure
-
Operating system logs
-
Some other component
-
Which database or instance
If Oracle Trace File Analyzer cannot determine this information, then Oracle Trace File Analyzer returns an error and requests that you enter the information, similar to the following:
# tfactl directory add /tmp
Failed to add directory to TFA. Unable to determine parameters for directory: /tmp
Please enter component for this Directory [RDBMS|CRS|ASM|INSTALL|OS|CFGTOOLS|TNS|DBWLM|ACFS|ALL] : RDBMS
Please enter database name for this Directory :MYDB
Please enter instance name for this Directory :MYDB1
Note:
For OS, CRS, CFGTOOLS, ACFS, ALL, or INSTALL files, only the component is requested and for Oracle ASM only the instance is created. No verification is done for these entries so use caution when entering this data.Example 9-99 tfactl directory
To add a directory:
# tfactl directory add /u01/app/grid/diag/asm/+ASM1/trace
To modify a directory and make the contents available for collection only to Oracle Trace File Analyzer users with sufficient permissions:
# tfactl directory modify /u01/app/grid/diag/asm/+ASM1/trace -private
To remove a directory from all nodes in the cluster:
# tfactl directory remove /u01/app/grid/diag/asm/+ASM1/trace -node all
tfactl directory list