F.1 Running Administration Commands

You need root access to tfactl, or sudo access to run all administration commands.

Table F-1 Basic TFACTL commands

Command Description

tfactl start

Starts the Oracle Trace File Analyzer daemon on the local node.

tfactl stop

Stops the Oracle Trace File Analyzer daemon on the local node.

tfactl enable

Enables automatic restart of the Oracle Trace File Analyzer daemon after a failure or system reboot.

tfactl disable

Stops any running Oracle Trace File Analyzer daemon and disables automatic restart.

tfactl uninstall

Removes Oracle Trace File Analyzer from the local node.

tfactl syncnodes

Generates and copies Oracle Trace File Analyzer certificates from one Oracle Trace File Analyzer node to other nodes.

tfactl restrictprotocol

Restricts the use of certain protocols.

tfactl status

Checks the status of an Oracle Trace File Analyzer process.

The output is same as tfactl print status.

Topics:

F.1.1 tfactl diagnosetfa

Use the tfactl diagnosetfa command to collect Oracle Trace File Analyzer diagnostic data from the local node to identify issues with Oracle Trace File Analyzer.

Syntax

tfactl diagnosetfa [-repo repository] [-tag tag_name] [-local]

Parameters

Table F-2 tfactl diagnosetfa Command Parameters

Parameter Description

-repo repository

Specify the repository directory for Oracle Trace File Analyzer diagnostic collections.

-tag tag_name

Oracle Trace File Analyzer collects the files into tag_name directory.

-local

Runs Oracle Trace File Analyzer diagnostics only on the local node.

F.1.2 tfactl host

Use the tfactl host command to add hosts to, or remove hosts from the Oracle Trace File Analyzer configuration.

Syntax

tfactl host [add host_name | remove host_name]
Specify a host name to add or remove, as in the following example:
$ tfactl host add myhost.example.com

Usage Notes

View the current list of hosts in the Oracle Trace File Analyzer configuration using the tfactl print hosts command. The tfactl print hosts command lists the hosts that are part of the Oracle Trace File Analyzer cluster:
$ tfactl print hosts
Host Name : node1
Host Name : node2

When you add a new host, Oracle Trace File Analyzer contacts the Oracle Trace File Analyzer instance on the other host. Oracle Trace File Analyzer authenticates the new host using certificates and both the Oracle Trace File Analyzer instances synchronize their respective hosts lists. Oracle Trace File Analyzer does not add the new host until the certificates are synchronized.

After you successfully add a host, all the cluster-wide commands are activated on all nodes registered in the Berkeley database.

F.1.3 tfactl set

Use the tfactl set command to enable or disable, or modify various Oracle Trace File Analyzer functions.

Syntax

tfactl set [autodiagcollect=ON | OFF] [cookie=UID] [autopurge=ON | OFF] [minagetopurge=n] 
[trimfiles=ON | OFF] [tracelevel=COLLECT | SCAN | INVENTORY | OTHER:1 | 2 | 3 | 4] 
[manageLogsAutoPurge=ON | OFF] [manageLogsAutoPurgePolicyAge=nd|h] 
[manageLogsAutoPurgeInterval=minutes] [diskUsageMon=ON|OFF] 
[diskUsageMonInterval=minutes] [reposizeMB=number] 
[repositorydir=directory] [logsize=n [-local]] [logcount=n 
[-local]] [-c]

Parameters

Table F-3 tfactl set Command Parameters

Parameter Description

autodiagcollect=ON | OFF

When set to OFF (default) automatic diagnostic collection is disabled. If set to ON, then Oracle Trace File Analyzer automatically collects diagnostics when certain patterns occur while Oracle Trace File Analyzer scans the alert logs.

To set automatic collection for all nodes of the Oracle Trace File Analyzer cluster, you must specify the -c parameter.

autopurge

When set to ON, enables automatic purging of collections when Oracle Trace File Analyzer observes less space in the repository (default is ON).

minagetopurge=n

Set the minimum age, in hours, for a collection before Oracle Trace File Analyzer considers it for purging (default is 12 hours).

trimfiles=ON | OFF

When set to ON, Oracle Trace File Analyzer trims the files to have only the relevant data when diagnostic collection is done as part of a scan.

Note: When using tfactl diagcollect, you determine the time range for trimming with the parameters you specify. Oracle recommends that you not set this parameter to OFF, because untrimmed data can consume much space.

tracelevel=COLLECT | SCAN | INVENTORY | OTHER: 1 | 2 | 3 | 4

You can set trace levels for certain operations, including INVENTORY:n, SCAN:n, COLLECT:n, OTHER:n. In this syntax, n is a number from 1 to 4 and OTHER includes all messages not relevant to the first three components.

Note: Do not change the tracing level unless you are directed to do so by My Oracle Support.

diskUsageMon=ON|OFF

Turns ON (default) or OFF monitoring disk usage and recording snapshots.

Oracle Trace File Analyzer stores the snapshots under tfa/repository/suptools/node/managelogs/usage_snapshot/.

diskUsageMonInterval=minutes

Specify the time interval between snapshots (60 minutes by default).

manageLogsAutoPurge=ON | OFF

Turns automatic purging on or off (ON by default in DSC and OFF by default elsewhere).

manageLogsAutoPurgePolicyAge=nd|h

Age of logs to be purged (30 days by default).

manageLogsAutoPurgeInterval=minutes

Specify the purge frequency (default is 60 minutes).

reposizeMB=number

Sets the maximum size, in MB, of the collection repository.

repositorydir=directory

Specify the collection repository directory.

logsize=n [-local]

Sets the maximum size, in MB, of each log before Oracle Trace File Analyzer rotates to a new log (default is 50 MB). Use the -local parameter to apply the change only to the local node.

logcount=n [-local]

Sets the maximum number of logs of specified size that Oracle Trace File Analyzer retains (default is 10). Use the -local parameter to apply the change only to the local node.

-c

Propagates the settings to all nodes in the Oracle Trace File Analyzer configuration.

Example

The following example enables automatic diagnostic collection, sets the trace level, and sets a maximum limit for the collection repository:

$ tfactl set autodiagcollect=ON reposizeMB=20480

F.1.4 tfactl access

Use the tfactl access command to allow non-root users to have controlled access to Oracle Trace File Analyzer, and to run diagnostic collections.

Non-root users can run a subset of tfactl commands. Running a subset of commands enables non-root users to have controlled access to Oracle Trace File Analyzer, and to run diagnostic collections. However, root access is still required to install and administer Oracle Trace File Analyzer. Control non-root users and groups using the tfactl access command. Add or remove non-root users and groups depending upon your business requirements.

Note:

By default, all Oracle home owners, OS DBA groups, and ASM groups are added to the Oracle Trace File Analyzer Access Manager list while installing or upgrading Oracle Trace File Analyzer.

Syntax

tfactl access [ lsusers | add -user user_name [ -group group_name ] 
[ -local ] | remove -user user_name [ -group group_name ] 
[ -all ] [ -local ] | block -user user_name [ -local ] | unblock -user user_name 
[-local] | enable [ -local ] | disable [ -local ] | reset [ -local ] | removeall [ -local ]

Parameters

Table F-4 tfactl access Command Parameters

Parameter Description

lsusers

Lists all the Oracle Trace File Analyzer users and groups.

enable

Enables Oracle Trace File Analyzer access for non-root users.

Use the –local flag to change settings only on the local node.

disable

Disables Oracle Trace File Analyzer access for non-root users.

However, the list of users who were granted access to Oracle Trace File Analyzer is stored, if the access to non-root users is enabled later.

Use the –local flag to change settings only on the local node.

add

Adds a user or a group to the Oracle Trace File Analyzer access list.

remove

Removes a user or a group from the Oracle Trace File Analyzer access list.

block

Blocks Oracle Trace File Analyzer access for non-root user.

Use this command to block a specific user even though the user is a member of a group that is granted access to Oracle Trace File Analyzer.

unblock

Enables Oracle Trace File Analyzer access for non-root users who were blocked earlier.

Use this command to unblock a user that was blocked earlier by running the command tfactl access block.

reset

Resets to the default access list that includes all Oracle Home owners and DBA groups.

removeall

Removes all Oracle Trace File Analyzer users and groups.

Remove all users from the Oracle Trace File Analyzer access list including the default users and groups.

Examples

To add a user, for example, abc to the Oracle Trace File Analyzer access list and enable access to Oracle Trace File Analyzer across cluster.

/u01/app/tfa/bin/tfactl access add -user abc

To add all members of a group, for example, xyz to the Oracle Trace File Analyzer access list and enable access to Oracle Trace File Analyzer on the localhost.

/u01/app/tfa/bin/tfactl access add -group xyz -local

To remove a user, for example, abc from the Oracle Trace File Analyzer access list.

/u01/app/tfa/bin/tfactl access remove -user abc

To block a user, for example, xyz from accessing Oracle Trace File Analyzer.

/u01/app/tfa/bin/tfactl access block -user xyz

To remove all Oracle Trace File Analyzer users and groups.

/u01/app/tfa/bin/tfactl access removeall